made signs placed by muted players get cleared on being placed

This commit is contained in:
NewGarbo 2016-01-10 21:16:49 +00:00
parent 734351011a
commit bccee71ff7

View File

@ -16,6 +16,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.entity.FoodLevelChangeEvent;
@ -718,6 +719,20 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
recipients.clear();
}
@EventHandler
public void onSignChange(SignChangeEvent event)
{
PunishClient punishclient = _punish.GetClient(event.getPlayer().getName());
if (punishclient != null && punishclient.IsMuted())
{
for (int i = 0; i < event.getLines().length; i++)
{
event.setLine(i, "");
}
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void handlePlayerChat(AsyncPlayerChatEvent event)
{