ChaosBauGUI #183
@ -64,9 +64,9 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
OPEN_INVS.remove(player);
|
OPEN_INVS.remove(player);
|
||||||
});
|
});
|
||||||
|
|
||||||
inv.setItem(20, Material.GLASS_PANE, "§7Platzhalter", clickType -> {});
|
inv.setItem(37, Material.GLASS_PANE, "§7Platzhalter", clickType -> {});
|
||||||
inv.setItem(22, Material.GLASS_PANE, "§7Platzhalter", clickType -> {});
|
inv.setItem(38, Material.GLASS_PANE, "§7Platzhalter", clickType -> {});
|
||||||
inv.setItem(24, Material.GLASS_PANE, "§7Platzhalter", clickType -> {});
|
inv.setItem(43, Material.GLASS_PANE, "§7Platzhalter", clickType -> {});
|
||||||
|
|
||||||
ItemStack dtWand = Detonator.WAND.clone();
|
ItemStack dtWand = Detonator.WAND.clone();
|
||||||
ItemMeta meta = dtWand.getItemMeta();
|
ItemMeta meta = dtWand.getItemMeta();
|
||||||
@ -76,7 +76,7 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
lore.add("§cDu hast keine Worldrechte");
|
lore.add("§cDu hast keine Worldrechte");
|
||||||
meta.setLore(lore);
|
meta.setLore(lore);
|
||||||
dtWand.setItemMeta(meta);
|
dtWand.setItemMeta(meta);
|
||||||
inv.setItem(38, dtWand, clickType -> {
|
inv.setItem(39, dtWand, clickType -> {
|
||||||
player.closeInventory();
|
player.closeInventory();
|
||||||
player.performCommand("dt wand");
|
player.performCommand("dt wand");
|
||||||
});
|
});
|
||||||
@ -93,13 +93,13 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
});
|
});
|
||||||
inv.setItem(42, Material.GLASS_PANE, "§7Platzhalter", clickType -> {});
|
inv.setItem(42, Material.GLASS_PANE, "§7Platzhalter", clickType -> {});
|
||||||
|
|
||||||
inv.setItem(26, Material.COMPASS, "§7TPS Limitieren", getNoPermsLore(Arrays.asList("§7Aktuell: §e" + CommandTPSLimiter.getCurrentTPSLimit(), "§8/§7tpslimit §8[§e1 - 20§8]"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
inv.setItem(20, Material.COMPASS, "§7TPS Limitieren", getNoPermsLore(Arrays.asList("§7Aktuell: §e" + CommandTPSLimiter.getCurrentTPSLimit(), "§8/§7tpslimit §8[§e1 - 20§8]"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
||||||
SWAnvilInv anvilInv = new SWAnvilInv(player, "TPS Limitieren");
|
SWAnvilInv anvilInv = new SWAnvilInv(player, "TPS Limitieren");
|
||||||
anvilInv.setItem(Material.COMPASS);
|
anvilInv.setItem(Material.COMPASS);
|
||||||
anvilInv.setCallback(s -> player.performCommand("tpslimit " + s));
|
anvilInv.setCallback(s -> player.performCommand("tpslimit " + s));
|
||||||
anvilInv.open();
|
anvilInv.open();
|
||||||
});
|
});
|
||||||
inv.setItem(6, Material.FEATHER, "§7Geschwindigkeit", Arrays.asList("§7Aktuell: §e" + player.getFlySpeed() * 10, "§8/§7speed §8[§e1 - 10§8]"), false, clickType -> {
|
inv.setItem(5, Material.FEATHER, "§7Geschwindigkeit", Arrays.asList("§7Aktuell: §e" + player.getFlySpeed() * 10, "§8/§7speed §8[§e1 - 10§8]"), false, clickType -> {
|
||||||
SWAnvilInv anvilInv = new SWAnvilInv(player, "Geschwindigkeit");
|
SWAnvilInv anvilInv = new SWAnvilInv(player, "Geschwindigkeit");
|
||||||
anvilInv.setItem(Material.FEATHER);
|
anvilInv.setItem(Material.FEATHER);
|
||||||
anvilInv.setCallback(s -> player.performCommand("speed " + s));
|
anvilInv.setCallback(s -> player.performCommand("speed " + s));
|
||||||
@ -122,7 +122,7 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
inv.setItem(4, skull);
|
inv.setItem(4, skull);
|
||||||
}
|
}
|
||||||
|
|
||||||
inv.setItem(39, Material.BOOK, "§7Script Bücher", Arrays.asList("§7Aktuell §e" + 0 + " §7Bücher"), true, clickType -> {
|
inv.setItem(6, Material.BOOK, "§7Script Bücher", Arrays.asList("§7Aktuell §e" + 0 + " §7Bücher"), true, clickType -> {
|
||||||
// TODO: 04.02.2021 Implement Script Book Database
|
// TODO: 04.02.2021 Implement Script Book Database
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -134,14 +134,14 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
traceGUI(player);
|
traceGUI(player);
|
||||||
});
|
});
|
||||||
|
|
||||||
inv.setItem(23, Material.DISPENSER, "§7Auto-Loader", getNoPermsLore(Collections.emptyList(), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
inv.setItem(22, Material.DISPENSER, "§7Auto-Loader", getNoPermsLore(Collections.emptyList(), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
||||||
if(Welt.noPermission(player, Permission.world))
|
if(Welt.noPermission(player, Permission.world))
|
||||||
return;
|
return;
|
||||||
player.closeInventory();
|
player.closeInventory();
|
||||||
autoLoaderGUI(player);
|
autoLoaderGUI(player);
|
||||||
});
|
});
|
||||||
|
|
||||||
inv.setItem(8, getMaterial("PLAYER_HEAD", "SKULL_ITEM"), (byte) 3, "§7Spielerkopf geben", Arrays.asList("§8/§7skull §8[§eSpieler§8]"), false, clickType -> {
|
inv.setItem(17, getMaterial("PLAYER_HEAD", "SKULL_ITEM"), (byte) 3, "§7Spielerkopf geben", Arrays.asList("§8/§7skull §8[§eSpieler§8]"), false, clickType -> {
|
||||||
SWAnvilInv anvilInv = new SWAnvilInv(player, "Spielerköpfe");
|
SWAnvilInv anvilInv = new SWAnvilInv(player, "Spielerköpfe");
|
||||||
anvilInv.setItem(Material.NAME_TAG);
|
anvilInv.setItem(Material.NAME_TAG);
|
||||||
anvilInv.setCallback(s -> player.performCommand("skull " + s));
|
anvilInv.setCallback(s -> player.performCommand("skull " + s));
|
||||||
@ -149,47 +149,47 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(Region.GlobalRegion.isGlobalRegion(region)) {
|
if(Region.GlobalRegion.isGlobalRegion(region)) {
|
||||||
|
inv.setItem(9, Material.BARRIER, "§eKeine Region", clickType -> {});
|
||||||
inv.setItem(18, Material.BARRIER, "§eKeine Region", clickType -> {});
|
inv.setItem(18, Material.BARRIER, "§eKeine Region", clickType -> {});
|
||||||
inv.setItem(27, Material.BARRIER, "§eKeine Region", clickType -> {});
|
inv.setItem(27, Material.BARRIER, "§eKeine Region", clickType -> {});
|
||||||
inv.setItem(36, Material.BARRIER, "§eKeine Region", clickType -> {});
|
|
||||||
}else {
|
}else {
|
||||||
inv.setItem(18, Material.HEAVY_WEIGHTED_PRESSURE_PLATE, "§eRegion Reseten", getNoPermsLore(Arrays.asList("§8/§7reset"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType ->
|
inv.setItem(27, Material.HEAVY_WEIGHTED_PRESSURE_PLATE, "§eRegion Reseten", getNoPermsLore(Arrays.asList("§8/§7reset"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType ->
|
||||||
confirmationInventory(player, "Region Reseten?", () -> player.performCommand("reset"), () -> openBauGui(player)));
|
confirmationInventory(player, "Region Reseten?", () -> player.performCommand("reset"), () -> openBauGui(player)));
|
||||||
|
|
||||||
if(region.hasProtection()) {
|
if(region.hasProtection()) {
|
||||||
inv.setItem(27, Material.OBSIDIAN, "§eRegion Protecten", getNoPermsLore(Arrays.asList("§8/§7protect"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType ->
|
inv.setItem(18, Material.OBSIDIAN, "§eRegion Protecten", getNoPermsLore(Arrays.asList("§8/§7protect"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType ->
|
||||||
confirmationInventory(player, "Region Protecten", () -> player.performCommand("protect"), () -> openBauGui(player)));
|
confirmationInventory(player, "Region Protecten", () -> player.performCommand("protect"), () -> openBauGui(player)));
|
||||||
} else {
|
} else {
|
||||||
inv.setItem(27, Material.BARRIER, "§eRegion nicht Protect bar", clickType -> {});
|
inv.setItem(18, Material.BARRIER, "§eRegion nicht Protect bar", clickType -> {});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(region.hasTestblock()) {
|
if(region.hasTestblock()) {
|
||||||
inv.setItem(36, getMaterial("END_STONE", "ENDER_STONE"), "§eTestblock erneuern", getNoPermsLore(Arrays.asList("§8/§7testblock"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType ->
|
inv.setItem(9, getMaterial("END_STONE", "ENDER_STONE"), "§eTestblock erneuern", getNoPermsLore(Arrays.asList("§8/§7testblock"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType ->
|
||||||
confirmationInventory(player, "Testblock erneuern", () -> player.performCommand("testblock"), () -> openBauGui(player)));
|
confirmationInventory(player, "Testblock erneuern", () -> player.performCommand("testblock"), () -> openBauGui(player)));
|
||||||
} else {
|
} else {
|
||||||
inv.setItem(36, Material.BARRIER, "§eDie Region hat keinen Testblock", clickType -> {});
|
inv.setItem(9, Material.BARRIER, "§eDie Region hat keinen Testblock", clickType -> {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(player.hasPotionEffect(PotionEffectType.NIGHT_VISION)) {
|
if(player.hasPotionEffect(PotionEffectType.NIGHT_VISION)) {
|
||||||
inv.setItem(35, Material.POTION, "§7Nightvision: §eEingeschaltet", Collections.singletonList("§8/§7nv"), false, clickType -> {
|
inv.setItem(26, Material.POTION, "§7Nightvision: §eEingeschaltet", Collections.singletonList("§8/§7nv"), false, clickType -> {
|
||||||
CommandNV.toggleNightvision(player);
|
CommandNV.toggleNightvision(player);
|
||||||
openBauGui(player);
|
openBauGui(player);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
inv.setItem(35, Material.GLASS_BOTTLE, "§7Nightvision: §eAusgeschaltet", Collections.singletonList("§8/§7nv"), false, clickType -> {
|
inv.setItem(26, Material.GLASS_BOTTLE, "§7Nightvision: §eAusgeschaltet", Collections.singletonList("§8/§7nv"), false, clickType -> {
|
||||||
CommandNV.toggleNightvision(player);
|
CommandNV.toggleNightvision(player);
|
||||||
openBauGui(player);
|
openBauGui(player);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(player.hasPotionEffect(PotionEffectType.WATER_BREATHING)) {
|
if(player.hasPotionEffect(PotionEffectType.WATER_BREATHING)) {
|
||||||
inv.setItem(44, Material.WATER_BUCKET, "§7Waterbreathing: §eEingeschaltet", Collections.singletonList("§8/§7wv"), false, clickType -> {
|
inv.setItem(35, Material.WATER_BUCKET, "§7Waterbreathing: §eEingeschaltet", Collections.singletonList("§8/§7wv"), false, clickType -> {
|
||||||
CommandGills.toggleGills(player);
|
CommandGills.toggleGills(player);
|
||||||
openBauGui(player);
|
openBauGui(player);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
inv.setItem(44, Material.BUCKET, "§7Waterbreathing: §eAusgeschaltet", Collections.singletonList("§8/§7wv"), false, clickType -> {
|
inv.setItem(35, Material.BUCKET, "§7Waterbreathing: §eAusgeschaltet", Collections.singletonList("§8/§7wv"), false, clickType -> {
|
||||||
CommandGills.toggleGills(player);
|
CommandGills.toggleGills(player);
|
||||||
openBauGui(player);
|
openBauGui(player);
|
||||||
});
|
});
|
||||||
@ -199,7 +199,7 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
List<String> tntLore = getNoPermsLore(Arrays.asList("§8/§7tnt §8[" + (isBuildArea?"§eTB§7, ":"") + "§eOff §7oder §eOn§7]"), player, "§cDu hast keine Worldrechte", Permission.world);
|
List<String> tntLore = getNoPermsLore(Arrays.asList("§8/§7tnt §8[" + (isBuildArea?"§eTB§7, ":"") + "§eOff §7oder §eOn§7]"), player, "§cDu hast keine Worldrechte", Permission.world);
|
||||||
switch (region.getTntMode()) {
|
switch (region.getTntMode()) {
|
||||||
case OFF:
|
case OFF:
|
||||||
inv.setItem(0, Material.MINECART, "§7TNT: §eAusgeschaltet", tntLore, false, clickType -> {
|
inv.setItem(23, Material.MINECART, "§7TNT: §eAusgeschaltet", tntLore, false, clickType -> {
|
||||||
if(Welt.noPermission(player, Permission.world))
|
if(Welt.noPermission(player, Permission.world))
|
||||||
return;
|
return;
|
||||||
player.performCommand("tnt " + (isBuildArea?"tb":"on"));
|
player.performCommand("tnt " + (isBuildArea?"tb":"on"));
|
||||||
@ -207,7 +207,7 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case ONLY_TB:
|
case ONLY_TB:
|
||||||
inv.setItem(0, Material.TNT_MINECART, "§7TNT: §enur Testblock", tntLore, false, clickType -> {
|
inv.setItem(23, Material.TNT_MINECART, "§7TNT: §enur Testblock", tntLore, false, clickType -> {
|
||||||
if(Welt.noPermission(player, Permission.world))
|
if(Welt.noPermission(player, Permission.world))
|
||||||
return;
|
return;
|
||||||
player.performCommand("tnt on");
|
player.performCommand("tnt on");
|
||||||
@ -215,7 +215,7 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
inv.setItem(0, Material.TNT, "§7TNT: §eEingeschaltet", tntLore, false, clickType -> {
|
inv.setItem(23, Material.TNT, "§7TNT: §eEingeschaltet", tntLore, false, clickType -> {
|
||||||
if(Welt.noPermission(player, Permission.world))
|
if(Welt.noPermission(player, Permission.world))
|
||||||
return;
|
return;
|
||||||
player.performCommand("tnt off");
|
player.performCommand("tnt off");
|
||||||
@ -224,14 +224,14 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(region.isFreeze()) {
|
if(region.isFreeze()) {
|
||||||
inv.setItem(1, Material.GUNPOWDER, "§7Freeze: §eEingeschaltet", getNoPermsLore(Arrays.asList("§8/§7freeze"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
inv.setItem(24, Material.GUNPOWDER, "§7Freeze: §eEingeschaltet", getNoPermsLore(Arrays.asList("§8/§7freeze"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
||||||
if(Welt.noPermission(player, Permission.world))
|
if(Welt.noPermission(player, Permission.world))
|
||||||
return;
|
return;
|
||||||
player.performCommand("freeze");
|
player.performCommand("freeze");
|
||||||
updateInventories();
|
updateInventories();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
inv.setItem(1, Material.REDSTONE, "§7Freeze: §eAusgeschaltet", getNoPermsLore(Arrays.asList("§8/§7freeze"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
inv.setItem(24, Material.REDSTONE, "§7Freeze: §eAusgeschaltet", getNoPermsLore(Arrays.asList("§8/§7freeze"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
||||||
if(Welt.noPermission(player, Permission.world))
|
if(Welt.noPermission(player, Permission.world))
|
||||||
return;
|
return;
|
||||||
player.performCommand("freeze");
|
player.performCommand("freeze");
|
||||||
@ -240,14 +240,14 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(region.isFire()) {
|
if(region.isFire()) {
|
||||||
inv.setItem(2, getMaterial("FIREWORK_STAR", "FIREWORK_CHARGE"), "§7Fire: §eAusgeschaltet", getNoPermsLore(Arrays.asList("§8/§7fire"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
inv.setItem(3, getMaterial("FIREWORK_STAR", "FIREWORK_CHARGE"), "§7Fire: §eAusgeschaltet", getNoPermsLore(Arrays.asList("§8/§7fire"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
||||||
if(Welt.noPermission(player, Permission.world))
|
if(Welt.noPermission(player, Permission.world))
|
||||||
return;
|
return;
|
||||||
player.performCommand("fire");
|
player.performCommand("fire");
|
||||||
updateInventories();
|
updateInventories();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
inv.setItem(2, Material.FIRE_CHARGE, "§7Fire: §eEingeschaltet", getNoPermsLore(Arrays.asList("§8/§7fire"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
inv.setItem(3, Material.FIRE_CHARGE, "§7Fire: §eEingeschaltet", getNoPermsLore(Arrays.asList("§8/§7fire"), player, "§cDu hast keine Worldrechte", Permission.world), false, clickType -> {
|
||||||
if(Welt.noPermission(player, Permission.world))
|
if(Welt.noPermission(player, Permission.world))
|
||||||
return;
|
return;
|
||||||
player.performCommand("fire");
|
player.performCommand("fire");
|
||||||
@ -255,7 +255,7 @@ public class CommandGUI implements CommandExecutor, Listener {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
inv.setItem(7, Material.ENDER_PEARL, "§7Teleporter", getNoPermsLore(Arrays.asList("§8/§7tp §8[§eSpieler§8]"), player, "§cDu hast keine Buildrechte", Permission.build), false, clickType -> {
|
inv.setItem(2, Material.ENDER_PEARL, "§7Teleporter", getNoPermsLore(Arrays.asList("§8/§7tp §8[§eSpieler§8]"), player, "§cDu hast keine Buildrechte", Permission.build), false, clickType -> {
|
||||||
List<SWListInv.SWListEntry<String>> playerSWListEntry = new ArrayList<>();
|
List<SWListInv.SWListEntry<String>> playerSWListEntry = new ArrayList<>();
|
||||||
Bukkit.getOnlinePlayers().forEach(player1 -> {
|
Bukkit.getOnlinePlayers().forEach(player1 -> {
|
||||||
if(player1.equals(player))
|
if(player1.equals(player))
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren