Class BotServiceImpl
java.lang.Object
com.soulfiremc.grpc.generated.BotServiceGrpc.BotServiceImplBase
com.soulfiremc.server.grpc.BotServiceImpl
- All Implemented Interfaces:
BotServiceGrpc.AsyncService, io.grpc.BindableService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclickContainerButton(BotContainerButtonClickRequest request, io.grpc.stub.StreamObserver<BotContainerButtonClickResponse> responseObserver) Clicks a container-specific action button.voidclickDialogButton(BotClickDialogButtonRequest request, io.grpc.stub.StreamObserver<BotClickDialogButtonResponse> responseObserver) Clicks a button in the current dialog.voidclickInventorySlot(BotInventoryClickRequest request, io.grpc.stub.StreamObserver<BotInventoryClickResponse> responseObserver) Performs a click action on an inventory/container slot.voidcloseContainer(BotCloseContainerRequest request, io.grpc.stub.StreamObserver<BotCloseContainerResponse> responseObserver) Closes the currently open container (chest, crafting table, etc.).voidcloseDialog(BotCloseDialogRequest request, io.grpc.stub.StreamObserver<BotCloseDialogResponse> responseObserver) Closes/dismisses the current dialog.voidgetBotInfo(BotInfoRequest request, io.grpc.stub.StreamObserver<BotInfoResponse> responseObserver) Returns detailed information about a specific bot.voidgetBotList(BotListRequest request, io.grpc.stub.StreamObserver<BotListResponse> responseObserver) Returns a list of all bots configured in the specified instance.voidgetDialog(BotGetDialogRequest request, io.grpc.stub.StreamObserver<BotGetDialogResponse> responseObserver) Returns the currently displayed server dialog (Minecraft 1.21.6+).voidgetInventoryState(BotInventoryStateRequest request, io.grpc.stub.StreamObserver<BotInventoryStateResponse> responseObserver) Returns the current state of the bot's open container/inventory.voidmouseClick(BotMouseClickRequest request, io.grpc.stub.StreamObserver<BotMouseClickResponse> responseObserver) Simulates a mouse click in the game world.voidopenInventory(BotOpenInventoryRequest request, io.grpc.stub.StreamObserver<BotOpenInventoryResponse> responseObserver) Opens the player's inventory screen.voidrenderBotPov(BotRenderPovRequest request, io.grpc.stub.StreamObserver<BotRenderPovResponse> responseObserver) Renders the bot's point-of-view as a PNG image using software rendering.voidresetMovement(BotResetMovementRequest request, io.grpc.stub.StreamObserver<BotResetMovementResponse> responseObserver) Resets all movement to stopped state.voidsetContainerText(BotSetContainerTextRequest request, io.grpc.stub.StreamObserver<BotSetContainerTextResponse> responseObserver) Sets text in a container's text input field.voidsetHotbarSlot(BotSetHotbarSlotRequest request, io.grpc.stub.StreamObserver<BotSetHotbarSlotResponse> responseObserver) Changes the selected hotbar slot.voidsetMovementState(BotSetMovementStateRequest request, io.grpc.stub.StreamObserver<BotSetMovementStateResponse> responseObserver) Updates the bot's movement state (WASD, jump, sneak, sprint).voidsetRotation(BotSetRotationRequest request, io.grpc.stub.StreamObserver<BotSetRotationResponse> responseObserver) Sets the bot's view rotation (look direction).voidsubmitDialog(BotSubmitDialogRequest request, io.grpc.stub.StreamObserver<BotSubmitDialogResponse> responseObserver) Submits a dialog with input values.voidupdateBotConfigEntry(BotUpdateConfigEntryRequest request, io.grpc.stub.StreamObserver<BotUpdateConfigEntryResponse> responseObserver) Updates a single configuration entry for a specific bot.Methods inherited from class BotServiceGrpc.BotServiceImplBase
bindService
-
Constructor Details
-
BotServiceImpl
-
-
Method Details
-
updateBotConfigEntry
public void updateBotConfigEntry(BotUpdateConfigEntryRequest request, io.grpc.stub.StreamObserver<BotUpdateConfigEntryResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceUpdates a single configuration entry for a specific bot. The configuration is persisted to the database immediately. Requires UPDATE_BOT_CONFIG permission.
-
getBotList
public void getBotList(BotListRequest request, io.grpc.stub.StreamObserver<BotListResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceReturns a list of all bots configured in the specified instance. Includes both online and offline bots with their current status. For online bots, includes live state (position, health, etc.) but NOT full inventory data. Requires READ_BOT_INFO permission.
-
getBotInfo
public void getBotInfo(BotInfoRequest request, io.grpc.stub.StreamObserver<BotInfoResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceReturns detailed information about a specific bot. Includes full live state with complete inventory data when the bot is online. Requires READ_BOT_INFO permission.
-
renderBotPov
public void renderBotPov(BotRenderPovRequest request, io.grpc.stub.StreamObserver<BotRenderPovResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceRenders the bot's point-of-view as a PNG image using software rendering. The bot must be online with a valid player and level. Uses the bot's current render distance setting. Requires READ_BOT_INFO permission.
-
clickInventorySlot
public void clickInventorySlot(BotInventoryClickRequest request, io.grpc.stub.StreamObserver<BotInventoryClickResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServicePerforms a click action on an inventory/container slot. Supports various click types (left, right, shift, drop, swap, middle). The bot must be online with a valid player and gameMode. Requires UPDATE_BOT_CONFIG permission.
-
getInventoryState
public void getInventoryState(BotInventoryStateRequest request, io.grpc.stub.StreamObserver<BotInventoryStateResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceReturns the current state of the bot's open container/inventory. Includes layout information, slot contents, and carried item. The bot must be online with a valid player. Requires READ_BOT_INFO permission.
-
closeContainer
public void closeContainer(BotCloseContainerRequest request, io.grpc.stub.StreamObserver<BotCloseContainerResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceCloses the currently open container (chest, crafting table, etc.). Returns to the player inventory view. The bot must be online with a valid player. Requires UPDATE_BOT_CONFIG permission.
-
openInventory
public void openInventory(BotOpenInventoryRequest request, io.grpc.stub.StreamObserver<BotOpenInventoryResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceOpens the player's inventory screen. Sends a packet to the server to display the inventory UI. The bot must be online with a valid player. Requires UPDATE_BOT_CONFIG permission.
-
mouseClick
public void mouseClick(BotMouseClickRequest request, io.grpc.stub.StreamObserver<BotMouseClickResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceSimulates a mouse click in the game world. Left click: attack entity or start breaking block. Right click: use item or interact with entity/block. The bot must be online with valid player, level, and gameMode. Requires UPDATE_BOT_CONFIG permission.
-
clickContainerButton
public void clickContainerButton(BotContainerButtonClickRequest request, io.grpc.stub.StreamObserver<BotContainerButtonClickResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceClicks a container-specific action button. Used for: stonecutter recipes, enchanting, loom patterns, villager trades, beacon effects, crafter slot toggles, lectern page navigation. The action is queued and executed on the next game tick. Requires UPDATE_BOT_CONFIG permission.
-
setContainerText
public void setContainerText(BotSetContainerTextRequest request, io.grpc.stub.StreamObserver<BotSetContainerTextResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceSets text in a container's text input field. Currently only supports anvil item renaming (field_id: "item_name"). The action is queued and executed on the next game tick. Requires UPDATE_BOT_CONFIG permission.
-
getDialog
public void getDialog(BotGetDialogRequest request, io.grpc.stub.StreamObserver<BotGetDialogResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceReturns the currently displayed server dialog (Minecraft 1.21.6+). Dialogs are server-sent UI screens for custom interactions. Returns empty response if no dialog is being shown. Does not require the bot to be online (but dialog will be absent). Requires READ_BOT_INFO permission.
-
submitDialog
public void submitDialog(BotSubmitDialogRequest request, io.grpc.stub.StreamObserver<BotSubmitDialogResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceSubmits a dialog with input values. Used for dialogs containing text fields, checkboxes, dropdowns, or sliders. The dialog is closed after submission. Note: Full dialog response packets are not yet implemented; this clears local state. Requires UPDATE_BOT_CONFIG permission.
-
clickDialogButton
public void clickDialogButton(BotClickDialogButtonRequest request, io.grpc.stub.StreamObserver<BotClickDialogButtonResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceClicks a button in the current dialog. Button index depends on dialog type (see BotClickDialogButtonRequest). The dialog is typically closed after the button click. Note: Full dialog button packets are not yet implemented; this clears local state. Requires UPDATE_BOT_CONFIG permission.
-
closeDialog
public void closeDialog(BotCloseDialogRequest request, io.grpc.stub.StreamObserver<BotCloseDialogResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceCloses/dismisses the current dialog. Clears the local dialog state. Requires UPDATE_BOT_CONFIG permission.
-
setHotbarSlot
public void setHotbarSlot(BotSetHotbarSlotRequest request, io.grpc.stub.StreamObserver<BotSetHotbarSlotResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceChanges the selected hotbar slot. Valid slot range: 0-8 (corresponding to slots 1-9 in the UI). The action is queued and executed on the next game tick. Requires UPDATE_BOT_CONFIG permission.
-
setMovementState
public void setMovementState(BotSetMovementStateRequest request, io.grpc.stub.StreamObserver<BotSetMovementStateResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceUpdates the bot's movement state (WASD, jump, sneak, sprint). Only specified fields are changed; omitted fields retain their current value. Movement persists until explicitly changed or reset. The action is queued and executed on the next game tick. Requires UPDATE_BOT_CONFIG permission.
-
resetMovement
public void resetMovement(BotResetMovementRequest request, io.grpc.stub.StreamObserver<BotResetMovementResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceResets all movement to stopped state. Equivalent to releasing all movement keys. The action is queued and executed on the next game tick. Requires UPDATE_BOT_CONFIG permission.
-
setRotation
public void setRotation(BotSetRotationRequest request, io.grpc.stub.StreamObserver<BotSetRotationResponse> responseObserver) Description copied from interface:BotServiceGrpc.AsyncServiceSets the bot's view rotation (look direction). Yaw is normalized to -180 to 180, pitch is clamped to -90 to 90. The action is queued and executed on the next game tick. Requires UPDATE_BOT_CONFIG permission.
-