Add Loader Multi Lang
Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
dcf07291d6
Commit
8f9e428bed
@ -212,26 +212,58 @@ 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
|
||||
|
||||
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
|
||||
LOADER_HELP_1=§8/§eloader setup §8- §7Startet die Aufnahme der Aktionen
|
||||
LOADER_HELP_2=§8/§7loader undo §8- §7Entfernt die zuletzt aufgenommene Aktion
|
||||
LOADER_HELP_3=§8/§eloader start §8- §7Spielt die zuvor aufgenommenen Aktionen ab
|
||||
LOADER_HELP_4=§8/§7loader wait §8[§7Ticks§8] - §7Setzt die Wartezeit zwischen Schüssen
|
||||
LOADER_HELP_5=§8/§7loader speed §8[§7Ticks§8] - §7Setzt die Wartezeit zwischen Aktionen
|
||||
LOADER_HELP_6=§8/§7loader pause §8- §7Pausiert das Abspielen
|
||||
LOADER_HELP_7=§8/§7loader resume §8- §7Spielt den Loader weiter ab
|
||||
LOADER_HELP_8=§8/§eloader stop §8- §7Stoppt die Aufnahme bzw. das Abspielen
|
||||
LOADER_HELP_9=§7Der Loader arbeitet mit §eIngame§8-§eTicks §7(20 Ticks pro Sekunde)
|
||||
LOADER_NO_LOADER=§cDu hast noch keinen Loader. Erstelle dir einen mit /loader setup
|
||||
LOADER_BACK_SETUP=§7Dein Loader ist nun wieder im Setup
|
||||
LOADER_NEW=§7Belade und feuer einmal die Kanone ab, um den Loader zu initialisieren.
|
||||
LOADER_HOW_TO_START=Führe dann /§eloader start§7 um den Loader zu starten
|
||||
LOADER_ACTIVE=§7Der Loader ist nun aktiviert.
|
||||
LOADER_STOP=§7Der Loader ist nun gestoppt.
|
||||
LOADER_PAUSED=§7Der Loader ist nun pausiert.
|
||||
LOADER_RESUME=§7Der Loader läuft nun weiter.
|
||||
LOADER_SMALL_TIME=§cDie Wartezeit ist zu klein
|
||||
LOADER_NEW_TIME=§7Die Schusswartezeit ist nun: {0}, zuvor {1}
|
||||
LOADER_NEW_LOAD_TIME=§7Die Setzwartezeit ist nun: {0}, zuvor {1}
|
||||
LOADER_UNDO=§7Undo erfolgreich.
|
||||
LOADER_PERMS=§cDu darfst hier nicht den Detonator nutzen
|
||||
LOADER_GUI_NAME=Loader
|
||||
LOADER_GUI_NEW=§eNeuer Loader
|
||||
LOADER_GUI_START=§eLoader starten
|
||||
LOADER_GUI_PAUSE=Loader pausieren
|
||||
LOADER_GUI_UNDO=Letzte Aktion Rückgängig machen
|
||||
LOADER_GUI_WAIT=Schuss Delay
|
||||
LOADER_GUI_WAIT_LORE=§7Aktuell: §e{0}
|
||||
LOADER_GUI_WAIT_TITLE=Schuss Delay
|
||||
LOADER_GUI_SPEED=§eGeschwindigkeit
|
||||
LOADER_GUI_SPEED_LORE=§7Aktuell: §e{0}
|
||||
LOADER_GUI_SPEED_TITLE=Block Platzier Geschwindigkeit
|
||||
LOADER_GUI_STOP=§eLoader Stoppen
|
||||
# Loadtimer
|
||||
LOADTIMER_WAITING = §7Platziere ein TNT zum starten...
|
||||
LOADTIMER_BOSSBAR = §7Tick: §e{0}§7(§e{1}§7) Zeit: §e{2}s §7Tnt: §e{3} §7Blöcke
|
||||
LOADTIMER_ACTIVATED = §7Warte auf Zündung
|
||||
LOADTIMER_IGNITION = §7Warte auf Explosion
|
||||
LOADTIMER_SUMARY_HEAD = §7---=== (§eLoadtimer-Auswertung§7) ===---
|
||||
LOADTIMER_SUMARY_PLAYERTABLE_HEAD = §7Spieler: §eTNT §7(§eTNT/s§7)
|
||||
LOADTIMER_SUMARY_PLAYERTABLE_PLAYER = §7{0}: §e{1} §7(§e{2}/s§7)
|
||||
LOADTIMER_SUMARY_PLAYERTABLE_ALL = Insgesamt
|
||||
LOADTIMER_WAITING=§7Platziere ein TNT zum starten...
|
||||
LOADTIMER_BOSSBAR=§7Tick: §e{0}§7(§e{1}§7) Zeit: §e{2}s §7Tnt: §e{3} §7Blöcke
|
||||
LOADTIMER_ACTIVATED=§7Warte auf Zündung
|
||||
LOADTIMER_IGNITION=§7Warte auf Explosion
|
||||
LOADTIMER_SUMARY_HEAD=§7---=== (§eLoadtimer-Auswertung§7) ===---
|
||||
LOADTIMER_SUMARY_PLAYERTABLE_HEAD=§7Spieler: §eTNT §7(§eTNT/s§7)
|
||||
LOADTIMER_SUMARY_PLAYERTABLE_PLAYER=§7{0}: §e{1} §7(§e{2}/s§7)
|
||||
LOADTIMER_SUMARY_PLAYERTABLE_ALL=Insgesamt
|
||||
LOADTIMER_SUMARY_TIMES_HEAD = §7Zeiten: §eSekunden §7(§eTicks§7)
|
||||
LOADTIMER_SUMARY_TIMES_START = §7 || §7Start!
|
||||
LOADTIMER_SUMARY_TIMES_ACTIVATION = §7 || Aktivierung: §e{0}s §7(§e{1}t§7)
|
||||
|
@ -19,11 +19,12 @@
|
||||
|
||||
package de.steamwar.bausystem.features.loader;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.config.ColorConfig;
|
||||
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
||||
import de.steamwar.bausystem.linkage.LinkageType;
|
||||
import de.steamwar.bausystem.linkage.Linked;
|
||||
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
||||
import de.steamwar.inventory.SWAnvilInv;
|
||||
import de.steamwar.inventory.SWInventory;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
@ -43,7 +44,7 @@ public class LoaderBauGuiItem extends BauGuiItem {
|
||||
|
||||
@Override
|
||||
public ItemStack getItem(Player player) {
|
||||
return new SWItem(Material.FLINT_AND_STEEL, ColorConfig.HIGHLIGHT + "Loader").getItemStack();
|
||||
return new SWItem(Material.FLINT_AND_STEEL, ColorConfig.HIGHLIGHT + BauSystem.MESSAGE.parse("LOADER_GUI_NAME", player)).getItemStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,44 +55,44 @@ public class LoaderBauGuiItem extends BauGuiItem {
|
||||
}
|
||||
|
||||
private void openLoaderGui(Player p) {
|
||||
SWInventory inv = new SWInventory(p, 9, "Loader");
|
||||
SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("LOADER_GUI_NAME", p));
|
||||
if (Loader.getLoader(p) == null) {
|
||||
inv.setItem(4, new SWItem(Material.SCUTE, ColorConfig.HIGHLIGHT + "Neuer Loader", clickType -> {
|
||||
inv.setItem(4, new SWItem(Material.SCUTE, BauSystem.MESSAGE.parse("LOADER_GUI_NEW", p), clickType -> {
|
||||
p.closeInventory();
|
||||
p.performCommand("loader setup");
|
||||
}));
|
||||
} else {
|
||||
Loader loader = Loader.getLoader(p);
|
||||
if (loader.getStage() != Loader.Stage.RUNNING) {
|
||||
inv.setItem(0, new SWItem(Material.GREEN_DYE, ColorConfig.HIGHLIGHT + "Loader Starten", clickType -> {
|
||||
inv.setItem(0, new SWItem(Material.GREEN_DYE, BauSystem.MESSAGE.parse("LOADER_GUI_START", p), clickType -> {
|
||||
p.closeInventory();
|
||||
p.performCommand("loader start");
|
||||
}));
|
||||
} else {
|
||||
inv.setItem(0, new SWItem(Material.RED_DYE, ColorConfig.HIGHLIGHT + "Loader pausieren", clickType -> {
|
||||
inv.setItem(0, new SWItem(Material.RED_DYE, BauSystem.MESSAGE.parse("LOADER_GUI_PAUSE", p), clickType -> {
|
||||
p.closeInventory();
|
||||
p.performCommand("loader pause");
|
||||
}));
|
||||
}
|
||||
inv.setItem(2, new SWItem(Material.ARROW, ColorConfig.HIGHLIGHT + "Letzte Aktion Rückgängig machen", clickType -> {
|
||||
inv.setItem(2, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_UNDO", p), clickType -> {
|
||||
p.closeInventory();
|
||||
p.performCommand("loader undo");
|
||||
}));
|
||||
inv.setItem(4, new SWItem(Material.COMPASS, ColorConfig.HIGHLIGHT + "Schuss Delay", Arrays.asList(ColorConfig.BASE + "Aktuell: " + ColorConfig.HIGHLIGHT + loader.getTicksBetweenShots()), false, clickType -> {
|
||||
inv.setItem(4, new SWItem(Material.COMPASS, BauSystem.MESSAGE.parse("LOADER_GUI_WAIT", p), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_WAIT_LORE", p, loader.getTicksBetweenShots())), false, clickType -> {
|
||||
p.closeInventory();
|
||||
SWAnvilInv anvilInv = new SWAnvilInv(p, "Schuss Delay");
|
||||
SWAnvilInv anvilInv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("LOADER_GUI_WAIT_TITLE", p));
|
||||
anvilInv.setItem(Material.CLOCK);
|
||||
anvilInv.setCallback(s -> p.performCommand("loader delay " + s));
|
||||
anvilInv.open();
|
||||
}));
|
||||
inv.setItem(6, new SWItem(Material.CLOCK, ColorConfig.HIGHLIGHT + "Geschwindigkeit", Arrays.asList(ColorConfig.BASE + "Aktuell: " + ColorConfig.HIGHLIGHT + loader.getTicksBetweenBlocks()), false, clickType -> {
|
||||
inv.setItem(6, new SWItem(Material.CLOCK, BauSystem.MESSAGE.parse("LOADER_GUI_SPEED", p), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_SPEED_LORE", p, loader.getTicksBetweenBlocks())), false, clickType -> {
|
||||
p.closeInventory();
|
||||
SWAnvilInv anvilInv = new SWAnvilInv(p, "Block Platzier Geschwindigkeit");
|
||||
SWAnvilInv anvilInv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("LOADER_GUI_SPEED_TITLE", p));
|
||||
anvilInv.setItem(Material.CLOCK);
|
||||
anvilInv.setCallback(s -> p.performCommand("loader speed " + s));
|
||||
anvilInv.open();
|
||||
}));
|
||||
inv.setItem(8, new SWItem(Material.BARRIER, ColorConfig.HIGHLIGHT + "Loader Stoppen", clickType -> {
|
||||
inv.setItem(8, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_STOP", p), clickType -> {
|
||||
p.closeInventory();
|
||||
p.performCommand("loader stop");
|
||||
}));
|
||||
|
@ -21,7 +21,6 @@ package de.steamwar.bausystem.features.loader;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.config.ColorConfig;
|
||||
import de.steamwar.bausystem.linkage.LinkageType;
|
||||
import de.steamwar.bausystem.linkage.Linked;
|
||||
import de.steamwar.command.SWCommand;
|
||||
@ -36,21 +35,21 @@ public class LoaderCommand extends SWCommand {
|
||||
|
||||
@Register(help = true)
|
||||
public void genericHelp(Player p, String... args) {
|
||||
p.sendMessage(ColorConfig.BASE + "---=== (" + ColorConfig.HIGHLIGHT + "Loader" + ColorConfig.BASE + ") ===---");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "loader setup " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Startet die Aufnahme der Aktionen");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.BASE + "loader undo " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Entfernt die zuletzt aufgenommene Aktion");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "loader start " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Spielt die zuvor aufgenommenen Aktionen ab");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.BASE + "loader wait " + ColorConfig.OTHER + "[" + ColorConfig.BASE + "Ticks" + ColorConfig.OTHER + "] - " + ColorConfig.BASE + "Setzt die Wartezeit zwischen Schüssen");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.BASE + "loader speed " + ColorConfig.OTHER + "[" + ColorConfig.BASE + "Ticks" + ColorConfig.OTHER + "] - " + ColorConfig.BASE + "Setzt die Wartezeit zwischen Aktionen");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.BASE + "loader pause " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Pausiert das Abspielen");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.BASE + "loader resume " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Spielt den Loader weiter ab");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "loader stop " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Stoppt die Aufnahme bzw. das Abspielen");
|
||||
p.sendMessage(ColorConfig.BASE + "Der Loader arbeitet mit " + ColorConfig.HIGHLIGHT + "Ingame" + ColorConfig.OTHER + "-" + ColorConfig.HIGHLIGHT + "Ticks " + ColorConfig.OTHER + "(20 Ticks pro Sekunde)");
|
||||
BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Loader");
|
||||
BauSystem.MESSAGE.sendPrefixless("LOADER_HELP_1", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("LOADER_HELP_2", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("LOADER_HELP_3", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("LOADER_HELP_4", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("LOADER_HELP_5", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("LOADER_HELP_6", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("LOADER_HELP_7", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("LOADER_HELP_8", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("LOADER_HELP_9", p);
|
||||
}
|
||||
|
||||
private boolean loaderNullCheck(Loader loader, Player p) {
|
||||
if (loader == null) {
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.ERROR + "Du hast noch keinen Loader. Erstelle dir einen mit /loader setup");
|
||||
BauSystem.MESSAGE.send("LOADER_NO_LOADER", p);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -62,11 +61,11 @@ public class LoaderCommand extends SWCommand {
|
||||
if (permissionCheck(p)) {
|
||||
if (Loader.getLoader(p) != null) {
|
||||
Loader.getLoader(p).setup();
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "Dein Loader ist nun wieder im Setup");
|
||||
BauSystem.MESSAGE.send("LOADER_BACK_SETUP", p);
|
||||
} else {
|
||||
Loader.newLoader(p);
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "Belade und feuer einmal die Kanone ab, um den Loader zu initialisieren.");
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "Führe dann /" + ColorConfig.HIGHLIGHT + "loader start" + ColorConfig.BASE + " um den Loader zu starten");
|
||||
BauSystem.MESSAGE.send("LOADER_NEW", p);
|
||||
BauSystem.MESSAGE.send("LOADER_HOW_TO_START", p);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -79,7 +78,7 @@ public class LoaderCommand extends SWCommand {
|
||||
return;
|
||||
}
|
||||
loader.start();
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "Der Loader ist nun aktiviert.");
|
||||
BauSystem.MESSAGE.send("LOADER_ACTIVE", p);
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,7 +90,7 @@ public class LoaderCommand extends SWCommand {
|
||||
return;
|
||||
}
|
||||
loader.stop();
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "Der Loader ist nun gestoppt.");
|
||||
BauSystem.MESSAGE.send("LOADER_STOP", p);
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,7 +102,7 @@ public class LoaderCommand extends SWCommand {
|
||||
return;
|
||||
}
|
||||
loader.pause();
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "Der Loader ist nun pausiert.");
|
||||
BauSystem.MESSAGE.send("LOADER_PAUSED", p);
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,7 +114,7 @@ public class LoaderCommand extends SWCommand {
|
||||
return;
|
||||
}
|
||||
loader.resume();
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "Der Loader läuft nun weiter.");
|
||||
BauSystem.MESSAGE.send("LOADER_RESUME", p);
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,14 +122,14 @@ public class LoaderCommand extends SWCommand {
|
||||
public void shotDelayLoader(Player p, int delay) {
|
||||
if (permissionCheck(p)) {
|
||||
if (delay < 1) {
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.ERROR + "Die Wartezeit ist zu klein");
|
||||
BauSystem.MESSAGE.send("LOADER_SMALL_TIME", p);
|
||||
return;
|
||||
}
|
||||
Loader loader = Loader.getLoader(p);
|
||||
if (loaderNullCheck(loader, p)) {
|
||||
return;
|
||||
}
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "Die Schusswartezeit ist nun: " + delay + ", zuvor " + loader.getTicksBetweenShots());
|
||||
BauSystem.MESSAGE.send("LOADER_NEW_TIME", p, delay, loader.getTicksBetweenShots());
|
||||
loader.setTicksBetweenShots(delay);
|
||||
}
|
||||
}
|
||||
@ -139,14 +138,14 @@ public class LoaderCommand extends SWCommand {
|
||||
public void speedLoader(Player p, int delay) {
|
||||
if (permissionCheck(p)) {
|
||||
if (delay < 1) {
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.ERROR + "Die Wartezeit ist zu klein");
|
||||
BauSystem.MESSAGE.send("LOADER_SMALL_TIME", p);
|
||||
return;
|
||||
}
|
||||
Loader loader = Loader.getLoader(p);
|
||||
if (loaderNullCheck(loader, p)) {
|
||||
return;
|
||||
}
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "die Setzwartezeit ist nun: " + delay + ", zuvor " + loader.getTicksBetweenBlocks());
|
||||
BauSystem.MESSAGE.send("LOADER_NEW_LOAD_TIME", p, delay, loader.getTicksBetweenBlocks());
|
||||
loader.setTicksBetweenShots(delay);
|
||||
}
|
||||
}
|
||||
@ -158,7 +157,7 @@ public class LoaderCommand extends SWCommand {
|
||||
if (loaderNullCheck(loader, p)) {
|
||||
return;
|
||||
}
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.BASE + "Undo erfolgreich.");
|
||||
BauSystem.MESSAGE.send("LOADER_UNDO", p);
|
||||
loader.undo();
|
||||
}
|
||||
}
|
||||
@ -176,7 +175,7 @@ public class LoaderCommand extends SWCommand {
|
||||
|
||||
private boolean permissionCheck(Player player) {
|
||||
if (!Permission.hasPermission(player, Permission.WORLD)) {
|
||||
player.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + "Du darfst hier nicht den Detonator nutzen");
|
||||
BauSystem.MESSAGE.send("LOADER_PERMS", player);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren