Allow players to interact on their own plot

This commit is contained in:
dordsor21 2020-07-08 17:10:09 +01:00
parent d267d1bb98
commit 2936b806f3
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -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());