Class ChunkUpdateLimitChecker

java.lang.Object
net.minestom.server.utils.chunk.ChunkUpdateLimitChecker

@Internal public final class ChunkUpdateLimitChecker extends Object
Allows to limit operations with recently operated chunks

historySize defines how many last chunks will be remembered to skip operations with them via addToHistory(Chunk) returning false

  • Constructor Details Link icon

    • ChunkUpdateLimitChecker Link icon

      public ChunkUpdateLimitChecker(int historySize)
  • Method Details Link icon

    • isEnabled Link icon

      public boolean isEnabled()
    • addToHistory Link icon

      public boolean addToHistory(Chunk chunk)
      Adds the chunk to the history
      Parameters:
      chunk - chunk to add
      Returns:
      true if it's a new chunk in the history
    • clearHistory Link icon

      public void clearHistory()