mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixes #252
This commit is contained in:
parent
09424c30b4
commit
b9abe5b5a8
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user