Invisibility could also be considered "annoying"

This commit is contained in:
boy0001 2015-03-17 22:43:06 +11:00
parent d43cff88db
commit 4d7cc990e2
2 changed files with 5 additions and 2 deletions

View File

@ -129,7 +129,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
return; return;
} }
} }
if (!(shooter instanceof Player)) { else if ((shooter instanceof Player)) {
PlotPlayer pp = BukkitUtil.getPlayer((Player) shooter); PlotPlayer pp = BukkitUtil.getPlayer((Player) shooter);
if (plot == null) { if (plot == null) {
if (!pp.hasPermission("plots.projectile.unowned")) { if (!pp.hasPermission("plots.projectile.unowned")) {
@ -1120,7 +1120,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
Collection<PotionEffect> effects = potion.getEffects(); Collection<PotionEffect> effects = potion.getEffects();
for (PotionEffect effect : effects) { for (PotionEffect effect : effects) {
PotionEffectType type = effect.getType(); 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(); ProjectileSource shooter = ((Projectile) damager).getShooter();
if (shooter == null || !(shooter instanceof Player)) { if (shooter == null || !(shooter instanceof Player)) {
return; return;

View File

@ -23,6 +23,9 @@ public class BukkitPlayer implements PlotPlayer {
* @param player * @param player
*/ */
public BukkitPlayer(final Player player) { public BukkitPlayer(final Player player) {
if (player == null) {
System.out.print("=================== NULL PLAYER =========================");
}
this.player = player; this.player = player;
} }