Add RecordStatus to multilingual
Dieser Commit ist enthalten in:
Ursprung
2be8254f90
Commit
e1f77b47b3
@ -88,25 +88,30 @@ REGION_TYPE_BUILD = Baubereich
|
|||||||
REGION_TYPE_ONLY_TB = Testblock
|
REGION_TYPE_ONLY_TB = Testblock
|
||||||
|
|
||||||
# GUI
|
# GUI
|
||||||
GUI_EDITOR_ITEM_NAME=§eGui Editor
|
GUI_EDITOR_ITEM-NAME=§eGui Editor
|
||||||
GUI_EXPORT_CODE=§eDein Gui-Code:
|
GUI_EXPORT_CODE=§eDein Gui-Code:
|
||||||
GUI_EXPORT_CODE_HOVER=§eKopieren
|
GUI_EXPORT_CODE-HOVER=§eKopieren
|
||||||
GUI_IMPORT_INVALID_CODE=§eInvalieder Gui-Code
|
GUI_IMPORT_INVALID-CODE=§eInvalieder Gui-Code
|
||||||
GUI_IMPORT_CODE_SUCCESSFUL=§eGui-Code eingelesen
|
GUI_IMPORT_CODE-SUCCESSFUL=§eGui-Code eingelesen
|
||||||
|
|
||||||
# Trace
|
# Trace
|
||||||
TRACE_RECORD = §aan
|
TRACE_RECORD = §aan
|
||||||
TRACE_RECORD_AUTO = §an
|
TRACE_RECORD-AUTO = §an
|
||||||
TRACE_IDLE = §caus
|
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_NAME=Tracer Gui
|
||||||
TRACE_GUI_TRACE_INACTIVE=§eTracer Starten
|
TRACE_GUI_TRACE-INACTIVE=§eTracer Starten
|
||||||
TRACE_GUI_TRACE_ACTIVE=§eTracer Stoppen
|
TRACE_GUI_TRACE-ACTIVE=§eTracer Stoppen
|
||||||
TRACE_GUI_TRACE_ACTIVE_AUTO=§eAuto-Trace ist Aktiv
|
TRACE_GUI_TRACE-ACTIVE-AUTO=§eAuto-Trace ist Aktiv
|
||||||
TRACE_GUI_AUTO_TRACE_INACTIVE=§eAuto-Tracer Aktivieren
|
TRACE_GUI_AUTO-TRACE-INACTIVE=§eAuto-Tracer Aktivieren
|
||||||
TRACE_GUI_AUTO_TRACE_ACTIVE=§eAuto-Tracer Deaktivieren
|
TRACE_GUI_AUTO-TRACE-ACTIVE=§eAuto-Tracer Deaktivieren
|
||||||
TRACE_GUI_SHOW_GUI=§eTrace Show Gui
|
TRACE_GUI_SHOW-GUI=§eTrace Show Gui
|
||||||
TRACE_GUI_DELETE=§eTrace Löschen
|
TRACE_GUI_DELETE=§eTrace Löschen
|
||||||
|
|
||||||
# Loader
|
# Loader
|
||||||
@ -132,5 +137,5 @@ LOADER_BUTTON_DAYLIGHTSENSOR = Tageslichtsensor
|
|||||||
LOADER_BUTTON_INVALID = Invalider
|
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
|
@ -61,7 +61,7 @@ public class BauGUICommand extends SWCommand {
|
|||||||
TextComponent component = new TextComponent();
|
TextComponent component = new TextComponent();
|
||||||
component.setColor(ColorConfig.HIGHLIGHT);
|
component.setColor(ColorConfig.HIGHLIGHT);
|
||||||
component.setBold(true);
|
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.setClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, export));
|
||||||
component.setText(export);
|
component.setText(export);
|
||||||
BauSystem.MESSAGE.send("GUI_EXPORT_CODE", p);
|
BauSystem.MESSAGE.send("GUI_EXPORT_CODE", p);
|
||||||
@ -71,7 +71,7 @@ public class BauGUICommand extends SWCommand {
|
|||||||
@Register("import")
|
@Register("import")
|
||||||
public void importGui(Player p, String code) {
|
public void importGui(Player p, String code) {
|
||||||
if (BauGuiImportExport.importGui(code, p)) {
|
if (BauGuiImportExport.importGui(code, p)) {
|
||||||
BauSystem.MESSAGE.send("GUI_IMPORT_CODE_SUCCESSFUL", p);
|
BauSystem.MESSAGE.send("GUI_IMPORT_CODE-SUCCESSFUL", p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ public class BauGuiEditorGuiItem extends BauGuiItem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getItem(Player player) {
|
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
|
@Override
|
||||||
|
@ -49,14 +49,14 @@ public class BauGuiImportExport {
|
|||||||
public static boolean importGui(String str, Player p) {
|
public static boolean importGui(String str, Player p) {
|
||||||
byte[] bytes = Base64.getDecoder().decode(str);
|
byte[] bytes = Base64.getDecoder().decode(str);
|
||||||
if (bytes.length % 2 != 1 || bytes.length < 2) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
final int size = bytes[bytes.length - 1];
|
final int size = bytes[bytes.length - 1];
|
||||||
if (size > 9 * 5) {
|
if (size > 9 * 5) {
|
||||||
BauSystem.MESSAGE.send("GUI_IMPORT_INVALID_CODE", p);
|
BauSystem.MESSAGE.send("GUI_IMPORT_INVALID-CODE", p);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ public class BauGuiImportExport {
|
|||||||
|
|
||||||
if (map.containsKey((int) key) || map.containsValue((int) value) ||
|
if (map.containsKey((int) key) || map.containsValue((int) value) ||
|
||||||
value >= size || key > itemSize) {
|
value >= size || key > itemSize) {
|
||||||
BauSystem.MESSAGE.send("GUI_IMPORT_INVALID_CODE", p);
|
BauSystem.MESSAGE.send("GUI_IMPORT_INVALID-CODE", p);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,10 +50,10 @@ public class TeleportBauGuiItem extends BauGuiItem {
|
|||||||
@Override
|
@Override
|
||||||
public boolean click(ClickType click, Player p) {
|
public boolean click(ClickType click, Player p) {
|
||||||
p.closeInventory();
|
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);
|
Player t = Bukkit.getPlayer(o);
|
||||||
if (t == null) {
|
if (t == null) {
|
||||||
BauSystem.MESSAGE.send("OTHER_ITEMS_TELEPORT_PLAYER_OFFLINE", p);
|
BauSystem.MESSAGE.send("OTHER_ITEMS_TELEPORT_PLAYER-OFFLINE", p);
|
||||||
} else {
|
} else {
|
||||||
p.performCommand("tp " + t.getName());
|
p.performCommand("tp " + t.getName());
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ public class TraceCommand extends SWCommand {
|
|||||||
public void autoCommand(Player p) {
|
public void autoCommand(Player p) {
|
||||||
if (!permissionCheck(p)) return;
|
if (!permissionCheck(p)) return;
|
||||||
RecordStateMachine.commandAuto();
|
RecordStateMachine.commandAuto();
|
||||||
p.sendMessage(BauSystem.PREFIX + RecordStateMachine.getRecordStatus().getAutoMessage());
|
BauSystem.MESSAGE.send(RecordStateMachine.getRecordStatus().getAutoMessage(), p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register({"clear"})
|
@Register({"clear"})
|
||||||
|
@ -55,36 +55,36 @@ public class TracerBauGuiItem extends BauGuiItem {
|
|||||||
SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("TRACE_GUI_NAME", p));
|
SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("TRACE_GUI_NAME", p));
|
||||||
if (status.isTracing()) {
|
if (status.isTracing()) {
|
||||||
if (status.isAutoTrace()) {
|
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 {
|
} 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");
|
p.performCommand("trace stop");
|
||||||
open(p);
|
open(p);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
} else {
|
} 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");
|
p.performCommand("trace start");
|
||||||
open(p);
|
open(p);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
if (status.isAutoTrace()) {
|
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");
|
p.performCommand("trace auto");
|
||||||
open(p);
|
open(p);
|
||||||
}));
|
}));
|
||||||
} else {
|
} 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");
|
p.performCommand("trace auto");
|
||||||
open(p);
|
open(p);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
if (TraceShowManager.hasActiveShow(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");
|
p.performCommand("trace show gui");
|
||||||
}));
|
}));
|
||||||
} else {
|
} 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");
|
p.performCommand("trace show gui");
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -21,10 +21,10 @@ package de.steamwar.bausystem.features.tracer.record;
|
|||||||
|
|
||||||
public enum RecordStatus {
|
public enum RecordStatus {
|
||||||
|
|
||||||
RECORD("TRACE_RECORD", true, "§cTNT-Tracer muss gestoppt werden"),
|
RECORD("TRACE_RECORD", true, "TRACE_MESSAGE-AUTO_RECORD"),
|
||||||
RECORD_AUTO("TRACE_RECORD_AUTO", true, "§cTNT-Tracer darf nicht aufnehmen"),
|
RECORD_AUTO("TRACE_RECORD-AUTO", true, "TRACE_MESSAGE-AUTO_RECORD-AUTO"),
|
||||||
IDLE("TRACE_IDLE", false, "§cAuto-Tracer gestoppt"),
|
IDLE("TRACE_IDLE", false, "TRACE_MESSAGE-AUTO_IDLE"),
|
||||||
IDLE_AUTO("TRACE_IDLE_AUTO", false, "§aAuto-Tracer gestartet");
|
IDLE_AUTO("TRACE_IDLE-AUTO", false, "TRACE_MESSAGE-AUTO_IDLE-AUTO");
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
boolean tracing;
|
boolean tracing;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren