Couple of fixes to road flag logic

This commit is contained in:
dordsor21 2020-07-09 21:52:51 +01:00
parent 1310f9470e
commit 96740fd282
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -1878,8 +1878,7 @@ public class PlayerEvents extends PlotListener implements Listener {
return; return;
} }
} }
if (!plot.hasOwner() && !area.isRoadFlags() && !area if (!plot.hasOwner()) {
.getRoadFlag(MiscInteractFlag.class)) {
if (!Permissions.hasPermission(pp, "plots.admin.interact.unowned")) { if (!Permissions.hasPermission(pp, "plots.admin.interact.unowned")) {
MainUtil.sendMessage(pp, Captions.NO_PERMISSION_EVENT, MainUtil.sendMessage(pp, Captions.NO_PERMISSION_EVENT,
"plots.admin.interact.unowned"); "plots.admin.interact.unowned");
@ -3145,7 +3144,7 @@ public class PlayerEvents extends PlotListener implements Listener {
} }
Plot plot = location.getOwnedPlot(); Plot plot = location.getOwnedPlot();
if (plot == null) { if (plot == null) {
if (area.isRoadFlags() && area.getRoadFlag(ItemDropFlag.class)) { if (area.isRoadFlags() && !area.getRoadFlag(ItemDropFlag.class)) {
event.setCancelled(true); event.setCancelled(true);
} }
return; return;