Class ChunkApi

java.lang.Object
com.shanebeestudios.nms.api.world.ChunkApi

public class ChunkApi extends Object
Api methods pertaining to a Chunk
  • Method Details

    • getLevelChunk

      @NotNull public static @NotNull net.minecraft.world.level.chunk.LevelChunk getLevelChunk(@NotNull @NotNull Chunk chunk)
      Get a Minecraft LevelChunk from a Bukkit Chunk
      Parameters:
      chunk - Bukkit chunk
      Returns:
      Minecraft LevelChunk from Bukkit chunk
    • getTicketHolders

      @NotNull public static @NotNull List<Player> getTicketHolders(@NotNull @NotNull Chunk chunk)
      Get the ticket holders of a chunk

      This 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
    • getEffectiveDifficulty

      public static float getEffectiveDifficulty(Chunk chunk)
      Get the effective difficulty of a Chunk

      This is what is seen in the debug screen under "Local Difficulty"

      Parameters:
      chunk - Chunk to grab effective difficulty from
      Returns:
      Effective difficulty of chunk