Class ChunkApi
java.lang.Object
com.shanebeestudios.nms.api.world.ChunkApi
Api methods pertaining to a
Chunk-
Method Summary
Modifier and TypeMethodDescriptionstatic floatgetEffectiveDifficulty(Chunk chunk) Get the effective difficulty of a Chunkstatic @NotNull net.minecraft.world.level.chunk.LevelChunkgetLevelChunk(@NotNull Chunk chunk) Get a Minecraft LevelChunk from aBukkit ChunkgetTicketHolders(@NotNull Chunk chunk) Get the ticket holders of a chunkstatic booleanDeprecated, for removal: This API element is subject to removal in a future version.static booleanisTickingAtLocation(@NotNull Location location) Deprecated, for removal: This API element is subject to removal in a future version.Instead useChunk.getLoadLevel()
-
Method Details
-
getLevelChunk
@NotNull public static @NotNull net.minecraft.world.level.chunk.LevelChunk getLevelChunk(@NotNull @NotNull Chunk chunk) Get a Minecraft LevelChunk from aBukkit Chunk- Parameters:
chunk- Bukkit chunk- Returns:
- Minecraft LevelChunk from Bukkit chunk
-
getTicketHolders
Get the ticket holders of a chunkThis represents the players that are holding a chunk open
- Parameters:
chunk- Chunk to grab ticket holders from- Returns:
- List of players holding the chunk open
-
isTickingAtLocation
@Deprecated(forRemoval=true, since="1.4.0") public static boolean isTickingAtLocation(@NotNull @NotNull Location location) Deprecated, for removal: This API element is subject to removal in a future version.Instead useChunk.getLoadLevel()- Parameters:
location- Location to check for ticking- Returns:
- True if chunk is ticking else false
-
isTicking
Deprecated, for removal: This API element is subject to removal in a future version.Instead useChunk.getLoadLevel()Check if aChunkis tickingSimilar to
isTickingAtLocation(Location)but from the middle of the chunk- Parameters:
chunk- Chunk to check if ticking- Returns:
- True if chunk is ticking else false
-
getEffectiveDifficulty
Get the effective difficulty of a ChunkThis is what is seen in the debug screen under "Local Difficulty"
- Parameters:
chunk- Chunk to grab effective difficulty from- Returns:
- Effective difficulty of chunk
-
Chunk.getLoadLevel()