Package nl.pim16aap2.lightkeeper.protocol
package nl.pim16aap2.lightkeeper.protocol
Agent protocol command types.
Contains the sealed IAgentCommand interface and one typed record per
protocol action. The IAgentResponse and
AgentErrorCode types for the response side live here too.
Commands are ordinary typed records and use the shared wire mapper for polymorphic round trips:
ObjectMapper mapper = AgentProtocolMapper.create();
IAgentCommand<?> command = new MainWorld.Command("request-1");
String json = mapper.writeValueAsString(command);
IAgentCommand<?> decoded = mapper.readValue(json, IAgentCommand.class);
See IAgentCommand for the complete registration recipe when adding
a protocol action.
-
ClassDescriptionCanonical agent protocol error codes.Thrown by agent request handlers to signal a structured protocol-level failure.Creates consistently configured JSON mappers for both endpoints of the LightKeeper agent wire protocol.Requests the namespaced material key of the block at the given position.Command record for
BLOCK_TYPE.Response record forBLOCK_TYPE.Arms deterministic cancellation of the next N fired events of a class.Command record forCANCEL_NEXT_EVENTS.Response record forCANCEL_NEXT_EVENTS.Clears the captured event buffer for the given class.Command record forCLEAR_CAPTURED_EVENTS.Response record forCLEAR_CAPTURED_EVENTS.Discards all server errors captured by the agent's log appender and resets its dropped-entry counter.Command record forCLEAR_SERVER_ERRORS.Response record forCLEAR_SERVER_ERRORS.Simulates a click on the given inventory slot.Command record forCLICK_MENU_SLOT.Response record forCLICK_MENU_SLOT.Identifies the actor that executes a server-side command.Spawns a synthetic player on the server.Command record forCREATE_PLAYER.Response record forCREATE_PLAYER.Simulates an inventory drag placing the given material into the specified slots.Command record forDRAG_MENU_SLOTS.Response record forDRAG_MENU_SLOTS.Drops the player's main-hand item into the world.Command record forDROP_ITEM.Response record forDROP_ITEM.Outcome of a main-hand item drop, distinguishing the two reasons a drop can fail to materialize.Executes a server-side command as the console.Command record forEXECUTE_COMMAND.Response record forEXECUTE_COMMAND.Executes a command as the given synthetic player.Command record forEXECUTE_PLAYER_COMMAND.Response record forEXECUTE_PLAYER_COMMAND.Returns all captured events of the given class as typed property snapshots.A single captured event instance: its typed property values plus the server tick it fired on.Command record forGET_CAPTURED_EVENTS.Response record forGET_CAPTURED_EVENTS.Returns a snapshot of the inventory menu currently open for the player, or an empty response if none.Command record forGET_OPEN_MENU.Response record forGET_OPEN_MENU.Returns accumulated chat component JSON strings received by the player via NMS packets.Command record forGET_PLAYER_CHAT_COMPONENTS.Response record forGET_PLAYER_CHAT_COMPONENTS.Returns a JSON snapshot of the player's non-air inventory slots.Command record forGET_PLAYER_INVENTORY.Response record forGET_PLAYER_INVENTORY.Returns all accumulated plain-text messages received by the player.Command record forGET_PLAYER_MESSAGES.Response record forGET_PLAYER_MESSAGES.Returns all server errors and warnings captured by the agent's log appender since agent load or the lastCLEAR_SERVER_ERRORS.Command record forGET_SERVER_ERRORS.Response record forGET_SERVER_ERRORS.Requests the server platform identifier (PAPER, SPIGOT, or UNKNOWN).Command record forGET_SERVER_PLATFORM.Response record forGET_SERVER_PLATFORM.Retrieves a list of plugins installed on the server.Command record forGET_SERVER_PLUGINSResponse record forGET_SERVER_PLUGINS.Requests the current server tick counter.Command record forGET_SERVER_TICK.Response record forGET_SERVER_TICK.Initial connection handshake.Command record forHANDSHAKE.Response record forHANDSHAKE.Queries the live value of a permission node for a synthetic player.Command record forHAS_PLAYER_PERMISSION.Response record forHAS_PLAYER_PERMISSION.IAgentCommand<R extends IAgentResponse>Sealed command hierarchy for the LightKeeper agent protocol.Sealed response hierarchy for the LightKeeper agent protocol.Typed wire envelope for structured payload values.A boolean value.A marker for a value the encoder could not represent — the fail-loud replacement for silently skipping it.An enum constant.An ordered list of values.A numeric value.A nested structured value: named fields, insertion-ordered.A reference to an identifiable object (e.g. an entity by UUID or a world by name) rather than its contents.A text value.A UUID value.Double-precision position coordinates.Checks whether a chunk is currently loaded.Command record forIS_CHUNK_LOADED.Response record forIS_CHUNK_LOADED.Typed snapshot of a single non-air inventory or menu slot, carried directly inside protocol responses instead of a pre-serialized JSON string.Selects how a synthetic player is placed onto the server byCreatePlayer.Command.Simulates the player left-clicking a block.Command record forLEFT_CLICK_BLOCK.Response record forLEFT_CLICK_BLOCK.Forces a chunk to load.Command record forLOAD_CHUNK.Response record forLOAD_CHUNK.Requests the name of the main server world.Command record forMAIN_WORLD.Response record forMAIN_WORLD.Mutates a single permission node on a synthetic player's LightKeeper-managed permission attachment.Command record forMUTATE_PLAYER_PERMISSION.The kind of mutation to apply to the permission node.Response record forMUTATE_PLAYER_PERMISSION.Creates a new world on the server.Command record forNEW_WORLD.Response record forNEW_WORLD.Sets the block at the given position in the player's current world without firing aBlockPlaceEvent.Command record forPLACE_PLAYER_BLOCK.Response record forPLACE_PLAYER_BLOCK.Makes a synthetic player say a chat message, firing the real chat event.Command record forPLAYER_CHAT.Response record forPLAYER_CHAT.Validation helpers for protocol command compact constructors.Queries entities in a world, optionally filtered by type and spatial bounds.Command record forQUERY_ENTITIES.A single entity's state, read in the same main-thread burst as its siblings.Response record forQUERY_ENTITIES.A display entity's transformation.Registers a dynamic Bukkit event listener that captures events of the given class.Command record forREGISTER_EVENT_LISTENER.Response record forREGISTER_EVENT_LISTENER.Despawns and removes a synthetic player.Command record forREMOVE_PLAYER.Response record forREMOVE_PLAYER.Simulates the player right-clicking a block.Command record forRIGHT_CLICK_BLOCK.Response record forRIGHT_CLICK_BLOCK.Typed snapshot of a single captured server error or warning, carried directly inside protocol responses.Represents a snapshot of a plugin on the server.Sets the block at the given position.Command record forSET_BLOCK.Response record forSET_BLOCK.Computes command tab-completions as the given synthetic player.Command record forTAB_COMPLETE_PLAYER.Response record forTAB_COMPLETE_PLAYER.Teleports a synthetic player to the given location.Command record forTELEPORT_PLAYER.Response record forTELEPORT_PLAYER.Requests a chunk to be unloaded.Command record forUNLOAD_CHUNK.Response record forUNLOAD_CHUNK.Unregisters the dynamic event listener for the given class.Command record forUNREGISTER_EVENT_LISTENER.Response record forUNREGISTER_EVENT_LISTENER.Waits for the given number of server ticks before responding.Command record forWAIT_TICKS.Response record forWAIT_TICKS.