Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onPlayerDamage(EntityDamageByEntityEvent e) {
- if (Protection.hasProtection(e.getEntity().getLocation()))
- //This runs
- e.setCancelled(true);
- if (Protection.hasProtection(e.getDamager().getLocation()))
- //This runs
- e.setCancelled(true);
- if(e.getDamager() instanceof Player)
- if(ProtectionCooldown.isOnProtCooldown((Player) e.getDamager()))
- e.setCancelled(true);
- if(e.getEntity() instanceof Player)
- if(ProtectionCooldown.isOnProtCooldown((Player) e.getEntity()))
- e.setCancelled(true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement