fix mutes not working

This commit is contained in:
NewGarbo 2016-01-10 20:53:55 +00:00
parent fa509f0043
commit 51872faa04

View File

@ -60,6 +60,8 @@ import mineplex.core.packethandler.PacketHandler;
import mineplex.core.portal.Portal;
import mineplex.core.preferences.PreferencesManager;
import mineplex.core.projectile.ProjectileManager;
import mineplex.core.punish.Punish;
import mineplex.core.punish.PunishClient;
import mineplex.core.stats.StatsManager;
import mineplex.core.task.TaskManager;
import mineplex.core.teleport.Teleport;
@ -180,6 +182,8 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
private Explosion _explosion;
private GoldManager _goldManager;
private Punish _punish;
private int _inviteExpire = 2;
private int _nameMin = 3;
private int _nameMax = 10;
@ -203,7 +207,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
// Spawn area
public ClansManager(JavaPlugin plugin, String serverName, PacketHandler packetHandler, CoreClientManager clientManager, DonationManager donationManager, PreferencesManager preferencesManager, BlockRestore blockRestore, Teleport teleport, Chat chat, GearManager gearManager, HologramManager hologramManager, String webServerAddress)
public ClansManager(JavaPlugin plugin, String serverName, PacketHandler packetHandler, Punish punish, CoreClientManager clientManager, DonationManager donationManager, PreferencesManager preferencesManager, BlockRestore blockRestore, Teleport teleport, Chat chat, GearManager gearManager, HologramManager hologramManager, String webServerAddress)
{
super("Clans Manager", plugin);
@ -214,6 +218,8 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
_instance = this;
_punish = punish;
_serverName = serverName;
_clientManager = clientManager;
_combatManager = new CombatManager(plugin);
@ -717,6 +723,13 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
{
event.setCancelled(true);
PunishClient punishclient = _punish.GetClient(event.getPlayer().getName());
if (punishclient != null && punishclient.IsMuted())
{
return;
}
ClientClan client = Get(event.getPlayer());
if (client == null)