mute & unmute improvements

- fix muted player messages being sent to discord
- fix mute sending 2 messages
- tell sender target has been unmuted
This commit is contained in:
speedxx
2020-07-17 19:54:46 -04:00
parent 5a41632654
commit cb1c67e568
3 changed files with 11 additions and 17 deletions

View File

@ -1,7 +1,6 @@
package me.totalfreedom.totalfreedommod;
import com.google.common.base.Strings;
import java.util.Date;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
@ -138,7 +137,7 @@ public class ChatManager extends FreedomService
event.setFormat(format);
// Send to discord
if (!ConfigEntry.ADMIN_ONLY_MODE.getBoolean() && !Bukkit.hasWhitelist())
if (!ConfigEntry.ADMIN_ONLY_MODE.getBoolean() && !Bukkit.hasWhitelist() && !plugin.pl.getPlayer(player).isMuted())
{
plugin.dc.messageChatChannel(plugin.dc.deformat(player.getName()) + " \u00BB " + ChatColor.stripColor(message));
}