本页为英文技术参考;字段、编号与支持状态直接来自同一契约源。中文学习路线见 开发文档。
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
| Property | Contract |
|---|---|
| Local SDK method ID | 1 |
| Kind | Query |
| Permission | nexa.minecraft.launch.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Id | EntityId | Identity 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):
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)
| Property | Contract |
|---|---|
| Local SDK method ID | 2 |
| Kind | Query |
| Permission | nexa.minecraft.launch.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Id | EntityId | Identity 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 3 |
| Kind | Mutation |
| Permission | nexa.minecraft.launch.write |
| Legal phases | Active |
| Idempotency | RequiredKey |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Instance | EntityId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
Profile | LaunchProfile | Structured LaunchProfile value; follow its linked field contract. |
ExpectedRevision | Revision | Revision 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 4 |
| Kind | Mutation |
| Permission | nexa.minecraft.launch.write |
| Legal phases | Active |
| Idempotency | RequiredKey |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Instance | EntityId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
Profile | EntityId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
ExpectedRevision | Revision | Revision 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 5 |
| Kind | Query |
| Permission | nexa.minecraft.launch.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Instance | EntityId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
Grant | LaunchGrant | Structured LaunchGrant value; follow its linked field contract. |
Profile | EntityId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
Target | LaunchTarget? | 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 6 |
| Kind | Query |
| Permission | nexa.minecraft.launch.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Id | EntityId | Identity 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 7 |
| Kind | Query |
| Permission | nexa.minecraft.launch.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Plan | EntityId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
ExpectedRevision | Revision | Revision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target. |
ConfirmationToken | string? | 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 8 |
| Kind | Operation |
| Permission | nexa.minecraft.launch.write |
| Legal phases | Active |
| Idempotency | RequiredKey |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Plan | EntityId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
ExpectedRevision | Revision | Revision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target. |
ConfirmationToken | string? | 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 9 |
| Kind | Mutation |
| Permission | nexa.minecraft.launch.write |
| Legal phases | Active |
| Idempotency | RequiredKey |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Operation | EntityId | Identity 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 10 |
| Kind | Registration |
| Permission | nexa.minecraft.launch.write |
| Legal phases | Initialize |
| Idempotency | RequiredKey |
| Host status | Mapped 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
| Field | Type | Meaning |
|---|---|---|
Id | QualifiedId | Identity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path. |
Fields | string[] | 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. |
Handler | ulong | Callback identifier registered by this plugin. A handler alone is not a public action or provider registration. |
Required | bool | Domain 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 11 |
| Kind | Registration |
| Permission | nexa.minecraft.launch.write |
| Legal phases | Initialize |
| Idempotency | RequiredKey |
| Host status | Mapped 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
| Field | Type | Meaning |
|---|---|---|
Id | QualifiedId | Identity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path. |
Fields | string[] | 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. |
Handler | ulong | Callback identifier registered by this plugin. A handler alone is not a public action or provider registration. |
Required | bool | Domain 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 12 |
| Kind | Query |
| Permission | nexa.minecraft.launch.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Id | EntityId | Identity 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 13 |
| Kind | Subscription |
| Permission | nexa.minecraft.launch.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped in recorded snapshot |
Request fields
| Field | Type | Meaning |
|---|---|---|
Target | EntityId | Identity or revision in this model’s domain; preserve ownership and exact spelling. |
Cursor | string? | 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. |
Schema | SchemaRef | Exact 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):
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
| Property | Contract |
|---|---|
| Local SDK method ID | 14 |
| Kind | Query |
| Permission | nexa.minecraft.launch.read |
| Legal phases | Initialize, PostInitialize, Checkup, Finalize, Active |
| Idempotency | ReadOnly |
| Host status | Mapped 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
| Field | Type | Meaning |
|---|---|---|
Id | EntityId | Identity 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):
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.