Archived
0

Fixed improper coloring of various commands

This commit is contained in:
Pepich
2017-09-17 19:47:07 +02:00
parent 99837e4afe
commit b28cab91e0

View File

@@ -31,7 +31,7 @@ import net.nemez.chatapi.click.Message;
@Commands(CommandHolderType.String) @Commands(CommandHolderType.String)
@AutoRegisterListener @AutoRegisterListener
@Version(major = 4, minor = 0, revision = 0, compatible = 4) @Version(major = 4, minor = 0, revision = 1, compatible = 4)
public class Misc implements Module, Listener public class Misc implements Module, Listener
{ {
private final String[] sudoBlacklist = new String[] {"(.*:)?e?sudo", "(.*:)?script.*", "(.*:)?stop", private final String[] sudoBlacklist = new String[] {"(.*:)?e?sudo", "(.*:)?script.*", "(.*:)?stop",
@@ -123,7 +123,7 @@ public class Misc implements Module, Listener
@Command(hook = "echo") @Command(hook = "echo")
public boolean echo(CommandSender sender, String text) public boolean echo(CommandSender sender, String text)
{ {
sender.sendMessage(text); sender.sendMessage(ChatAPI.colorify(null, text));
return true; return true;
} }
@@ -152,7 +152,8 @@ public class Misc implements Module, Listener
@Command(hook = "sayn") @Command(hook = "sayn")
public boolean say(CommandSender sender, String name, String message) public boolean say(CommandSender sender, String name, String message)
{ {
Utils.broadcast(" §7[§9" + name + "§7]: ", "§r" + ChatAPI.colorify(null, message), null); Utils.broadcast(" §7[§9" + ChatAPI.colorify(sender, name) + "§7]: ", "§r" + ChatAPI.colorify(null, message),
null);
return true; return true;
} }