diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java index 533bf7f7b..a8f1dc5b6 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java @@ -1289,7 +1289,9 @@ public class PlotMain extends JavaPlugin { "instabreak", "drop-protection", "forcefield", - "titles" + "titles", + "pve", + "pvp" ); List intervalFlags = Arrays.asList( "feed", diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index d68f210a0..773dc1c56 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -730,10 +730,16 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi if (!PlotMain.hasPermission(p,"plots.admin")) { PlayerFunctions.sendMessage(p, C.NO_PLOT_PERMS); e.setCancelled(true); + return; } } else - if (!plot.hasRights(p)) { + if(aPlr && !booleanFlag(plot, "pvp")) + return; + if(!aPlr && !booleanFlag(plot, "pve")) + return; + assert plot != null; + if (!plot.hasRights(p)) { if (!PlotMain.hasPermission(p,"plots.admin")) { PlayerFunctions.sendMessage(p, C.NO_PLOT_PERMS); e.setCancelled(true);