A change and a fix

Say the nation name which already uses the color
History command help text fix
This commit is contained in:
Norbi Peti 2019-01-30 23:33:16 +01:00
parent f12912c735
commit 185b0df8e0
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
2 changed files with 4 additions and 4 deletions

View file

@ -43,7 +43,7 @@ public class HistoryCommand extends UCommandBase {
} else {
Optional<Channel> 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());

View file

@ -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;
}
}