Package net.minestom.server.utils.chunk
Class ChunkUpdateLimitChecker
java.lang.Object
net.minestom.server.utils.chunk.ChunkUpdateLimitChecker
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addToHistory
(Chunk chunk) Adds the chunk to the historyvoid
boolean
-
Constructor Details
-
ChunkUpdateLimitChecker
public ChunkUpdateLimitChecker(int historySize)
-
-
Method Details
-
isEnabled
public boolean isEnabled() -
addToHistory
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()
-