some more screen langs
This commit is contained in:
parent
2cce314d8e
commit
1f3ee19951
@ -77,6 +77,9 @@ public class LangConfig {
|
||||
public String claimGroupPerms = " Permissions: %s";
|
||||
public String claimGroupPlayers = " Players: %s";
|
||||
|
||||
public String screenEnableText = "Enabled: %s";
|
||||
public String screenUneditable = "Non Editable!";
|
||||
|
||||
public LangConfig(MinecraftServer server) {
|
||||
File configDir = FabricLoader.getInstance().getConfigDir().resolve("flan").toFile();
|
||||
//server.getSavePath(WorldSavePath.ROOT).resolve("config/claimConfigs").toFile();
|
||||
|
@ -33,10 +33,10 @@ public class ServerScreenHelper {
|
||||
lore.add(StringTag.of(Text.Serializer.toJson(trans)));
|
||||
Boolean global = ConfigHandler.config.getGlobal(claim.getWorld(), perm);
|
||||
if (!claim.isAdminClaim() && global != null) {
|
||||
Text text = new LiteralText("Non Editable.").setStyle(Style.EMPTY.withFormatting(Formatting.DARK_RED));
|
||||
Text text = new LiteralText(ConfigHandler.lang.screenUneditable).setStyle(Style.EMPTY.withFormatting(Formatting.DARK_RED));
|
||||
lore.add(StringTag.of(Text.Serializer.toJson(text)));
|
||||
String permFlag = global.toString();
|
||||
Text text2 = new LiteralText("Enabled: " + permFlag).setStyle(Style.EMPTY.withFormatting(permFlag.equals("true") ? Formatting.GREEN : Formatting.RED));
|
||||
Text text2 = new LiteralText(String.format(ConfigHandler.lang.screenEnableText, permFlag)).setStyle(Style.EMPTY.withFormatting(permFlag.equals("true") ? Formatting.GREEN : Formatting.RED));
|
||||
lore.add(StringTag.of(Text.Serializer.toJson(text2)));
|
||||
} else {
|
||||
String permFlag;
|
||||
@ -69,7 +69,7 @@ public class ServerScreenHelper {
|
||||
break;
|
||||
}
|
||||
}
|
||||
Text text = new LiteralText("Enabled: " + permFlag).setStyle(Style.EMPTY.withFormatting(permFlag.equals("true") ? Formatting.GREEN : Formatting.RED));
|
||||
Text text = new LiteralText(String.format(ConfigHandler.lang.screenEnableText, permFlag)).setStyle(Style.EMPTY.withFormatting(permFlag.equals("true") ? Formatting.GREEN : Formatting.RED));
|
||||
lore.add(StringTag.of(Text.Serializer.toJson(text)));
|
||||
}
|
||||
stack.getOrCreateSubTag("display").put("Lore", lore);
|
||||
|
Loading…
x
Reference in New Issue
Block a user