Skip to content

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

Minecraft.Install ​

Resolve an installation draft into an explicit plan and execute it through the launcher’s installer. Draft edits, plan validation and execution are separate steps.

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

Typical sequence ​

List compatible game/loader versions, update and validate the draft, resolve its plan, review it, then execute that plan. Monitor the returned operation for actual completion.

Behavior and limits ​

An accepted execution request does not prove all files installed. Recovery and custom loader/template registration remain unavailable where marked; do not fabricate recovery records.

The recorded Host maps 15 of 15 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 ​

ListGameVersions · ListLoaderVersions · InspectLocalInstaller · ReadDraft · UpdateDraft · ValidateDraft · ResolvePlan · PreviewPlan · ExecutePlan · Cancel · ListRecoveries · ResumeRecovery · DiscardRecovery · RegisterTemplate · RegisterLoaderProvider

ListGameVersions ​

PageRequest → Page<GameVersion> (wrapper, item)

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

Request fields

FieldTypeMeaning
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.
LimitlongRequested bound on returned items. The Host may impose a smaller domain-specific limit.

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_Install_ListGameVersions(&reply, request, &options);

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

ListLoaderVersions ​

LoaderVersionRequest → Page<LoaderVersion> (wrapper, item)

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

Request fields

FieldTypeMeaning
LoaderQualifiedIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
GameVersionstringDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
PagePageRequestStructured PageRequest value; follow its linked field contract.

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_Install_ListLoaderVersions(&reply, request, &options);

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

InspectLocalInstaller ​

FileRef → InstallerInspection

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

Request fields

FieldTypeMeaning
TokenGuidOpaque Host-issued handle token. Keep it with its owner and resource type.
LoadInstanceIdGuidIdentity of the admitted load that owns this handle; it is not portable to a replacement load.
ScopestringExplicit target scope. The Host checks that the caller is authorized for it.

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_Install_InspectLocalInstaller(&reply, request, &options);

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

ReadDraft ​

EntityRequest → InstallDraft

PropertyContract
Local SDK method ID4
KindQuery
Permissionnexa.minecraft.install.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_Install_ReadDraft(&reply, request, &options);

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

UpdateDraft ​

InstallDraftUpdate → InstallDraft

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

Request fields

FieldTypeMeaning
DraftInstallDraftStructured InstallDraft 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_Install_UpdateDraft(&reply, request, &options);

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

ValidateDraft ​

InstallDraft → ValidationReport

PropertyContract
Local SDK method ID6
KindQuery
Permissionnexa.minecraft.install.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.
InstanceEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
GameVersionstringDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
LoadersLoaderVersion[]Structured LoaderVersion value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
OptionalFilesResourceVersionRef[]Structured ResourceVersionRef value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
RevisionRevisionOpaque version token issued by the owner. Do not increment it or substitute another object’s revision.

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_Install_ValidateDraft(&reply, request, &options);

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

ResolvePlan ​

InstallDraft → InstallPlan

PropertyContract
Local SDK method ID7
KindQuery
Permissionnexa.minecraft.install.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.
InstanceEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
GameVersionstringDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
LoadersLoaderVersion[]Structured LoaderVersion value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
OptionalFilesResourceVersionRef[]Structured ResourceVersionRef value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
RevisionRevisionOpaque version token issued by the owner. Do not increment it or substitute another object’s revision.

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_Install_ResolvePlan(&reply, request, &options);

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

PreviewPlan ​

EntityRequest → InstallPlan

PropertyContract
Local SDK method ID8
KindQuery
Permissionnexa.minecraft.install.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_Install_PreviewPlan(&reply, request, &options);

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

ExecutePlan ​

PlanRequest → OperationRef

PropertyContract
Local SDK method ID9
KindOperation
Permissionnexa.minecraft.install.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_Install_ExecutePlan(&reply, request, &options);

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

Cancel ​

OperationRequest → OperationRef

PropertyContract
Local SDK method ID10
KindMutation
Permissionnexa.minecraft.install.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_Install_Cancel(&reply, request, &options);

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

ListRecoveries ​

