Class ChunkBorder
java.lang.Object
me.tayebyassine.homestead.borders.ChunkBorder
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 ClassesModifier and TypeClassDescriptionstatic enumEnum representing available border visualization types. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.MaterialGets the configured block material for block-based borders.static ChunkBorder.BorderTypeGets the currently configured border visualization type.static voidshow(org.bukkit.entity.Player player) Shows the appropriate border for the player's current location.static voidstop(org.bukkit.entity.Player player) Stops all border visualizations for a player.static voidstopAll()Stops all border visualizations for every online player.
-
Method Details
-
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
-