Class PlayerChunkUnloadEvent

java.lang.Object
net.minestom.server.event.player.PlayerChunkUnloadEvent
All Implemented Interfaces:
Event, EntityEvent, EntityInstanceEvent, InstanceEvent, PlayerEvent, PlayerInstanceEvent

public class PlayerChunkUnloadEvent extends Object implements PlayerInstanceEvent
Called after a chunk being unload to a certain player.

Could be used to unload the chunk internally in order to save memory.

  • Constructor Details

    • PlayerChunkUnloadEvent

      public PlayerChunkUnloadEvent(@NotNull @NotNull Player player, int chunkX, int chunkZ)
  • Method Details

    • getChunkX

      public int getChunkX()
      Gets the chunk X.
      Returns:
      the chunk X
    • getChunkZ

      public int getChunkZ()
      Gets the chunk Z.
      Returns:
      the chunk Z
    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Description copied from interface: PlayerEvent
      Gets the player.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player