Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onEntityDamage(EntityDamageEvent event)
- {
- if (event.getEntity() instanceof Player)
- {
- Player player = (Player)event.getEntity();
- if (plugin.blueg.contains(player) || plugin.redg.contains(player))
- {
- if (player.getLastDamageCause() instanceof Player)
- {
- Player d = (Player)player.getLastDamageCause().getEntity();
- if (d != player)
- {
- if (plugin.redg.contains(player) && plugin.redg.contains(d))
- {
- event.setCancelled(true);
- }
- if (plugin.blueg.contains(player) && plugin.blueg.contains(d))
- {
- event.setCancelled(true);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment