- Add unmute & mute and some checks as well as fix prefix bug

This commit is contained in:
Taah
2022-02-25 00:59:48 -08:00
parent bc461ee870
commit 1b856db297
12 changed files with 197 additions and 5 deletions

View File

@ -26,6 +26,12 @@ public class ChatListener extends PlexListener
public void onChat(AsyncChatEvent event)
{
PlexPlayer plexPlayer = PlayerCache.getPlexPlayerMap().get(event.getPlayer().getUniqueId());
if (PlayerCache.getPunishedPlayer(event.getPlayer().getUniqueId()).isMuted())
{
event.getPlayer().sendMessage(PlexUtils.messageComponent("muted"));
event.setCancelled(true);
return;
}
String prefix = plugin.getRankManager().getPrefix(plexPlayer);
if (!prefix.isEmpty())