Events
This section describes the events that can be hooked through Context.Events.
Last updated
This section describes the events that can be hooked through Context.Events.
Last updated
You will generally be Registering tasks in the Start method of the task class. You will also generally want to unregister them in Stop method, otherwise the plugin may not stop execution.
Called each client tick, which is around 50ms. ITickListener uses this.
Called when the bot receives a chat message from the server. This also includes middle of the screen titles and above the hotbar messages. The type of message (chat, screen, above hotbar) can be determined by the position variable.
Called once the bot is disconnected from the server.
Called once the player joins the game. It is important to note that this will most likely run only if the plugin is enabled before the bot is started.
Called once the player spawns into the game. This usually signifies that the bot's entity has been spawned by the server and is visible by other players.
Called once the bot's health or hunger is updated by the server. It is important to note that this is also for hunger changes as well, while the name suggest that it's only for health updates.
Called when the bot's health drops to 0, which signifies that it has died.
Called when the bot starts starving, which is when it reaches 0 food.
Called once a block in the world changes.
Called once a chunk is loaded/reloaded.
Called once this bot is moved by the server. This will not be triggered when the bot moves it self.
Called once an slot gets set or updated. This will also usually trigger when a new container is opened, as the server updates each slot of the container window.
Called once the bot's sprint state gets updated.
Called once the world is fully reloaded, which is generally when respawning or teleporting.
Called when the server sends an entity attached packet (e.g.: player sits in a minecart). Note: This is only supported for 1.8.*
Called when the server sends a resource pack URL and hash to the client.
Called when the server updates the bot's experience
Called before the player update, allows you to cancel all physics.
Called once the server set's an entities velocity,
Called once an object spawns.
Called once an Entity receives an effect.
Called once an explosion occurs.
Events
onTick
onChat
onDisconnected
onGameJoined
onSpawned
onWorldReload
onHealthUpdate
onDeath
onStartedStarving
onBlockChanged
onChunkLoaded
onPlayerMoved
onInventoryChanged
onSprintingChanged
onExplosion
onEntityEffectAdded
onObjectSpawned
onEntityVelocity
onPlayerUpdate
onExperienceChanged
onResourcePackReceived
onEntityAttached