Update TraceCommand to multilingual
Update TraceShowGui to multilingual Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
2613573cab
Commit
bf90d5c523
@ -191,6 +191,19 @@ TRACE_MESSAGE-AUTO_RECORD=§cTNT-Tracer muss gestoppt werden
|
||||
TRACE_MESSAGE-AUTO_RECORD-AUTO=§cTNT-Tracer darf nicht aufnehmen
|
||||
TRACE_MESSAGE-AUTO_IDLE=§cAuto-Tracer gestoppt
|
||||
TRACE_MESSAGE-AUTO_IDLE-AUTO = §aAuto-Tracer gestartet
|
||||
TRACE_MESSAGE_START = §aTNT-Tracer gestartet
|
||||
TRACE_MESSAGE_STOP = §cTNT-Tracer gestoppt
|
||||
TRACE_MESSAGE_DELETE = §cAlle TNT-Positionen gelöscht
|
||||
TRACE_MESSAGE_SHOW = §aAlle TNT-Positionen angezeigt
|
||||
TRACE_MESSAGE_HIDE = §cAlle TNT-Positionen ausgeblendet
|
||||
TRACE_MESSAGE_DISALLOWED = §cDu darfst hier nicht den TNT-Tracer nutzen
|
||||
|
||||
TRACE_COMMAND_HELP_START = §8/§etrace start §8- §7Startet die Aufnahme aller TNT-Positionen
|
||||
TRACE_COMMAND_HELP_STOP = §8/§etrace stop §8- §7Stoppt den TNT-Tracer
|
||||
TRACE_COMMAND_HELP_AUTO = §8/§etrace toggleauto §8- §7Automatischer Aufnahmenstart
|
||||
TRACE_COMMAND_HELP_SHOW = §8/§etrace show §8- <§e-water§8|§e-interpolate-xz§8|-interpolate-y§8> - §7Zeigt alle TNT-Positionen
|
||||
TRACE_COMMAND_HELP_HIDE = §8/§etrace hide §8- §7Versteckt alle TNT-Positionen
|
||||
TRACE_COMMAND_HELP_DELETE = §8/§etrace delete §8- §7Löscht alle TNT-Positionen
|
||||
|
||||
TRACE_GUI_NAME = Tracer Gui
|
||||
TRACE_GUI_TRACE-INACTIVE = §eTracer Starten
|
||||
@ -201,6 +214,19 @@ TRACE_GUI_AUTO-TRACE-ACTIVE = §eAuto-Tracer Deaktivieren
|
||||
TRACE_GUI_SHOW-GUI = §eTrace Show Gui
|
||||
TRACE_GUI_DELETE = §eTrace Löschen
|
||||
|
||||
TRACE_SHOW_GUI_TITLE = Trace Show GUI
|
||||
TRACE_SHOW_GUI_SHOWN = §aTraces angezeigt
|
||||
TRACE_SHOW_GUI_HIDDEN = §cTraces ausgeblendet
|
||||
TRACE_SHOW_GUI_WATER_ITEM = §eWasser §7Positionen
|
||||
TRACE_SHOW_GUI_WATER_LORE1 = §7Zeigt alles TNT, welches
|
||||
TRACE_SHOW_GUI_WATER_LORE2 = §7im Wasser explodiert ist.
|
||||
TRACE_SHOW_GUI_INTERPOLATE-Y_ITEM = §eInterpolation §7Y-Achse
|
||||
TRACE_SHOW_GUI_INTERPOLATE-Y_LORE1 = §7Zeigt die Interpolation
|
||||
TRACE_SHOW_GUI_INTERPOLATE-Y_LORE2 = §7auf der Y-Achse.
|
||||
TRACE_SHOW_GUI_INTERPOLATE-XZ_ITEM = §eInterpolation §7XZ-Achse
|
||||
TRACE_SHOW_GUI_INTERPOLATE-XZ_LORE1 = §7Zeigt die Interpolation
|
||||
TRACE_SHOW_GUI_INTERPOLATE-XZ_LORE2 = §7auf der XZ-Achse.
|
||||
|
||||
# Loader
|
||||
LOADER_OFF = §caus
|
||||
LOADER_SETUP = §eSetup
|
||||
|
@ -21,7 +21,6 @@ package de.steamwar.bausystem.features.tracer;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.config.ColorConfig;
|
||||
import de.steamwar.bausystem.features.tracer.gui.TraceShowGui;
|
||||
import de.steamwar.bausystem.features.tracer.record.RecordStateMachine;
|
||||
import de.steamwar.bausystem.features.tracer.show.ShowModeParameter;
|
||||
@ -84,13 +83,13 @@ public class TraceCommand extends SWCommand {
|
||||
|
||||
@Register(help = true)
|
||||
public void genericHelp(Player p, String... args) {
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "trace start" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Startet die Aufnahme aller TNT-Positionen");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "trace stop" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Stoppt den TNT-Tracer");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "trace toggleauto" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Automatischer Aufnahmenstart");
|
||||
BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_START", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_STOP", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_AUTO", p);
|
||||
// p.sendMessage("§8/§etrace show gui §8- §7Zeigt die Trace show gui");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "trace show " + ColorConfig.OTHER + "<" + ColorConfig.HIGHLIGHT + "-water" + ColorConfig.OTHER + "|" + ColorConfig.HIGHLIGHT + "-interpolate-xz" + ColorConfig.OTHER + "|" + ColorConfig.HIGHLIGHT + "-interpolate-y" + ColorConfig.OTHER + "> " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Zeigt alle TNT-Positionen");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "trace hide" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Versteckt alle TNT-Positionen");
|
||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "trace delete" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Löscht alle TNT-Positionen");
|
||||
BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_SHOW", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_HIDE", p);
|
||||
BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_DELETE", p);
|
||||
// p.sendMessage("§8/§etrace list §8<§7FRAME-ID§8> §8- §7Listet alle TNT auf");
|
||||
// p.sendMessage("§8/§etrace gui §8- §7Zeigt die Trace Oberfläche an");
|
||||
// p.sendMessage("§7Optionale Parameter mit §8<>§7, Benötigte Parameter mit §8[]");
|
||||
@ -100,14 +99,14 @@ public class TraceCommand extends SWCommand {
|
||||
public void startCommand(Player p) {
|
||||
if (!permissionCheck(p)) return;
|
||||
RecordStateMachine.commandStart();
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.ENABLE + "TNT-Tracer gestartet");
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_START", p);
|
||||
}
|
||||
|
||||
@Register({"stop"})
|
||||
public void stopCommand(Player p) {
|
||||
if (!permissionCheck(p)) return;
|
||||
RecordStateMachine.commandStop();
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + "TNT-Tracer gestoppt");
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_STOP", p);
|
||||
}
|
||||
|
||||
@Register({"toggleauto"})
|
||||
@ -131,14 +130,14 @@ public class TraceCommand extends SWCommand {
|
||||
public void deleteCommand(Player p) {
|
||||
if (!permissionCheck(p)) return;
|
||||
StoredRecords.clear();
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + "Alle TNT-Positionen gelöscht");
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_DELETE", p);
|
||||
}
|
||||
|
||||
@Register({"show"})
|
||||
public void showCommand(Player p) {
|
||||
if (!permissionCheck(p)) return;
|
||||
TraceShowManager.show(p, new TraceEntityShowMode(p, new ShowModeParameter()));
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.ENABLE + "Alle TNT-Positionen angezeigt");
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW", p);
|
||||
}
|
||||
|
||||
@Register({"show"})
|
||||
@ -149,7 +148,7 @@ public class TraceCommand extends SWCommand {
|
||||
showModeParameterType.getShowModeParameterConsumer().accept(showModeParameter);
|
||||
}
|
||||
TraceShowManager.show(p, new TraceEntityShowMode(p, showModeParameter));
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.ENABLE + "Alle TNT-Positionen angezeigt");
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW", p);
|
||||
}
|
||||
|
||||
@Register({"show", "gui"})
|
||||
@ -162,13 +161,13 @@ public class TraceCommand extends SWCommand {
|
||||
public void hideCommand(Player p) {
|
||||
if (!permissionCheck(p)) return;
|
||||
TraceShowManager.hide(p);
|
||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + "Alle TNT-Positionen ausgeblendet");
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_HIDE", p);
|
||||
}
|
||||
|
||||
|
||||
private boolean permissionCheck(Player player) {
|
||||
if (!Permission.hasPermission(player, Permission.WORLD)) {
|
||||
player.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + "Du darfst hier nicht den TNT-Tracer nutzen");
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_DISALLOWED", player);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -47,22 +47,22 @@ public class TraceShowGui {
|
||||
playerShowMode.setInterpolate_XZ(false);
|
||||
ShowModeParameterMap.put(player, playerShowMode);
|
||||
|
||||
SWInventory swInventory = new SWInventory(player, 9, "Trace Show GUI");
|
||||
SWInventory swInventory = new SWInventory(player, 9, BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_TITLE", player));
|
||||
swInventory.addCloseCallback(clickType -> ShowModeParameterMap.remove(player));
|
||||
setActiveShow(player, swInventory);
|
||||
|
||||
SWItem water = new SWItem(Material.TNT, "§eWasser §7Positionen", Arrays.asList("§7Zeigt alles TNT, welches", "§7im Wasser explodiert ist."), false, clickType -> {
|
||||
SWItem water = new SWItem(Material.TNT, BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_WATER_ITEM", player), Arrays.asList(BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_WATER_LORE1", player), BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_WATER_LORE2", player)), false, clickType -> {
|
||||
});
|
||||
swInventory.setItem(5, water);
|
||||
swInventory.setCallback(5, clickType -> toggleHideTNTinWaterExploded(player, swInventory, water));
|
||||
|
||||
SWItem interpolateY = new SWItem(Material.QUARTZ_STAIRS, "§eInterpolation §7Y-Achse", Arrays.asList("§7Zeigt die Interpolation", "§7auf der Y-Achse."), false, clickType -> {
|
||||
SWItem interpolateY = new SWItem(Material.QUARTZ_STAIRS, BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-Y_ITEM", player), Arrays.asList(BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-Y_LORE1", player), BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-Y_LORE2", player)), false, clickType -> {
|
||||
});
|
||||
swInventory.setItem(6, interpolateY);
|
||||
swInventory.setCallback(6, clickType -> toggleInterpolateYPosition(player, swInventory, interpolateY));
|
||||
|
||||
Material xzMaterial = VersionedCallable.call(new VersionedCallable<>(TNTTracer_15::getTraceXZMaterial, 14));
|
||||
SWItem interpolateXZ = new SWItem(xzMaterial, (byte) 7, "§eInterpolation §7XZ-Achse", Arrays.asList("§7Zeigt die Interpolation", "§7auf der XZ-Achse."), false, clickType -> {
|
||||
SWItem interpolateXZ = new SWItem(xzMaterial, (byte) 7, BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-XZ_ITEM", player), Arrays.asList(BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-XZ_LORE1", player), BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-XZ_LORE2", player)), false, clickType -> {
|
||||
});
|
||||
swInventory.setItem(7, interpolateXZ);
|
||||
swInventory.setCallback(7, clickType -> toggleInterpolateXZPosition(player, swInventory, interpolateXZ));
|
||||
@ -76,17 +76,17 @@ public class TraceShowGui {
|
||||
private static void setActiveShow(Player player, SWInventory swInventory) {
|
||||
if (TraceShowManager.hasActiveShow(player)) {
|
||||
Material showMaterial = VersionedCallable.call(new VersionedCallable<>(TNTTracer_15::getTraceShowMaterial, 14));
|
||||
SWItem shown = new SWItem(showMaterial, "§aTraces angezeigt", new ArrayList<>(), false, clickType -> {
|
||||
SWItem shown = new SWItem(showMaterial, BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_SHOWN", player), new ArrayList<>(), false, clickType -> {
|
||||
TraceShowManager.hide(player);
|
||||
player.sendMessage(BauSystem.PREFIX + "§cAlle TNT-Positionen ausgeblendet");
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_HIDE", player);
|
||||
setActiveShow(player, swInventory);
|
||||
});
|
||||
swInventory.setItem(1, shown);
|
||||
} else {
|
||||
Material hideMaterial = VersionedCallable.call(new VersionedCallable<>(TNTTracer_15::getTraceHideMaterial, 14));
|
||||
SWItem hidden = new SWItem(hideMaterial, "§cTraces ausgeblendet", new ArrayList<>(), false, clickType -> {
|
||||
SWItem hidden = new SWItem(hideMaterial, BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_HIDDEN", player), new ArrayList<>(), false, clickType -> {
|
||||
show(player);
|
||||
player.sendMessage(BauSystem.PREFIX + "§aAlle TNT-Positionen angezeigt");
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW", player);
|
||||
setActiveShow(player, swInventory);
|
||||
});
|
||||
swInventory.setItem(1, hidden);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren