ChaosBauGUI #183
@ -34,7 +34,7 @@ public class CommandGUI implements CommandExecutor {
|
||||
}
|
||||
|
||||
public static void openBauGui(Player player) {
|
||||
Region region = Region.getRegionIn(player.getLocation());
|
||||
Region region = Region.getRegion(player.getLocation());
|
||||
SWInventory inv = new SWInventory(player, 5*9, SteamwarUser.get(BauSystem.getOwner()).getUserName() + "s Bau");
|
||||
inv.setCallback(-1, clickType -> {
|
||||
if(!isRefreshing)
|
||||
@ -127,46 +127,46 @@ public class CommandGUI implements CommandExecutor {
|
||||
});
|
||||
}
|
||||
|
||||
switch (CommandTNT.getTntMode()) {
|
||||
switch (region.getTntMode()) {
|
||||
case OFF:
|
||||
inv.setItem(40, Material.MINECART, "§7TNT: §eAusgeschaltet", Arrays.asList("§8/§7tnt §8[" + (Region.buildAreaEnabled()?"§etb§8, ":"") + "§eOff §7oder §eOn§7]"), false, clickType -> {
|
||||
CommandTNT.setTntMode(Region.buildAreaEnabled()?CommandTNT.TNTMode.ONLY_TB: CommandTNT.TNTMode.ON);
|
||||
region.setTntMode(Region.buildAreaEnabled()?CommandTNT.TNTMode.ONLY_TB: CommandTNT.TNTMode.ON);
|
||||
updateInventories();
|
||||
});
|
||||
break;
|
||||
case ONLY_TB:
|
||||
inv.setItem(40, Material.TNT_MINECART, "§7TNT: §enur Testblock", Arrays.asList("§8/§7tnt §8[" + (Region.buildAreaEnabled()?"§etb§8, ":"") + "§eOff §7oder §eOn§7]"), false, clickType -> {
|
||||
CommandTNT.setTntMode(CommandTNT.TNTMode.ON);
|
||||
region.setTntMode(CommandTNT.TNTMode.ON);
|
||||
updateInventories();
|
||||
});
|
||||
break;
|
||||
default:
|
||||
inv.setItem(40, Material.TNT, "§7TNT: §eEingeschaltet", Arrays.asList("§8/§7tnt §8[" + (Region.buildAreaEnabled()?"§etb§8, ":"") + "§eOff §7oder §eOn§7]"), false, clickType -> {
|
||||
CommandTNT.setTntMode(CommandTNT.TNTMode.OFF);
|
||||
region.setTntMode(CommandTNT.TNTMode.OFF);
|
||||
updateInventories();
|
||||
});
|
||||
}
|
||||
|
||||
if(CommandFreeze.getInstance().isOn()) {
|
||||
if(region.isFreeze()) {
|
||||
inv.setItem(41, Material.GUNPOWDER, "§7Freeze: §eEingeschaltet", Arrays.asList("§8/§7freeze"), false, clickType -> {
|
||||
CommandFreeze.getInstance().toggle();
|
||||
region.setFreeze(false);
|
||||
updateInventories();
|
||||
});
|
||||
} else {
|
||||
inv.setItem(41, Material.REDSTONE, "§7Freeze: §eAusgeschaltet", Arrays.asList("§8/§7freeze"), false, clickType -> {
|
||||
CommandFreeze.getInstance().toggle();
|
||||
region.setFreeze(true);
|
||||
updateInventories();
|
||||
});
|
||||
}
|
||||
|
||||
if(CommandFire.getInstance().isOn()) {
|
||||
if(region.isFire()) {
|
||||
inv.setItem(42, getMaterial("FIREWORK_STAR", "FIREWORK_CHARGE"), "§7Fire: §eAusgeschaltet", Arrays.asList("§8/§7fire"), false, clickType -> {
|
||||
CommandFire.getInstance().toggle();
|
||||
region.setFire(false);
|
||||
updateInventories();
|
||||
});
|
||||
} else {
|
||||
inv.setItem(42, Material.FIRE_CHARGE, "§7Fire: §eEingeschaltet", Arrays.asList("§8/§7fire"), false, clickType -> {
|
||||
CommandFire.getInstance().toggle();
|
||||
region.setFire(true);
|
||||
updateInventories();
|
||||
});
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren