SteamWar/BauSystem
Archiviert
13
0

Fixing some 1.12 Stuff

Dieser Commit ist enthalten in:
Chaoscaot 2021-02-13 23:46:50 +01:00
Ursprung 35902fac56
Commit 8f176cd8cd

Datei anzeigen

@ -170,7 +170,7 @@ public class CommandGUI implements CommandExecutor, Listener {
inv.setItem(18, Material.BARRIER, "§eKeine Region", clickType -> {});
inv.setItem(27, Material.BARRIER, "§eKeine Region", clickType -> {});
}else {
inv.setItem(27, Material.HEAVY_WEIGHTED_PRESSURE_PLATE, "§eRegion Reseten", getNoPermsLore(Arrays.asList("§8/§7reset"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
inv.setItem(27, getMaterial("HEAVY_WEIGHTED_PRESSURE_PLATE", "IRON_PLATE"), "§eRegion Reseten", getNoPermsLore(Arrays.asList("§8/§7reset"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
if(Welt.noPermission(player, Permission.world))
return;
confirmationInventory(player, "Region Reseten?", () -> player.performCommand("reset"), () -> openBauGui(player));
@ -233,7 +233,7 @@ public class CommandGUI implements CommandExecutor, Listener {
});
break;
case ONLY_TB:
inv.setItem(23, Material.TNT_MINECART, "§7TNT: §enur Testblock", tntLore, false, clickType -> {
inv.setItem(23, getMaterial("TNT_MINECART", "EXPLOSIVE_MINECART"), "§7TNT: §enur Testblock", tntLore, false, clickType -> {
if(Welt.noPermission(player, Permission.world))
return;
player.performCommand("tnt on");
@ -250,7 +250,7 @@ public class CommandGUI implements CommandExecutor, Listener {
}
if(region.isFreeze()) {
inv.setItem(24, Material.GUNPOWDER, "§7Freeze: §eEingeschaltet", getNoPermsLore(Arrays.asList("§8/§7freeze"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
inv.setItem(24, getMaterial("GUNPOWDER", "SULPHUR"), "§7Freeze: §eEingeschaltet", getNoPermsLore(Arrays.asList("§8/§7freeze"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
if(Welt.noPermission(player, Permission.world))
return;
player.performCommand("freeze");
@ -339,7 +339,7 @@ public class CommandGUI implements CommandExecutor, Listener {
});
}
inv.setItem(4, Material.TNT_MINECART, "§7Trace GUI", Collections.singletonList("§8/§7trace show gui"), false, clickType -> {
inv.setItem(4, getMaterial("TNT_MINECART", "EXPLOSIVE_MINECART"), "§7Trace GUI", Collections.singletonList("§8/§7trace show gui"), false, clickType -> {
player.closeInventory();
player.performCommand("trace show gui");
});
@ -399,7 +399,7 @@ public class CommandGUI implements CommandExecutor, Listener {
anvilInv.open();
});
inv.setItem(6, Material.CLOCK, "§7Block platzier Geschwindigkeit", Arrays.asList("§7Aktuell: §e" + loader.getTicksBetweenBlocks(), "§8/§7loader speed §8[§eTicks§8]"), false, clickType -> {
inv.setItem(6, getMaterial("CLOCK", "WATCH"), "§7Block platzier Geschwindigkeit", Arrays.asList("§7Aktuell: §e" + loader.getTicksBetweenBlocks(), "§8/§7loader speed §8[§eTicks§8]"), false, clickType -> {
SWAnvilInv anvilInv = new SWAnvilInv(player, "Platzier Geschwindigkeit", loader.getTicksBetweenBlocks() + "");
anvilInv.setItem(Material.STONE);
anvilInv.setCallback(s -> {
@ -550,11 +550,11 @@ public class CommandGUI implements CommandExecutor, Listener {
private static void confirmationInventory(Player player, String title, Runnable confirm, Runnable decline) {
SWInventory inv = new SWInventory(player, 9, title);
inv.setItem(0, SWItem.getDye(1), "§cAbbrechen", clickType -> {
inv.setItem(0, SWItem.getDye(1), (byte) 1, "§cAbbrechen", clickType -> {
player.closeInventory();
decline.run();
});
inv.setItem(8, SWItem.getDye(10), "§aBestätigen", clickType -> {
inv.setItem(8, SWItem.getDye(10), (byte) 10, "§aBestätigen", clickType -> {
player.closeInventory();
confirm.run();
});