Class PlayerChunkUnloadEvent

java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.player.PlayerChunkUnloadEvent

public class PlayerChunkUnloadEvent
extends Event
Called after a chunk being unload to a certain player.

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

  • Constructor Summary

    Constructors 
    Constructor Description
    PlayerChunkUnloadEvent​(Player player, int chunkX, int chunkZ)  
  • Method Summary

    Modifier and Type Method Description
    int getChunkX()
    Gets the chunk X.
    int getChunkZ()
    Gets the chunk Z.
    Player getPlayer()
    Gets the player.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getPlayer

      @NotNull public Player getPlayer()
      Gets the player.
      Returns:
      the player
    • getChunkX

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

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