SteamWar/BauSystem2.0
Archiviert
12
0

Add RecordStatus to multilingual

Dieser Commit ist enthalten in:
yoyosource 2021-05-13 16:21:50 +02:00
Ursprung 2be8254f90
Commit e1f77b47b3
8 geänderte Dateien mit 39 neuen und 34 gelöschten Zeilen

Datei anzeigen

@ -88,25 +88,30 @@ REGION_TYPE_BUILD = Baubereich
REGION_TYPE_ONLY_TB = Testblock
# GUI
GUI_EDITOR_ITEM_NAME=§eGui Editor
GUI_EDITOR_ITEM-NAME=§eGui Editor
GUI_EXPORT_CODE=§eDein Gui-Code:
GUI_EXPORT_CODE_HOVER=§eKopieren
GUI_IMPORT_INVALID_CODE=§eInvalieder Gui-Code
GUI_IMPORT_CODE_SUCCESSFUL=§eGui-Code eingelesen
GUI_EXPORT_CODE-HOVER=§eKopieren
GUI_IMPORT_INVALID-CODE=§eInvalieder Gui-Code
GUI_IMPORT_CODE-SUCCESSFUL=§eGui-Code eingelesen
# Trace
TRACE_RECORD = §aan
TRACE_RECORD_AUTO = §an
TRACE_RECORD-AUTO = §an
TRACE_IDLE = §caus
TRACE_IDLE_AUTO = §eauto
TRACE_IDLE-AUTO = §eauto
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_GUI_NAME=Tracer Gui
TRACE_GUI_TRACE_INACTIVE=§eTracer Starten
TRACE_GUI_TRACE_ACTIVE=§eTracer Stoppen
TRACE_GUI_TRACE_ACTIVE_AUTO=§eAuto-Trace ist Aktiv
TRACE_GUI_AUTO_TRACE_INACTIVE=§eAuto-Tracer Aktivieren
TRACE_GUI_AUTO_TRACE_ACTIVE=§eAuto-Tracer Deaktivieren
TRACE_GUI_SHOW_GUI=§eTrace Show Gui
TRACE_GUI_TRACE-INACTIVE=§eTracer Starten
TRACE_GUI_TRACE-ACTIVE=§eTracer Stoppen
TRACE_GUI_TRACE-ACTIVE-AUTO=§eAuto-Trace ist Aktiv
TRACE_GUI_AUTO-TRACE-INACTIVE=§eAuto-Tracer Aktivieren
TRACE_GUI_AUTO-TRACE-ACTIVE=§eAuto-Tracer Deaktivieren
TRACE_GUI_SHOW-GUI=§eTrace Show Gui
TRACE_GUI_DELETE=§eTrace Löschen
# Loader
@ -132,5 +137,5 @@ LOADER_BUTTON_DAYLIGHTSENSOR = Tageslichtsensor
LOADER_BUTTON_INVALID = Invalider
# Other
OTHER_ITEMS_TELEPORT_GUI_NAME=Teleportieren
OTHER_ITEMS_TELEPORT_PLAYER_OFFLINE=§cDer Spieler ist Offline
OTHER_ITEMS_TELEPORT_GUI-NAME=Teleportieren
OTHER_ITEMS_TELEPORT_PLAYER-OFFLINE=§cDer Spieler ist Offline

Datei anzeigen

@ -61,7 +61,7 @@ public class BauGUICommand extends SWCommand {
TextComponent component = new TextComponent();
component.setColor(ColorConfig.HIGHLIGHT);
component.setBold(true);
component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(BauSystem.MESSAGE.parse("GUI_EXPORT_CODE_HOVER", p))));
component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(BauSystem.MESSAGE.parse("GUI_EXPORT_CODE-HOVER", p))));
component.setClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, export));
component.setText(export);
BauSystem.MESSAGE.send("GUI_EXPORT_CODE", p);
@ -71,7 +71,7 @@ public class BauGUICommand extends SWCommand {
@Register("import")
public void importGui(Player p, String code) {
if (BauGuiImportExport.importGui(code, p)) {
BauSystem.MESSAGE.send("GUI_IMPORT_CODE_SUCCESSFUL", p);
BauSystem.MESSAGE.send("GUI_IMPORT_CODE-SUCCESSFUL", p);
}
}
}

Datei anzeigen

