diff --git a/BauSystem_API/src/de/steamwar/bausystem/features/detonator/Detoblock.java b/BauSystem_API/src/de/steamwar/bausystem/features/detonator/Detoblock.java index 10163594..f14d8d88 100644 --- a/BauSystem_API/src/de/steamwar/bausystem/features/detonator/Detoblock.java +++ b/BauSystem_API/src/de/steamwar/bausystem/features/detonator/Detoblock.java @@ -21,30 +21,23 @@ package de.steamwar.bausystem.features.detonator; import lombok.AllArgsConstructor; import lombok.Getter; +import lombok.RequiredArgsConstructor; @AllArgsConstructor +@RequiredArgsConstructor +@Getter public enum Detoblock { - SWITCH(0, true, "Hebel"), - WOOD_BUTTON(30, "Knopf"), - STONE_BUTTON(20, "Knopf"), - PRESSURE_PLATE(30, "Druckplatte"), - WEIGHTED_PRESSURE_PLATE(20, "Druckplatte"), - TRIPWIRE(30, "Tripwire"), - NOTEBLOCK(1, "Noteblock"), - DAYLIGHTSENSOR(0, true, "Tageslichtsensor"), - POWERABLE(0, true, "Aktivierbarer Block"), - INVALID(-1, "Invalider"); + SWITCH(0, true, "DETONATOR_BUTTON_SWITCH"), + WOOD_BUTTON(30, "DETONATOR_BUTTON_WOOD-Button"), + STONE_BUTTON(20, "DETONATOR_BUTTON_STONE-Button"), + PRESSURE_PLATE(30, "DETONATOR_BUTTON_PRESSURE-PLATE"), + WEIGHTED_PRESSURE_PLATE(20, "DETONATOR_BUTTON_WEIGHTED-PRESSURE-PLATE"), + TRIPWIRE(30, "DETONATOR_BUTTON_TRIPWIRE"), + NOTEBLOCK(1, "DETONATOR_BUTTON_NOTEBLOCK"), + DAYLIGHTSENSOR(0, true, "DETONATOR_BUTTON_DAYLIGHTSENSOR"), + INVALID(-1, "DETONATOR_BUTTON_INVALID"); - @Getter private final int time; - @Getter - private final boolean toggle; - @Getter + private boolean toggle; private final String name; - - Detoblock(int time, String name) { - this.time = time; - this.name = name; - toggle = false; - } } diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 9e9f14ef..24fa166a 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -128,6 +128,19 @@ COUNTINGWAND_MESSAGE_R-CLICK = §7Erste Position bei: §8[§7{0}§8, §7{1}§8, COUNTINGWAND_MESSAGE_L-CLICK = §7Zweite Position bei: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}) COUNTINGWAND_MESSAGE_DIMENSION = §e{0}§8, §e{1}§8, §e{2} +# Detonator +DETONATOR_LOC_REMOVE = §e{0} entfernt +DETONATOR_LOC_ADD = §e{0} hinzugefügt +DETONATOR_BUTTON_SWITCH = Hebel +DETONATOR_BUTTON_WOOD-Button = Knopf +DETONATOR_BUTTON_STONE-Button = Knopf +DETONATOR_BUTTON_PRESSURE-PLATE = Druckplatte +DETONATOR_BUTTON_WEIGHTED-PRESSURE-PLATE = Druckplatte +DETONATOR_BUTTON_TRIPWIRE = Tripwire +DETONATOR_BUTTON_NOTEBLOCK = Noteblock +DETONATOR_BUTTON_DAYLIGHTSENSOR = Tageslichtsensor +DETONATOR_BUTTON_INVALID = Invalider + # Hotbar HOTBAR_SAVED = §7Deine Hotbar wurde als Standard gespeichert HOTBAR_LOADED = §7Deine Standard Hotbar wurde geladen diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java index 593708d4..48be9e53 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java @@ -89,10 +89,10 @@ public class DetonatorListener implements Listener { } if (detonator.getLocations().contains(location)) { detonator.removeLocation(location); - SWUtils.sendToActionbar(p, ColorConfig.HIGHLIGHT + detoblock.getName() + " entfernt"); + SWUtils.sendToActionbar(p, BauSystem.MESSAGE.parse("DETONATOR_LOC_REMOVE", p, BauSystem.MESSAGE.parse(detoblock.getName(), p))); } else { detonator.addLocation(location); - SWUtils.sendToActionbar(p, ColorConfig.HIGHLIGHT + detoblock.getName() + " hinzugefügt"); + SWUtils.sendToActionbar(p, BauSystem.MESSAGE.parse("DETONATOR_LOC_ADD", p, BauSystem.MESSAGE.parse(detoblock.getName(), p))); } detonator.write(); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderButton.java b/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderButton.java index dc1804c4..331954b3 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderButton.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderButton.java @@ -21,9 +21,12 @@ package de.steamwar.bausystem.features.loader; import lombok.AllArgsConstructor; import lombok.Getter; +import lombok.RequiredArgsConstructor; import org.bukkit.block.Block; @AllArgsConstructor +@RequiredArgsConstructor +@Getter public enum LoaderButton { SWITCH(0, true, "LOADER_BUTTON_SWITCH"), WOOD_BUTTON(30, "LOADER_BUTTON_WOOD-Button"), @@ -35,19 +38,10 @@ public enum LoaderButton { DAYLIGHTSENSOR(0, true, "LOADER_BUTTON_DAYLIGHTSENSOR"), INVALID(-1, "LOADER_BUTTON_INVALID"); - @Getter private final int time; - @Getter - private final boolean toggle; - @Getter + private boolean toggle; private final String name; - LoaderButton(int time, String name) { - this.time = time; - this.name = name; - toggle = false; - } - public static LoaderButton fromBlock(Block block) { switch (block.getType()) { case LEVER: