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

    • ChunkUpdateLimitChecker

      public ChunkUpdateLimitChecker(int historySize)
  • Method Details

    • isEnabled

      public boolean isEnabled()
    • addToHistory

      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

      public void clearHistory()