Class ChunkBorder

java.lang.Object
me.tayebyassine.homestead.borders.ChunkBorder

public final class ChunkBorder extends Object
Central manager for region border visualization.

Provides a unified API for showing/hiding region borders using different visualization methods: particles, fake blocks, or glowing entities.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enum representing available border visualization types.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.Material
    Gets the configured block material for block-based borders.
    Gets the currently configured border visualization type.
    static void
    show(org.bukkit.entity.Player player)
    Shows the appropriate border for the player's current location.
    static void
    stop(org.bukkit.entity.Player player)
    Stops all border visualizations for a player.
    static void
    Stops all border visualizations for every online player.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getBorderType

      public static ChunkBorder.BorderType getBorderType()
      Gets the currently configured border visualization type.
      Returns:
      the border type, or null if borders are disabled
    • getBlockType

      public static org.bukkit.Material getBlockType()
      Gets the configured block material for block-based borders.
      Returns:
      the material, defaulting to GOLD_BLOCK if invalid
    • stop

      public static void stop(org.bukkit.entity.Player player)
      Stops all border visualizations for a player.

      Only affects borders belonging to this player: their tasks are cancelled, their fake blocks are cleared, and their glow markers are removed from the world.

      Parameters:
      player - the player to stop borders for
    • stopAll

      public static void stopAll()
      Stops all border visualizations for every online player.

      Used when the configuration is reloaded, so border tasks started with the previous settings cannot keep rendering after the border type has changed.

    • show

      public static void show(org.bukkit.entity.Player player)
      Shows the appropriate border for the player's current location.

      Determines the region and subarea at the player's position and starts the configured visualization method.

      Parameters:
      player - the player to show borders to