SteamWar/BauSystem2.0
Archiviert
12
0

SelectBauGuiItem

Dieser Commit ist enthalten in:
zOnlyKroks 2021-12-27 14:01:18 +01:00
Ursprung 988621eadb
Commit 63c21241b2
2 geänderte Dateien mit 19 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -865,7 +865,7 @@ OTHER_TPS_SINGLE = §8TPS: §e{0}
OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn
# DebugStick # DebugStick
DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick
DEBUG-STICK=&eDEBUGSTICK DEBUG-STICK_NAME=&eDEBUGSTICK
# StructureVoid # StructureVoid
STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid
# NightVision # NightVision
@ -1062,8 +1062,16 @@ TNT_CLICK_VELOCITY_Y = §7Velocity §eY§8: §e{0}
TNT_CLICK_VELOCITY_Z = §7Velocity §eZ§8: §e{0} TNT_CLICK_VELOCITY_Z = §7Velocity §eZ§8: §e{0}
#Select Util #Select Util
CHOOSE_EXTENSION ="Extension auswählen" SELECT_ITEM_CHOOSE_EXTENSION ="Extension auswählen"
CHOOSE_SELECTION ="Auswahl auswählen" SELECT_ITEM_CHOOSE_SELECTION ="Auswahl auswählen"
SELECT_ITEM_NORMAL_EXTENSION ="§eNormal"
SELECT_ITEM_EXTENDED_EXTENSION="§eAusgefahren"
SELECT_ITEM_SELECT="§eSelect"
SELECT_ITEM_AUSWAHL="§7Auswahl: &7"
SELECT_ITEM_RIGHT_CLICK="&7Rechtklick zum ändern"
SELECT_ITEM_BAURAHMEN="§eBaurahmen"
SELECT_ITEM_BAUPLATTFORM="§eBauplattform"
SELECT_ITEM_TESTBLOCK="§eTestblock"
# Warp # Warp
WARP_DISALLOWED = §cDu darfst hier nicht das Warp System nutzen WARP_DISALLOWED = §cDu darfst hier nicht das Warp System nutzen

Datei anzeigen

@ -52,9 +52,9 @@ public class SelectBauGuiItem extends BauGuiItem {
private static void selectExtension(Player p, RegionType type) { private static void selectExtension(Player p, RegionType type) {
p.closeInventory(); p.closeInventory();
SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("CHOOSE_EXTENSION", p)); SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("SELECT_ITEM_CHOOSE_EXTENSION", p));
inv.setItem(2, new SWItem(Material.END_STONE, ColorConfig.HIGHLIGHT + "Normal", clickType -> selectFinish(p, type, RegionExtensionType.NORMAL))); inv.setItem(2, new SWItem(Material.END_STONE, BauSystem.MESSAGE.parse("SELECT_ITEM_NORMAL_EXTENSION", p), clickType -> selectFinish(p, type, RegionExtensionType.NORMAL)));
inv.setItem(6, new SWItem(Material.PISTON, ColorConfig.HIGHLIGHT + "Ausfahrmaße", clickType -> selectFinish(p, type, RegionExtensionType.EXTENSION))); inv.setItem(6, new SWItem(Material.PISTON, BauSystem.MESSAGE.parse("SELECT_ITEM_EXTENDED_EXTENSION", p), clickType -> selectFinish(p, type, RegionExtensionType.EXTENSION)));
inv.open(); inv.open();
} }
@ -67,7 +67,7 @@ public class SelectBauGuiItem extends BauGuiItem {
@Override @Override
public ItemStack getItem(Player player) { public ItemStack getItem(Player player) {
LastSelect last = LAST_SELECT_MAP.getOrDefault(player, new LastSelect(RegionType.BUILD, RegionExtensionType.NORMAL)); LastSelect last = LAST_SELECT_MAP.getOrDefault(player, new LastSelect(RegionType.BUILD, RegionExtensionType.NORMAL));
return new SWItem(Material.SCAFFOLDING, ColorConfig.HIGHLIGHT + "Select", Arrays.asList(ColorConfig.BASE + "Auswahl: " + ColorConfig.HIGHLIGHT + last.toString(), ColorConfig.BASE + "Rechtklick zum ändern"), false, clickType -> { return new SWItem(Material.SCAFFOLDING, BauSystem.MESSAGE.parse("SELECT_ITEM_EXTENDED_EXTENSION",player), Arrays.asList(BauSystem.MESSAGE.parse("EXTENDED_EXTENSION", player) + last.toString(), BauSystem.MESSAGE.parse("RIGHT_CLICK", player)), false, clickType -> {
}).getItemStack(); }).getItemStack();
} }
@ -75,10 +75,10 @@ public class SelectBauGuiItem extends BauGuiItem {
public boolean click(ClickType click, Player p) { public boolean click(ClickType click, Player p) {
if (click == ClickType.RIGHT) { if (click == ClickType.RIGHT) {
p.closeInventory(); p.closeInventory();
SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("CHOOSE_SELECTION", p)); SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("SELECT_ITEM_CHOOSE_SELECTION", p));
inv.setItem(2, new SWItem(Material.REDSTONE_BLOCK, ColorConfig.HIGHLIGHT + "Baurahmen", clickType -> selectExtension(p, RegionType.BUILD))); inv.setItem(2, new SWItem(Material.REDSTONE_BLOCK, BauSystem.MESSAGE.parse("SELECT_ITEM_BAURAHMEN", p), clickType -> selectExtension(p, RegionType.BUILD)));
inv.setItem(4, new SWItem(Material.LECTERN, ColorConfig.HIGHLIGHT + "Bauplattform", clickType -> selectFinish(p, RegionType.NORMAL, RegionExtensionType.NORMAL))); inv.setItem(4, new SWItem(Material.LECTERN, BauSystem.MESSAGE.parse("SELECT_ITEM_BAUPLATTFORM", p), clickType -> selectFinish(p, RegionType.NORMAL, RegionExtensionType.NORMAL)));
inv.setItem(6, new SWItem(Material.END_STONE, ColorConfig.HIGHLIGHT + "Testblock", clickType -> selectExtension(p, RegionType.TESTBLOCK))); inv.setItem(6, new SWItem(Material.END_STONE, BauSystem.MESSAGE.parse("SELECT_ITEM_TESTBLOCK", p), clickType -> selectExtension(p, RegionType.TESTBLOCK)));
inv.open(); inv.open();
} else { } else {
p.closeInventory(); p.closeInventory();