Skip to content

本页为英文技术参考;字段、编号与支持状态直接来自同一契约源。中文学习路线见 开发文档。

Minecraft.Launch ​

Prepare and start a game using an explicit profile and launch plan. Profile editing, plan creation and process observation are different lifecycle steps.

Contract: nexa.minecraft.launch/100. API index.

Typical sequence ​

Read or select the intended instance profile, prepare the launch, validate the exact plan, then Start. Observe the attempt and resulting session rather than assuming admission means a running game.

Behavior and limits ​

A changed account, Java selection or instance state can invalidate the plan. Contribution/preflight registration routes remain unmapped where listed; arbitrary native command injection is not a fallback.

The recorded Host maps 14 of 14 operations in this group. A mapping is subject to permission, phase, scope, platform and business preconditions. Host snapshot identifies the source revision; negotiate against the actual installed Host.

Operations ​

ReadEffectiveProfile · ListProfiles · SaveProfile · SelectProfile · Prepare · ReadPlan · ValidatePlan · Start · Cancel · RegisterContribution · RegisterPreflight · ReadAttempt · WatchAttempt · ExplainContribution

ReadEffectiveProfile ​

EntityRequest → LaunchProfile

PropertyContract
Local SDK method ID1
KindQuery
Permissionnexa.minecraft.launch.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_ReadEffectiveProfile(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_ReadEffectiveProfile_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ListProfiles ​

EntityRequest → Page<LaunchProfile> (wrapper, item)

PropertyContract
Local SDK method ID2
KindQuery
Permissionnexa.minecraft.launch.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Read Items and continue with NextCursor while preserving the original query. An absent cursor ends the sequence; an invalid cursor is an error.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_ListProfiles(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_ListProfiles_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

SaveProfile ​

LaunchProfileWrite → LaunchProfile

PropertyContract
Local SDK method ID3
KindMutation
Permissionnexa.minecraft.launch.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
InstanceEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
ProfileLaunchProfileStructured LaunchProfile value; follow its linked field contract.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_SaveProfile(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_SaveProfile_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

SelectProfile ​

LaunchProfileSelection → LaunchProfile

PropertyContract
Local SDK method ID4
KindMutation
Permissionnexa.minecraft.launch.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
InstanceEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
ProfileEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_SelectProfile(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_SelectProfile_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Prepare ​

LaunchIntent → LaunchPlan

PropertyContract
Local SDK method ID5
KindQuery
Permissionnexa.minecraft.launch.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
InstanceEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
GrantLaunchGrantStructured LaunchGrant value; follow its linked field contract.
ProfileEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
TargetLaunchTarget?Structured LaunchTarget value; follow its linked field contract. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_Prepare(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_Prepare_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ReadPlan ​

EntityRequest → LaunchPlan

PropertyContract
Local SDK method ID6
KindQuery
Permissionnexa.minecraft.launch.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_ReadPlan(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_ReadPlan_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ValidatePlan ​

PlanRequest → ValidationReport

PropertyContract
Local SDK method ID7
KindQuery
Permissionnexa.minecraft.launch.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
PlanEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.
ConfirmationTokenstring?Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_ValidatePlan(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_ValidatePlan_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Start ​

PlanRequest → OperationRef

PropertyContract
Local SDK method ID8
KindOperation
Permissionnexa.minecraft.launch.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
PlanEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.
ConfirmationTokenstring?Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

Work has been admitted. Read or watch the owned operation through Tasks to establish its terminal result; admission is not completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_Start(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_Start_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Cancel ​

OperationRequest → OperationRef

PropertyContract
Local SDK method ID9
KindMutation
Permissionnexa.minecraft.launch.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
OperationEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.

Successful result

Work has been admitted. Read or watch the owned operation through Tasks to establish its terminal result; admission is not completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_Cancel(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_Cancel_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

RegisterContribution ​

LaunchContributionRegistration → RegistrationRef

PropertyContract
Local SDK method ID10
KindRegistration
Permissionnexa.minecraft.launch.write
Legal phasesInitialize
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Stage a query-only callback during Initialize. Its input and output are LaunchProfile. Declare a nonempty subset of MemoryMiB, Width and Height; every other field must remain unchanged. Definitions are ordered by qualified ID, and the first accepted contribution owns each field. Required failures abort preparation; optional failures appear in ExplainContribution. Values affect this launch only and are validated by the owner’s settings schema.

Request fields

FieldTypeMeaning
IdQualifiedIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.
Fieldsstring[]Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. A bounded collection; do not assume an unbounded result or unspecified ordering.
HandlerulongCallback identifier registered by this plugin. A handler alone is not a public action or provider registration.
RequiredboolDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.

Successful result

Retain the registration identity for the permitted update/release operation. Staged registrations become visible only at group activation.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_RegisterContribution(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_RegisterContribution_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

RegisterPreflight ​

LaunchContributionRegistration → RegistrationRef

PropertyContract
Local SDK method ID11
KindRegistration
Permissionnexa.minecraft.launch.write
Legal phasesInitialize
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Stage a pure LaunchProfile → ValidationReport callback with an empty Fields array. The Host runs preflights after contributions during Prepare and again before execution. Required invalid/fatal reports block launch; optional failures are suppressed and reported. Definition retirement or revision changes invalidate prepared plans. Mutation reentrancy is denied.

Request fields

FieldTypeMeaning
IdQualifiedIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.
Fieldsstring[]Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. A bounded collection; do not assume an unbounded result or unspecified ordering.
HandlerulongCallback identifier registered by this plugin. A handler alone is not a public action or provider registration.
RequiredboolDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.

Successful result

Retain the registration identity for the permitted update/release operation. Staged registrations become visible only at group activation.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_RegisterPreflight(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_RegisterPreflight_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ReadAttempt ​

EntityRequest → LaunchAttempt

PropertyContract
Local SDK method ID12
KindQuery
Permissionnexa.minecraft.launch.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_ReadAttempt(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_ReadAttempt_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

WatchAttempt ​

WatchRequest → SubscriptionRef

PropertyContract
Local SDK method ID13
KindSubscription
Permissionnexa.minecraft.launch.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
TargetEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
Cursorstring?Opaque continuation or observation cursor. Reuse only in the issuing query/scope; absence and invalidity are different. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
SchemaSchemaRefExact schema identity, version and fingerprint used to validate Value.

Successful result

Retain the subscription identity, consume bounded batches or callbacks as specified, handle gaps, and release it when no longer needed.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_WatchAttempt(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_WatchAttempt_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ExplainContribution ​

EntityRequest → LaunchContributionReport

PropertyContract
Local SDK method ID14
KindQuery
Permissionnexa.minecraft.launch.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Read accepted extension IDs and suppressed issues for an owned launch plan/attempt ID. This report explains preparation; it does not assert that the game started. Use ReadAttempt for execution state.

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Launch_ExplainContribution(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Launch_ExplainContribution_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.


来源: NexaCL-Plugin-SDK · Apache-2.0.

Site documentation: CC BY-SA 4.0. Imported SDK documents: Apache-2.0 as marked.