Added /press command, Dynmap nation color support #97
2 changed files with 4 additions and 4 deletions
|
@ -43,7 +43,7 @@ public class HistoryCommand extends UCommandBase {
|
||||||
} else {
|
} else {
|
||||||
Optional<Channel> och = Channel.getChannels().filter(chan -> chan.ID.equalsIgnoreCase(args[0])).findAny();
|
Optional<Channel> och = Channel.getChannels().filter(chan -> chan.ID.equalsIgnoreCase(args[0])).findAny();
|
||||||
if (!och.isPresent()) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
stream = Stream.of(och.get());
|
stream = Stream.of(och.get());
|
||||||
|
|
|
@ -42,9 +42,9 @@ public class NationColorCommand extends AdminCommandBase {
|
||||||
val c = TownColorCommand.getColorOrSendError(args[1], sender);
|
val c = TownColorCommand.getColorOrSendError(args[1], sender);
|
||||||
if (!c.isPresent()) return true;
|
if (!c.isPresent()) return true;
|
||||||
if (!c.get().getName().equals(Color.White.getName())) { //Default nation color
|
if (!c.get().getName().equals(Color.White.getName())) { //Default nation color
|
||||||
for (val nc : TownColorComponent.NationColor.values()) {
|
for (val e : TownColorComponent.NationColor.entrySet()) {
|
||||||
if (nc.getName().equals(c.get().getName())) {
|
if (e.getValue().getName().equals(c.get().getName())) {
|
||||||
sender.sendMessage("§cAnother nation already uses this color!");
|
sender.sendMessage("§The nation " + e.getKey() + " already uses this color!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue