Skip to content

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

Minecraft.Processes ​

Observe game sessions owned by the launcher and request session lifecycle actions. A session ID is not a raw operating-system PID.

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

Typical sequence ​

List sessions, read a selected session, and subscribe to bounded log or metric updates. Use RequestClose for the supported graceful path; Stop has separate termination semantics.

Behavior and limits ​

Missing metrics are not measured zero. A log subscription can lose history; use the supported range read and gap handling. Closing a launcher view must not imply killing a game session.

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

ListSessions · ReadSession · WatchSession · SubscribeLog · ReadLogRange · RequestClose · Stop · RevealWindow · ReadMetrics

ListSessions ​

PageRequest → Page<GameSession> (wrapper, item)

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

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

ReadSession ​

EntityRequest → GameSession

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

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

WatchSession ​

WatchRequest → SubscriptionRef

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

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

SubscribeLog ​

LogRangeRequest → SubscriptionRef

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

Request fields

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

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

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

ReadLogRange ​

LogRangeRequest → LogChunk

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

Request fields

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

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

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

RequestClose ​

EntityRequest → OperationRef

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

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

Stop ​

EntityRequest → OperationRef

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

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

RevealWindow ​

EntityRequest → Empty

PropertyContract
Local SDK method ID8
KindMutation
Permissionnexa.minecraft.processes.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

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

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

ReadMetrics ​

EntityRequest → SessionMetrics

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

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