Class McLevel

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

public class McLevel extends Object
Wrapper for Minecraft Level

Provides easy-to-use mapped methods for Levels

A Minecraft Level is the equivalent of a Bukkit World

  • Method Details

    • wrap

      public static McLevel wrap(@NotNull @NotNull World world)
      Wrap a Bukkit World
      Parameters:
      world - Bukkit World to wrap
      Returns:
      Wrapped Minecraft Level
    • wrap

      public static McLevel wrap(@NotNull @NotNull net.minecraft.world.level.Level level)
      Wrap a Minecraft Level
      Parameters:
      level - Minecraft Level to wrap
      Returns:
      Wrapper of Minecraft Level
    • getRainLevel

      public float getRainLevel()
      Get level of rain in a Level
      Returns:
      Level of rain
    • destroyBlock

      public void destroyBlock(@NotNull @NotNull Location location, boolean drop, @Nullable @Nullable Entity breakingEntity)
      Destroy a block at a location
      Parameters:
      location - Location of block to destroy
      drop - Whether the block will drop items
      breakingEntity - The entity that broke the block
    • destroyBlock

      public void destroyBlock(@NotNull @NotNull Location location, boolean drop)
      Destroy a block at a location
      Parameters:
      location - Location of block to destroy
      drop - Whether the block will drop items