From 2936b806f3d48b2e1b1c9f6b78a33aeb3b163e73 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 8 Jul 2020 17:10:09 +0100 Subject: [PATCH] Allow players to interact on their own plot --- .../com/plotsquared/bukkit/listener/PlayerEvents.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java index 841470413..ed812d09f 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java @@ -1864,8 +1864,8 @@ public class PlayerEvents extends PlotListener implements Listener { Plot plot = location.getPlotAbs(); BukkitPlayer pp = BukkitUtil.getPlayer(e.getPlayer()); if (plot == null) { - if (!area.isRoadFlags() && !area.getRoadFlag(MiscInteractFlag.class) - && !Permissions.hasPermission(pp, "plots.admin.interact.road")) { + if (!area.isRoadFlags() && !area.getRoadFlag(MiscInteractFlag.class) && !Permissions + .hasPermission(pp, "plots.admin.interact.road")) { MainUtil.sendMessage(pp, Captions.NO_PERMISSION_EVENT, "plots.admin.interact.road"); e.setCancelled(true); } @@ -2601,8 +2601,8 @@ public class PlayerEvents extends PlotListener implements Listener { Captions.PERMISSION_ADMIN_INTERACT_UNOWNED); event.setCancelled(true); } - } else if ((plot != null && !plot.isAdded(pp.getUUID())) || area - .isRoadFlags()) { + } else if ((plot != null && !plot.isAdded(pp.getUUID())) || (plot == null && area + .isRoadFlags())) { final Entity entity = event.getRightClicked(); final com.sk89q.worldedit.world.entity.EntityType entityType = BukkitAdapter.adapt(entity.getType());