diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandColor.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandColor.java index 0e77ef3..ddd04fe 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandColor.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandColor.java @@ -10,8 +10,15 @@ import org.bukkit.entity.Player; public class CommandColor extends SWCommand { + private static CommandColor instance = null; + public CommandColor() { super("color"); + instance = this; + } + + public static CommandColor getInstance() { + return instance; } @Register(help = true) @@ -44,6 +51,11 @@ public class CommandColor extends SWCommand { p.sendMessage(BauSystem.PREFIX + "Regions farben auf §e" + color.name().toLowerCase() + "§7 gesetzt"); } + @Register + public void genericColorSet(Player p, ColorizationType colorizationType, Color color) { + genericColorSet(p, color, colorizationType); + } + private boolean permissionCheck(Player p) { if (!BauSystem.getOwner().equals(p.getUniqueId())) { p.sendMessage(BauSystem.PREFIX + "§cDies ist nicht deine Welt!"); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRegion.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRegion.java index 75aacc6..1596b61 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRegion.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandRegion.java @@ -2,6 +2,7 @@ package de.steamwar.bausystem.commands; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; +import de.steamwar.bausystem.world.Color; import de.steamwar.bausystem.world.Welt; import de.steamwar.bausystem.world.regions.GlobalRegion; import de.steamwar.bausystem.world.regions.Region; @@ -112,6 +113,11 @@ public class CommandRegion extends SWCommand { } } + @Register("color") + public void colorCommand(Player p, Color color) { + CommandColor.getInstance().genericColor(p, color); + } + static boolean checkGlobalRegion(Region region, Player p) { if (GlobalRegion.isGlobalRegion(region)) { p.sendMessage(BauSystem.PREFIX + "§cDu bist in keiner Region");