mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-03 06:28:57 +00:00
Add permission to use colored chat messages
This commit is contained in:
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)) {
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user