Add CArea, RInteractionCallback

Add DynamicRegionEditor, DynamicRegionVisualizer
This commit is contained in:
2026-09-07 11:42:22 +02:00
parent 01831c0626
commit da78a0d701
23 changed files with 597 additions and 344 deletions
@@ -36,15 +36,15 @@ public class DynamicRegionCommand extends SWCommand {
@Register({"dynamic"})
public void visualizeRegions(Player player) {
Tile tile = Tile.fromLocation(player.getLocation()).orElse(null);
if (tile == null) return;
SWPlayer swPlayer = SWPlayer.of(player);
if (swPlayer.hasComponent(DynamicRegionVisualizer.class)) {
swPlayer.removeComponent(DynamicRegionVisualizer.class);
} else if (Permission.SUPERVISOR.hasPermission(player)) {
swPlayer.setComponent(new DynamicRegionVisualizer());
swPlayer.removeComponent(DynamicRegionEditor.class);
} else {
// TODO: Add Message
swPlayer.setComponent(DynamicRegionVisualizer.INSTANCE);
if (Permission.SUPERVISOR.hasPermission(player)) {
swPlayer.setComponent(new DynamicRegionEditor(player.getPlayer()));
}
}
}
}