Archived
0

Fixed syntax error, added color support to chat commands.

This commit is contained in:
minenash
2018-03-11 21:29:25 -04:00
parent e2aeb5a953
commit 73e39d928b
2 changed files with 4 additions and 2 deletions

View File

@@ -20,6 +20,8 @@ import com.redstoner.modules.Module;
import com.redstoner.modules.datamanager.DataManager;
import com.redstoner.modules.ignore.Ignore;
import net.nemez.chatapi.ChatAPI;
@Commands(CommandHolderType.File)
@AutoRegisterListener
@Version(major = 4, minor = 0, revision = 1, compatible = 4)
@@ -150,7 +152,7 @@ public class Chat implements Module, Listener
}
String raw = (String) DataManager.getConfigOrDefault(format, " %n §7→§r %m");
String formatted = raw.replace("%n", name).replace("%m", message);
Utils.broadcast("", formatted, wrap(ModuleLoader.exists("Ignore") ? Ignore.getIgnoredBy(sender) : null, event));
Utils.broadcast("", ChatAPI.colorify(sender, formatted), wrap(ModuleLoader.exists("Ignore") ? Ignore.getIgnoredBy(sender) : null, event));
return true;
}

View File

@@ -36,7 +36,7 @@ import net.nemez.chatapi.ChatAPI;
public class Chatalias implements Module, Listener
{
private final String[] commands = new String[] {"e?r", "e?m .+?", "e?t", "e?w", "e?msg .+?", "e?message .+?",
"e?whisper .+?", "e?me", "cgsay", "ac", "bc", "say", "sayn" ."+?", "chat", "shrug", "action"};
"e?whisper .+?", "e?me", "cgsay", "ac", "bc", "say", "sayn", ".+?", "chat", "shrug", "action"};
private JSONObject aliases = new JSONObject();
@Override