Skip to content

Commit

Permalink
Fix problem with spaces after TITLE
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoKah committed Jul 23, 2017
1 parent 6d5f158 commit 5fd646d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/arckenver/nations/ConfigHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ public static void load(CommandSource src)
Utils.ensureBoolean(config.getNode("others", "enableNationTag"), true);
Utils.ensureString(config.getNode("others", "gravestoneBlock"), "gravestone:gravestone");
Utils.ensureBoolean(config.getNode("others", "enableGoldenAxe"), true);
Utils.ensureString(config.getNode("others", "publicChatFormat"), " &r[&3{NATION}&r] &5{TITLE}&r");
Utils.ensureString(config.getNode("others", "nationChatFormat"), " &r{&e{NATION}&r}");
Utils.ensureString(config.getNode("others", "publicChatFormat"), " &r[&3{NATION}&r] &5{TITLE} &r");
Utils.ensureString(config.getNode("others", "nationChatFormat"), " &r{&eNC&r} ");
Utils.ensureString(config.getNode("others", "nationSpyChatTag"), " &r[&cSPY&r]");


Utils.ensureString(config.getNode("toast", "wild"), "&2{WILD} &7- {FORMATPVP}");
Utils.ensureString(config.getNode("toast", "nation"), "&3{NATION}{FORMATPRESIDENT} &7- {FORMATPVP}");
Utils.ensureString(config.getNode("toast", "zone"), "&3{NATION}{FORMATPRESIDENT} &7~ {FORMATZONENAME}{FORMATZONEOWNER}{FORMATZONEPRICE}{FORMATPVP}");

Utils.ensureString(config.getNode("toast", "formatPresident"), "&7 - &e{TITLE}{NAME}");
Utils.ensureString(config.getNode("toast", "formatPresident"), "&7 - &e{TITLE} {NAME}");
Utils.ensureString(config.getNode("toast", "formatZoneName"), "&a{ARG} &7-");
Utils.ensureString(config.getNode("toast", "formatZoneOwner"), "&e{ARG} &7-");
Utils.ensureString(config.getNode("toast", "formatZonePrice"), "&e[{ARG}] &7-");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public CommandResult execute(CommandSource src, CommandContext ctx) throws Comma
{
Text header = TextSerializers.FORMATTING_CODE.deserialize(ConfigHandler.getNode("others", "nationChatFormat").getString().replaceAll("\\{NATION\\}", nation.getTag()).replaceAll("\\{TITLE\\}", DataHandler.getCitizenTitle(player.getUniqueId())));

Text msg = Text.of(header, " ", TextColors.RESET, player.getName(), TextColors.WHITE, ": ", TextColors.YELLOW, ctx.<String>getOne("msg").get());
Text msg = Text.of(header, TextColors.RESET, player.getName(), TextColors.WHITE, ": ", TextColors.YELLOW, ctx.<String>getOne("msg").get());
channel.send(player, msg);
DataHandler.getSpyChannel().send(Text.of(TextSerializers.FORMATTING_CODE.deserialize(ConfigHandler.getNode("others", "nationSpyChatTag").getString()), TextColors.RESET, msg));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void onPlayerChat(MessageChannelEvent.Chat e, @First Player p)
}
else if (chan instanceof NationMessageChannel)
{
e.setMessage(TextSerializers.FORMATTING_CODE.deserialize(ConfigHandler.getNode("others", "nationChatFormat").getString().replaceAll("\\{NATION\\}", nation.getTag()).replaceAll("\\{TITLE\\}", DataHandler.getCitizenTitle(p.getUniqueId()))), Text.of(TextColors.YELLOW, e.getMessage()));
e.setMessage(Text.of(TextSerializers.FORMATTING_CODE.deserialize(ConfigHandler.getNode("others", "nationChatFormat").getString().replaceAll("\\{NATION\\}", nation.getTag()).replaceAll("\\{TITLE\\}", DataHandler.getCitizenTitle(p.getUniqueId()))), TextColors.YELLOW, e.getMessage()));
DataHandler.getSpyChannel().send(p, Text.of(TextSerializers.FORMATTING_CODE.deserialize(ConfigHandler.getNode("others", "nationSpyChatTag").getString()), TextColors.RESET, e.getMessage()));
}
}
Expand Down

0 comments on commit 5fd646d

Please sign in to comment.