PageRequest → Page<RecoveryRecord> (wrapper, item)

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

List authenticated pending new-install, modification and modpack journals under registered game roots. Completed, rolled-back and dismissed journals are omitted. Handles bind the caller, root, journal and revision. RecoveryRecord.Operation is an opaque native-task correlation ID, not a Tasks.Read handle. At most 64 roots, 4,096 journal directories and 256 pending records are admitted.

Request fields

FieldTypeMeaning
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.
LimitlongRequested bound on returned items. The Host may impose a smaller domain-specific limit.

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_Install_ListRecoveries(&reply, request, &options);

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

ResumeRecovery ​

EntityRequest → OperationRef

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

Confirm and resume the exact listed journal using the owner’s existing authenticated recovery pipeline. Rollback-requested journals continue rollback. Re-list after a revision conflict. The returned Tasks operation tracks this resume attempt and returns Empty on completion; it is distinct from RecoveryRecord.Operation.

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

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_Install_ResumeRecovery(&reply, request, &options);

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

DiscardRecovery ​

EntityRequest → Empty

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

Confirm dismissal of the listed journal. Existing and staged files are retained; dismissal removes the pending recovery offer. The owner rejects unfinished rollback and stale records. This operation does not delete an installed instance.

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

There is no result payload beyond the encoded Empty model. Check Success; an empty failure value is not successful 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_Install_DiscardRecovery(&reply, request, &options);

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

RegisterTemplate ​

InstallTemplate → RegistrationRef

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

Stage an owned template during Initialize. Workflow must name a workflow owned by the same load with InstallTemplateInvocation input and Empty output. The template declares a game version, supported built-in loaders and desired content. Instances.PrepareCreate consumes its ID; the workflow performs the installation through authorized Host APIs. Registration alone installs nothing. See the installation guide for workflow responsibilities.

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.
GameVersionstringDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
LoadersQualifiedId[]Identity or revision in this model’s domain; preserve ownership and exact spelling. A bounded collection; do not assume an unbounded result or unspecified ordering.
ContentResourceVersionRef[]Structured ResourceVersionRef value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
WorkflowQualifiedIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.

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_Install_RegisterTemplate(&reply, request, &options);

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

RegisterLoaderProvider ​

ProviderDescriptor → RegistrationRef

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

Register kind nexa:install/loader-catalog with method ListVersions: LoaderVersionRequest → Page<LoaderVersion>. Consumers pass the provider ID as Loader in ListLoaderVersions. Returned items must use a supported built-in loader family and the requested game version. The Host wraps pagination and feeds the selections to its existing installer; this does not authorize an arbitrary executable installer.

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.
KindQualifiedIdHost-supported provider family. Registration succeeds only for a mapped family.
ContractVersionulongProvider contract version; current catalog read-provider callbacks use 100.
SchemaHashstringDigest of the provider callback envelope schema; current catalog read providers use BusinessProviderCall.
DisplayNameLocalizedTextUser-facing localized label; it is not an authority-bearing identity.
Capabilitiesstring[]Exact capabilities advertised or required by this descriptor, subject to the Host’s accepted table. A bounded collection; do not assume an unbounded result or unspecified ordering.
SupportedScopesstring[]Scopes the provider declares it can handle; declaration does not authorize every target. A bounded collection; do not assume an unbounded result or unspecified ordering.
SelectionSelectionPolicySelection rule; the current catalog callback boundary supports ExplicitRequest.
ConcurrencyConcurrencyPolicyDeclared execution policy. A provider family may reject enum members whose semantics it does not implement.
DeadlineMillisecondslongRequested deadline in milliseconds; queue time consumes this budget and caller deadlines can shorten it.
FailurePolicyProviderFailurePolicyHow this provider family reports callback failures; it does not automatically make retries safe.
ConfigurationSchemaRefSchema for provider configuration, not arbitrary executable Host configuration.
HandlerulongCallback identifier registered by this plugin. A handler alone is not a public action or provider registration.

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_Install_RegisterLoaderProvider(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Install_RegisterLoaderProvider_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.