Skip to content

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

Minecraft.Content ​

Inspect and change instance content with dependency-aware plans and transaction records. A content item belongs to a specific instance and content domain.

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

Typical sequence ​

Build the relevant install/enable/disable/remove/update plan, inspect the preview and execute its exact identity/revision. Read the operation and transaction records before offering rollback.

Behavior and limits ​

Rollback is a reviewed domain operation, not arbitrary file reversal. Import/export supports an explicit format allowlist. Trash clearing and custom format providers remain unavailable where marked.

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

List · Inspect · Watch · ReadDependencyGraph · PlanInstall · PlanEnable · PlanDisable · PlanRemove · PlanUpdate · Preview · Execute · ListTransactions · Rollback · ReadIntegrity · Verify · ListTrash · RestoreTrash · ClearTrash · Import · Export · RegisterFormatProvider · PreviewClearTrash · InspectWithProvider

List ​

ContentQuery → Page<ContentItem> (wrapper, item)

PropertyContract
Local SDK method ID1
KindQuery
Permissionnexa.minecraft.content.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.
KindQualifiedId?Identity or revision in this model’s domain; preserve ownership and exact spelling. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
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_Content_List(&reply, request, &options);

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

Inspect ​

EntityRequest → ContentItem

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

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

Watch ​

WatchRequest → SubscriptionRef

PropertyContract
Local SDK method ID3
KindSubscription
Permissionnexa.minecraft.content.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_Content_Watch(&reply, request, &options);

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

ReadDependencyGraph ​

EntityRequest → ContentDependencyGraph

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

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

PlanInstall ​

ContentChangeRequest → ContentPlan

PropertyContract
Local SDK method ID5
KindQuery
Permissionnexa.minecraft.content.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.
ItemsEntityId[]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.
VersionsResourceVersionRef[]Structured ResourceVersionRef value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
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. 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_Content_PlanInstall(&reply, request, &options);

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

PlanEnable ​

ContentChangeRequest → ContentPlan

PropertyContract
Local SDK method ID6
KindQuery
Permissionnexa.minecraft.content.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.
ItemsEntityId[]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.
VersionsResourceVersionRef[]Structured ResourceVersionRef value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
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. 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_Content_PlanEnable(&reply, request, &options);

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

PlanDisable ​

ContentChangeRequest → ContentPlan

PropertyContract
Local SDK method ID7
KindQuery
Permissionnexa.minecraft.content.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.
ItemsEntityId[]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.
VersionsResourceVersionRef[]Structured ResourceVersionRef value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
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. 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_Content_PlanDisable(&reply, request, &options);

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

PlanRemove ​

ContentChangeRequest → ContentPlan

PropertyContract
Local SDK method ID8
KindQuery
Permissionnexa.minecraft.content.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.
ItemsEntityId[]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.
VersionsResourceVersionRef[]Structured ResourceVersionRef value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
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. 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_Content_PlanRemove(&reply, request, &options);

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

PlanUpdate ​

ContentChangeRequest → ContentPlan

PropertyContract
Local SDK method ID9
KindQuery
Permissionnexa.minecraft.content.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.
ItemsEntityId[]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.
VersionsResourceVersionRef[]Structured ResourceVersionRef value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
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. 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_Content_PlanUpdate(&reply, request, &options);

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

Preview ​

EntityRequest → ContentPlan

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

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

Execute ​

PlanRequest → OperationRef

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

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

ListTransactions ​

EntityRequest → Page<ContentTransaction> (wrapper, item)

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

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

Rollback ​

PlanRequest → OperationRef

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

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

ReadIntegrity ​

EntityRequest → IntegrityReport

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

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

Verify ​

EntityRequest → OperationRef

PropertyContract
Local SDK method ID15
KindOperation
Permissionnexa.minecraft.content.write
Legal phasesActive
IdempotencyRequiredKey
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

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

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

ListTrash ​

EntityRequest → Page<ContentItem> (wrapper, item)

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

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

RestoreTrash ​

ContentChangeRequest → OperationRef

PropertyContract
Local SDK method ID17
KindOperation
Permissionnexa.minecraft.content.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.
ItemsEntityId[]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.
VersionsResourceVersionRef[]Structured ResourceVersionRef value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.

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

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

ClearTrash ​

PlanRequest → OperationRef

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

Consume the plan returned by PreviewClearTrash after Host confirmation. This permanently removes the recognized trash entries included in the plan. It does not accept an instance ID in place of a plan, and it cannot clear newly added trash without another preview.

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

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

Import ​

ContentTransfer → OperationRef

PropertyContract
Local SDK method ID19
KindOperation
Permissionnexa.minecraft.content.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.
FileFileRefStructured FileRef value; follow its linked field contract.
FormatQualifiedIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
SelectionEntityId[]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.

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

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

Export ​

ContentTransfer → OperationRef

PropertyContract
Local SDK method ID20
KindOperation
Permissionnexa.minecraft.content.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.
FileFileRefStructured FileRef value; follow its linked field contract.
FormatQualifiedIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
SelectionEntityId[]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.

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

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

RegisterFormatProvider ​

ProviderDescriptor → RegistrationRef

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

Register kind nexa:content/format with Inspect: ContentInspectionInput → ContentInspection. InspectWithProvider reads an explicitly granted file and passes only its name and at most 64 KiB of bytes. The callback receives no filesystem path. Its properties and issues are bounded and schema-checked; this API does not restore the removed built-in NBT viewer.

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

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

PreviewClearTrash ​

EntityRequest → MutationPlan

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

Prepare a plan bound to the admitted instance and exact recognized trash IDs. The owner rejects a changed set, a running game, linked entries, more than 1,000 trash directories, more than 32,768 tree entries or depth above 64 before deleting any selected record.

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

Retain the exact plan ID and revision, review its bound inputs and confirmation requirement, then use the corresponding commit operation.

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

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

InspectWithProvider ​

ContentInspectionRequest → ContentInspection

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

Use a published format provider to inspect a caller-owned user-file grant. Directories and files over 64 KiB are rejected. The Host compares file revisions before and after the callback, permits at most 256 distinct named properties and 128 issues, and returns the typed result. Package-file access uses the separate verified-package API.

Request fields

FieldTypeMeaning
ProviderQualifiedIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
FileFileRefStructured FileRef value; follow its linked field contract.

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

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