Added missing permission check for color replacement in chat
This commit is contained in:
parent
91a1cbcbdc
commit
80c0756ef7
3 changed files with 4 additions and 4 deletions
Binary file not shown.
|
@ -70,7 +70,8 @@ public class ChatProcessing {
|
|||
// slashes
|
||||
// first
|
||||
formattedmessage = formattedmessage.replace("\"", "\\\"");
|
||||
formattedmessage = formattedmessage.replace("&", "§");
|
||||
if (PluginMain.permission.has(sender, "tbmc.admin"))
|
||||
formattedmessage = formattedmessage.replace("&", "§");
|
||||
formattedmessage = formattedmessage.replace("§r", "§"
|
||||
+ currentchannel.DisplayName.charAt(1));
|
||||
String suggestmsg = formattedmessage;
|
||||
|
@ -213,9 +214,8 @@ public class ChatProcessing {
|
|||
json.append("[\"\",");
|
||||
json.append(String
|
||||
.format("{\"text\":\"[%s]%s\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"Copy message\",\"color\":\"blue\"}},clickEvent:{\"action\":\"suggest_command\",\"value\":\"%s\"}},",
|
||||
currentchannel.DisplayName,
|
||||
(mplayer != null && !mplayer.RPMode ? "[OOC]" : ""),
|
||||
suggestmsg));
|
||||
currentchannel.DisplayName, (mplayer != null
|
||||
&& !mplayer.RPMode ? "[OOC]" : ""), suggestmsg));
|
||||
json.append("{\"text\":\" <\"},");
|
||||
json.append(String.format("{\"text\":\"%s%s\",",
|
||||
(player != null ? player.getDisplayName() : sender.getName()),
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue