From b9732ccd1a58554903b5c3687afdc7c7e18cb768 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Mon, 13 Apr 2015 00:06:13 +1000 Subject: [PATCH] misc fixes --- PlotSquared/pom.xml | 2 +- .../main/java/com/intellectualcrafters/plot/PlotSquared.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Denied.java | 3 ++- .../java/com/intellectualcrafters/plot/commands/Helpers.java | 3 ++- .../java/com/intellectualcrafters/plot/commands/Trusted.java | 3 ++- .../com/intellectualcrafters/plot/listeners/PlayerEvents.java | 4 ++-- .../plot/listeners/worldedit/WEListener.java | 2 +- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/PlotSquared/pom.xml b/PlotSquared/pom.xml index 8cd4d82de..fd3477722 100644 --- a/PlotSquared/pom.xml +++ b/PlotSquared/pom.xml @@ -8,7 +8,7 @@ UTF-8 PlotSquared - 2.9.12 + 2.9.13 PlotSquared jar diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java index af8fa900f..9b67552ed 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java @@ -709,7 +709,7 @@ public class PlotSquared { final List booleanFlags = Arrays.asList("notify-enter", "notify-leave", "item-drop", "invincible", "instabreak", "drop-protection", "forcefield", "titles", "pve", "pvp", "no-worldedit", "redstone"); final List intervalFlags = Arrays.asList("feed", "heal"); final List stringFlags = Arrays.asList("greeting", "farewell"); - final List intFlags = Arrays.asList("entity-cap", "animal-cap", "mob-cap"); + final List intFlags = Arrays.asList("mob-cap", "animal-cap", "hostile-cap"); for (final String flag : stringFlags) { FlagManager.addFlag(new AbstractFlag(flag)); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java index 4cca27500..5262419ce 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java @@ -20,6 +20,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; import java.util.UUID; import com.intellectualcrafters.plot.config.C; @@ -105,9 +106,9 @@ public class Denied extends SubCommand { return true; } for (UUID uuid : plot.denied) { - plot.removeDenied(uuid); DBFunc.removeDenied(loc.getWorld(), plot, uuid); } + plot.denied = new ArrayList<>(); MainUtil.sendMessage(plr, C.DENIED_REMOVED); return true; } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java index 93d81cab2..585c4582c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java @@ -20,6 +20,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; import java.util.UUID; import com.intellectualcrafters.plot.config.C; @@ -96,9 +97,9 @@ public class Helpers extends SubCommand { return true; } for (UUID uuid : plot.helpers) { - plot.removeHelper(uuid); DBFunc.removeHelper(loc.getWorld(), plot, uuid); } + plot.helpers = new ArrayList<>(); MainUtil.sendMessage(plr, C.HELPER_REMOVED); return true; } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java index b4a181d0e..ea74aba5c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java @@ -20,6 +20,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; import java.util.UUID; import com.intellectualcrafters.plot.config.C; @@ -97,9 +98,9 @@ public class Trusted extends SubCommand { return true; } for (UUID uuid : plot.trusted) { - plot.removeTrusted(uuid); DBFunc.removeTrusted(loc.getWorld(), plot, uuid); } + plot.trusted = new ArrayList<>(); MainUtil.sendMessage(plr, C.TRUSTED_REMOVED); return true; } 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 0972694e8..ef7f498a9 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -809,9 +809,9 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi } Plot plot = MainUtil.getPlot(loc); if (plot != null && plot.owner != null) { - Flag entityFlag = FlagManager.getPlotFlag(plot, "entity-cap"); + Flag entityFlag = FlagManager.getPlotFlag(plot, "mob-cap"); Flag animalFlag = FlagManager.getPlotFlag(plot, "animal-cap"); - Flag monsterFlag = FlagManager.getPlotFlag(plot, "mob-cap"); + Flag monsterFlag = FlagManager.getPlotFlag(plot, "hostile-cap"); if (!(entity instanceof Creature)) { return; } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/worldedit/WEListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/worldedit/WEListener.java index 78c6a20f0..2a59831aa 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/worldedit/WEListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/worldedit/WEListener.java @@ -110,7 +110,7 @@ public class WEListener implements Listener { HashSet regions = new HashSet<>(); UUID uuid = player.getUUID(); for (Plot plot : PlotSquared.getPlots(player.getLocation().getWorld()).values()) { - if (!plot.settings.getMerged(1) && !plot.settings.getMerged(2)) { + if (!plot.settings.getMerged(0) && !plot.settings.getMerged(3)) { if (plot.isOwner(uuid) || plot.helpers.contains(uuid)) { Location pos1 = MainUtil.getPlotBottomLoc(plot.world, plot.id).add(1, 0, 1); Location pos2 = MainUtil.getPlotTopLoc(plot.world, plot.id);