This commit is contained in:
boy0001 2015-04-11 15:41:01 +10:00
parent 09424c30b4
commit b9abe5b5a8

View File

@ -2,6 +2,8 @@ package com.intellectualcrafters.plot.listeners;
import java.util.UUID; import java.util.UUID;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Entity;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; 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 { public class PlayerEvents_1_8 extends PlotListener implements Listener {
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onInteract(final PlayerInteractAtEntityEvent e) { public void onInteract(final PlayerInteractAtEntityEvent e) {
Entity entity = e.getRightClicked();
if (!(entity instanceof ArmorStand)) {
return;
}
final Location l = BukkitUtil.getLocation(e.getRightClicked().getLocation()); final Location l = BukkitUtil.getLocation(e.getRightClicked().getLocation());
if (isPlotWorld(l)) { if (isPlotWorld(l)) {
e.getPlayer(); e.getPlayer();