Add permission to use colored chat messages

This commit is contained in:
Andrew Yunt committed 2016-03-28 19:40:16 -07:00
1 parent 3f8ca2cef2
commit f8c88259a0
2 files changed
+7

No files matched your search

@@ -2,6 +2,7 @@ package com.palmergames.bukkit.TownyChat.listener;
import java.util.WeakHashMap;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@@ -160,6 +161,9 @@ public class TownyChatPlayerListener implements Listener {
Player player = event.getPlayer();
if(player.hasPermission("townychat.chat.color"))
event.setMessage(ChatColor.translateAlternateColorCodes('&', event.getMessage()));
// Check if essentials has this player muted.
if (!isMuted(player)) {
+3
View File
@@ -57,3 +57,6 @@ permissions:
townychat.mod.unmute:
description: Allows mods access to the unmute command to remove a previous mute.
default: op
townychat.chat.color:
description: Allows players to use colors to format chat messages.
default: op