From 185b0df8e0a1a22956bcd5c8f2ce5c4912e1caf6 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Wed, 30 Jan 2019 23:33:16 +0100 Subject: [PATCH] A change and a fix Say the nation name which already uses the color History command help text fix --- .../buttondevteam/chat/commands/ucmds/HistoryCommand.java | 2 +- .../components/towncolors/admin/NationColorCommand.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/buttondevteam/chat/commands/ucmds/HistoryCommand.java b/src/main/java/buttondevteam/chat/commands/ucmds/HistoryCommand.java index 3dfd6d5..74a3628 100644 --- a/src/main/java/buttondevteam/chat/commands/ucmds/HistoryCommand.java +++ b/src/main/java/buttondevteam/chat/commands/ucmds/HistoryCommand.java @@ -43,7 +43,7 @@ public class HistoryCommand extends UCommandBase { } else { Optional och = Channel.getChannels().filter(chan -> chan.ID.equalsIgnoreCase(args[0])).findAny(); if (!och.isPresent()) { - sender.sendMessage("§cChannel not found. Use the ID, for example: /" + (hc == null ? "u history" : hc.GetCommandPath()) + " ooc"); + sender.sendMessage("§cChannel not found. Use the ID, for example: /" + (hc == null ? "u history" : hc.GetCommandPath()) + " g"); return true; } stream = Stream.of(och.get()); diff --git a/src/main/java/buttondevteam/chat/components/towncolors/admin/NationColorCommand.java b/src/main/java/buttondevteam/chat/components/towncolors/admin/NationColorCommand.java index 4187685..70ae07b 100644 --- a/src/main/java/buttondevteam/chat/components/towncolors/admin/NationColorCommand.java +++ b/src/main/java/buttondevteam/chat/components/towncolors/admin/NationColorCommand.java @@ -42,9 +42,9 @@ public class NationColorCommand extends AdminCommandBase { val c = TownColorCommand.getColorOrSendError(args[1], sender); if (!c.isPresent()) return true; if (!c.get().getName().equals(Color.White.getName())) { //Default nation color - for (val nc : TownColorComponent.NationColor.values()) { - if (nc.getName().equals(c.get().getName())) { - sender.sendMessage("§cAnother nation already uses this color!"); + for (val e : TownColorComponent.NationColor.entrySet()) { + if (e.getValue().getName().equals(c.get().getName())) { + sender.sendMessage("§The nation " + e.getKey() + " already uses this color!"); return true; } }