@ -44,7 +44,7 @@ public class BauGuiEditorGuiItem extends BauGuiItem {
@Override
public ItemStack getItem(Player player) {
return new SWItem(Material.IRON_PICKAXE, BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_NAME", player)).getItemStack();
return new SWItem(Material.IRON_PICKAXE, BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM-NAME", player)).getItemStack();
}
@Override

Datei anzeigen

@ -49,14 +49,14 @@ public class BauGuiImportExport {
public static boolean importGui(String str, Player p) {
byte[] bytes = Base64.getDecoder().decode(str);
if (bytes.length % 2 != 1 || bytes.length < 2) {
BauSystem.MESSAGE.send("GUI_IMPORT_INVALID_CODE", p);
BauSystem.MESSAGE.send("GUI_IMPORT_INVALID-CODE", p);
return false;
}
final int size = bytes[bytes.length - 1];
if (size > 9 * 5) {
BauSystem.MESSAGE.send("GUI_IMPORT_INVALID_CODE", p);
BauSystem.MESSAGE.send("GUI_IMPORT_INVALID-CODE", p);
return false;
}
@ -71,7 +71,7 @@ public class BauGuiImportExport {
if (map.containsKey((int) key) || map.containsValue((int) value) ||
value >= size || key > itemSize) {
BauSystem.MESSAGE.send("GUI_IMPORT_INVALID_CODE", p);
BauSystem.MESSAGE.send("GUI_IMPORT_INVALID-CODE", p);
return false;
}

Datei anzeigen

@ -50,10 +50,10 @@ public class TeleportBauGuiItem extends BauGuiItem {
@Override
public boolean click(ClickType click, Player p) {
p.closeInventory();
SWListInv<UUID> inv = new SWListInv<>(p, BauSystem.MESSAGE.parse("OTHER_ITEMS_TELEPORT_GUI_NAME", p), SWListInv.createPlayerList(p.getUniqueId()), (clickType, o) -> {
SWListInv<UUID> inv = new SWListInv<>(p, BauSystem.MESSAGE.parse("OTHER_ITEMS_TELEPORT_GUI-NAME", p), SWListInv.createPlayerList(p.getUniqueId()), (clickType, o) -> {
Player t = Bukkit.getPlayer(o);
if (t == null) {
BauSystem.MESSAGE.send("OTHER_ITEMS_TELEPORT_PLAYER_OFFLINE", p);
BauSystem.MESSAGE.send("OTHER_ITEMS_TELEPORT_PLAYER-OFFLINE", p);
} else {
p.performCommand("tp " + t.getName());
}

Datei anzeigen

@ -119,7 +119,7 @@ public class TraceCommand extends SWCommand {
public void autoCommand(Player p) {
if (!permissionCheck(p)) return;
RecordStateMachine.commandAuto();
p.sendMessage(BauSystem.PREFIX + RecordStateMachine.getRecordStatus().getAutoMessage());
BauSystem.MESSAGE.send(RecordStateMachine.getRecordStatus().getAutoMessage(), p);
}
@Register({"clear"})

Datei anzeigen

@ -55,36 +55,36 @@ public class TracerBauGuiItem extends BauGuiItem {
SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("TRACE_GUI_NAME", p));
if (status.isTracing()) {
if (status.isAutoTrace()) {
inv.setItem(1, new SWItem(Material.GRAY_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE_ACTIVE_AUTO", p)));
inv.setItem(1, new SWItem(Material.GRAY_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE-ACTIVE-AUTO", p)));
} else {
inv.setItem(1, new SWItem(Material.GREEN_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE_ACTIVE", p), clickType -> {
inv.setItem(1, new SWItem(Material.GREEN_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE-ACTIVE", p), clickType -> {
p.performCommand("trace stop");
open(p);
}));
}
} else {
inv.setItem(1, new SWItem(Material.RED_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE_INACTIVE", p), clickType -> {
inv.setItem(1, new SWItem(Material.RED_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE-INACTIVE", p), clickType -> {
p.performCommand("trace start");
open(p);
}));
}
if (status.isAutoTrace()) {
inv.setItem(3, new SWItem(Material.ENDER_EYE, BauSystem.MESSAGE.parse("TRACE_GUI_AUTO_TRACE_ACTIVE", p), clickType -> {
inv.setItem(3, new SWItem(Material.ENDER_EYE, BauSystem.MESSAGE.parse("TRACE_GUI_AUTO-TRACE-ACTIVE", p), clickType -> {
p.performCommand("trace auto");
open(p);
}));
} else {
inv.setItem(3, new SWItem(Material.FIREWORK_STAR, BauSystem.MESSAGE.parse("TRACE_GUI_AUTO_TRACE_INACTIVE", p), clickType -> {
inv.setItem(3, new SWItem(Material.FIREWORK_STAR, BauSystem.MESSAGE.parse("TRACE_GUI_AUTO-TRACE-INACTIVE", p), clickType -> {
p.performCommand("trace auto");
open(p);
}));
}
if (TraceShowManager.hasActiveShow(p)) {
inv.setItem(5, new SWItem(Material.TNT, BauSystem.MESSAGE.parse("TRACE_GUI_SHOW_GUI", p), clickType -> {
inv.setItem(5, new SWItem(Material.TNT, BauSystem.MESSAGE.parse("TRACE_GUI_SHOW-GUI", p), clickType -> {
p.performCommand("trace show gui");
}));
} else {
inv.setItem(5, new SWItem(Material.GLASS, BauSystem.MESSAGE.parse("TRACE_GUI_SHOW_GUI", p), clickType -> {
inv.setItem(5, new SWItem(Material.GLASS, BauSystem.MESSAGE.parse("TRACE_GUI_SHOW-GUI", p), clickType -> {
p.performCommand("trace show gui");
}));
}

Datei anzeigen

@ -21,10 +21,10 @@ package de.steamwar.bausystem.features.tracer.record;
public enum RecordStatus {
RECORD("TRACE_RECORD", true, "§cTNT-Tracer muss gestoppt werden"),
RECORD_AUTO("TRACE_RECORD_AUTO", true, "§cTNT-Tracer darf nicht aufnehmen"),
IDLE("TRACE_IDLE", false, "§cAuto-Tracer gestoppt"),
IDLE_AUTO("TRACE_IDLE_AUTO", false, "§aAuto-Tracer gestartet");
RECORD("TRACE_RECORD", true, "TRACE_MESSAGE-AUTO_RECORD"),
RECORD_AUTO("TRACE_RECORD-AUTO", true, "TRACE_MESSAGE-AUTO_RECORD-AUTO"),
IDLE("TRACE_IDLE", false, "TRACE_MESSAGE-AUTO_IDLE"),
IDLE_AUTO("TRACE_IDLE-AUTO", false, "TRACE_MESSAGE-AUTO_IDLE-AUTO");
String name;
boolean tracing;