From 6ad51bba650284f92c72651b426ef2423159bd31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien?= <43724816+Aurelien30000@users.noreply.github.com> Date: Wed, 28 Jul 2021 12:42:20 +0200 Subject: [PATCH] Hot-fix for IntellectualSites#3179 (#3188) Authored by @SirYwell ty! --- .../com/plotsquared/bukkit/listener/PlayerEventListener.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java index fd2b384ee..503a6c7f0 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java @@ -1439,6 +1439,9 @@ public class PlayerEventListener extends PlotListener implements Listener { @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onPlayerInteractEntity(PlayerInteractEntityEvent event) { + if (event.getRightClicked().getType() == EntityType.UNKNOWN) { + return; + } Location location = BukkitUtil.adapt(event.getRightClicked().getLocation()); PlotArea area = location.getPlotArea(); if (area == null) {