From 4d7cc990e2ba79f5b71bbe1eaa001944ba824ce1 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Tue, 17 Mar 2015 22:43:06 +1100 Subject: [PATCH] Invisibility could also be considered "annoying" --- .../com/intellectualcrafters/plot/listeners/PlayerEvents.java | 4 ++-- .../com/intellectualcrafters/plot/object/BukkitPlayer.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index 71595bf27..16b19330a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -129,7 +129,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi return; } } - if (!(shooter instanceof Player)) { + else if ((shooter instanceof Player)) { PlotPlayer pp = BukkitUtil.getPlayer((Player) shooter); if (plot == null) { if (!pp.hasPermission("plots.projectile.unowned")) { @@ -1120,7 +1120,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi Collection effects = potion.getEffects(); for (PotionEffect effect : effects) { PotionEffectType type = effect.getType(); - if (type == PotionEffectType.BLINDNESS || type == PotionEffectType.CONFUSION || type == PotionEffectType.HARM || type == PotionEffectType.POISON || type == PotionEffectType.SLOW || type == PotionEffectType.SLOW_DIGGING || type == PotionEffectType.WEAKNESS || type == PotionEffectType.WITHER) { + if (type == PotionEffectType.BLINDNESS || type == PotionEffectType.CONFUSION || type == PotionEffectType.HARM || type == PotionEffectType.INVISIBILITY || type == PotionEffectType.POISON || type == PotionEffectType.SLOW || type == PotionEffectType.SLOW_DIGGING || type == PotionEffectType.WEAKNESS || type == PotionEffectType.WITHER) { ProjectileSource shooter = ((Projectile) damager).getShooter(); if (shooter == null || !(shooter instanceof Player)) { return; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BukkitPlayer.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BukkitPlayer.java index dc7c85592..5cc267c79 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BukkitPlayer.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BukkitPlayer.java @@ -23,6 +23,9 @@ public class BukkitPlayer implements PlotPlayer { * @param player */ public BukkitPlayer(final Player player) { + if (player == null) { + System.out.print("=================== NULL PLAYER ========================="); + } this.player = player; }