SteamWar/BauSystem2.0
Archiviert
12
0

Add LoaderButton to multilingual

Dieser Commit ist enthalten in:
yoyosource 2021-05-13 16:14:41 +02:00
Ursprung 47e7442fab
Commit 2be8254f90
3 geänderte Dateien mit 28 neuen und 14 gelöschten Zeilen

Datei anzeigen

@ -116,6 +116,21 @@ LOADER_RUNNING = §aRunning
LOADER_PAUSE = §7Pause LOADER_PAUSE = §7Pause
LOADER_END = §8Finished LOADER_END = §8Finished
LOADER_MESSAGE_CLEAR = §7Loader gecleart
LOADER_MESSAGE_CLEAR-HELP = §cDu must im Setup-Modus sein um den Loader zu clearen
LOADER_MESSAGE_TNT = §eTNT hinzugefügt {0}
LOADER_MESSAGE_INTERACT = §e{0} hinzugefügt {1}
LOADER_BUTTON_SWITCH = Hebel
LOADER_BUTTON_WOOD-Button = Knopf
LOADER_BUTTON_STONE-Button = Knopf
LOADER_BUTTON_PRESSURE-PLATE = Druckplatte
LOADER_BUTTON_WEIGHTED-PRESSURE-PLATE = Druckplatte
LOADER_BUTTON_TRIPWIRE = Tripwire
LOADER_BUTTON_NOTEBLOCK = Noteblock
LOADER_BUTTON_DAYLIGHTSENSOR = Tageslichtsensor
LOADER_BUTTON_INVALID = Invalider
# Other # Other
OTHER_ITEMS_TELEPORT_GUI_NAME=Teleportieren OTHER_ITEMS_TELEPORT_GUI_NAME=Teleportieren
OTHER_ITEMS_TELEPORT_PLAYER_OFFLINE=§cDer Spieler ist Offline OTHER_ITEMS_TELEPORT_PLAYER_OFFLINE=§cDer Spieler ist Offline

Datei anzeigen

@ -21,7 +21,6 @@ package de.steamwar.bausystem.features.loader;
import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.SWUtils;
import de.steamwar.bausystem.config.ColorConfig;
import de.steamwar.bausystem.features.loader.activations.AbstractLoaderActivation; import de.steamwar.bausystem.features.loader.activations.AbstractLoaderActivation;
import de.steamwar.bausystem.features.loader.activations.BlockPlaceLoaderActivation; import de.steamwar.bausystem.features.loader.activations.BlockPlaceLoaderActivation;
import de.steamwar.bausystem.features.loader.activations.InteractionActivation; import de.steamwar.bausystem.features.loader.activations.InteractionActivation;
@ -117,9 +116,9 @@ public class Loader implements Listener {
public void clear() { public void clear() {
if (stage == Stage.SETUP) { if (stage == Stage.SETUP) {
actions.clear(); actions.clear();
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "Loader gecleart"); BauSystem.MESSAGE.send("LOADER_MESSAGE_CLEAR", p);
} else { } else {
p.sendMessage(BauSystem.PREFIX + ColorConfig.ERROR + "Du must im Setup-Modus sein um den Loader zu clearen"); BauSystem.MESSAGE.send("LOADER_MESSAGE_CLEAR-HELP", p);
} }
} }
@ -173,7 +172,7 @@ public class Loader implements Listener {
} }
actions.add(new BlockPlaceLoaderActivation(p, event.getBlock().getLocation(), Material.TNT)); actions.add(new BlockPlaceLoaderActivation(p, event.getBlock().getLocation(), Material.TNT));
SWUtils.sendToActionbar(p, ColorConfig.HIGHLIGHT + "TNT hinzugefügt " + actions.size()); SWUtils.sendToActionbar(p, BauSystem.MESSAGE.parse("LOADER_MESSAGE_TNT", p, actions.size()));
} }
@EventHandler @EventHandler
@ -194,7 +193,7 @@ public class Loader implements Listener {
if (button != LoaderButton.INVALID) { if (button != LoaderButton.INVALID) {
actions.add(InteractionActivation.construct(p, event.getClickedBlock().getLocation(), this)); actions.add(InteractionActivation.construct(p, event.getClickedBlock().getLocation(), this));
lastActivation = 0; lastActivation = 0;
SWUtils.sendToActionbar(p, ColorConfig.HIGHLIGHT + button.getName() + " hinzugefügt " + actions.size()); SWUtils.sendToActionbar(p, BauSystem.MESSAGE.parse("LOADER_MESSAGE_INTERACT", p, BauSystem.MESSAGE.parse(button.getName(), p), actions.size()));
} }
} }

Datei anzeigen

@ -25,15 +25,15 @@ import org.bukkit.block.Block;
@AllArgsConstructor @AllArgsConstructor
public enum LoaderButton { public enum LoaderButton {
SWITCH(0, true, "Hebel"), SWITCH(0, true, "LOADER_BUTTON_SWITCH"),
WOOD_BUTTON(30, "Knopf"), WOOD_BUTTON(30, "LOADER_BUTTON_WOOD-Button"),
STONE_BUTTON(20, "Knopf"), STONE_BUTTON(20, "LOADER_BUTTON_STONE-Button"),
PRESSURE_PLATE(30, "Druckplatte"), PRESSURE_PLATE(30, "LOADER_BUTTON_PRESSURE-PLATE"),
WEIGHTED_PRESSURE_PLATE(20, "Druckplatte"), WEIGHTED_PRESSURE_PLATE(20, "LOADER_BUTTON_WEIGHTED-PRESSURE-PLATE"),
TRIPWIRE(30, "Tripwire"), TRIPWIRE(30, "LOADER_BUTTON_TRIPWIRE"),
NOTEBLOCK(1, "Noteblock"), NOTEBLOCK(1, "LOADER_BUTTON_NOTEBLOCK"),
DAYLIGHTSENSOR(0, true, "Tageslichtsensor"), DAYLIGHTSENSOR(0, true, "LOADER_BUTTON_DAYLIGHTSENSOR"),
INVALID(-1, "Invalider"); INVALID(-1, "LOADER_BUTTON_INVALID");
@Getter @Getter
private final int time; private final int time;