From b9abe5b5a899eeeb4d8fa3e9f7a8cf14813d5f72 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 11 Apr 2015 15:41:01 +1000 Subject: [PATCH] Fixes #252 --- .../plot/listeners/PlayerEvents_1_8.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents_1_8.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents_1_8.java index f2651086e..634f7ee65 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents_1_8.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents_1_8.java @@ -2,6 +2,8 @@ package com.intellectualcrafters.plot.listeners; import java.util.UUID; +import org.bukkit.entity.ArmorStand; +import org.bukkit.entity.Entity; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; @@ -18,6 +20,10 @@ import com.intellectualcrafters.plot.util.bukkit.BukkitUtil; public class PlayerEvents_1_8 extends PlotListener implements Listener { @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onInteract(final PlayerInteractAtEntityEvent e) { + Entity entity = e.getRightClicked(); + if (!(entity instanceof ArmorStand)) { + return; + } final Location l = BukkitUtil.getLocation(e.getRightClicked().getLocation()); if (isPlotWorld(l)) { e.getPlayer();