fix players hurting each other in safe zones

This commit is contained in:
NewGarbo 2015-11-26 05:29:35 +00:00
parent 48ebfc219d
commit 7da8b8e3bf

View File

@ -91,6 +91,15 @@ public class Gameplay extends MiniPlugin
Bukkit.getPluginManager().registerEvents(new CustomCreatures(), plugin);
}
@EventHandler(priority = EventPriority.LOWEST)
public void spawnDamage(CustomDamageEvent event)
{
if (_clansManager.getClanUtility().getClaim(event.GetDamageeEntity().getLocation()) != null && _clansManager.getClanUtility().getClaim(event.GetDamageeEntity().getLocation()).Safe)
{
event.SetCancelled("Safe Zone");
}
}
@EventHandler
public void onPlayerFishing(PlayerFishEvent event)
{