From c696b0260ab37330cf343afc7c9ea35617d60a9a Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 15 Mar 2018 16:51:52 +1100 Subject: [PATCH] Fix anvil set counter --- .../com/boydti/fawe/jnbt/anvil/filters/SetPatternFilter.java | 3 ++- .../boydti/fawe/regions/general/plot/PlotSquaredFeature.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/boydti/fawe/jnbt/anvil/filters/SetPatternFilter.java b/core/src/main/java/com/boydti/fawe/jnbt/anvil/filters/SetPatternFilter.java index eef6f2cf..be240dae 100644 --- a/core/src/main/java/com/boydti/fawe/jnbt/anvil/filters/SetPatternFilter.java +++ b/core/src/main/java/com/boydti/fawe/jnbt/anvil/filters/SetPatternFilter.java @@ -14,7 +14,7 @@ public class SetPatternFilter extends MCAFilterCounter { } @Override - public void applyBlock(int x, int y, int z, BaseBlock block, MutableLong ignore) { + public void applyBlock(int x, int y, int z, BaseBlock block, MutableLong count) { BaseBlock newBlock = to.apply(x, y, z); int currentId = block.getId(); if (FaweCache.hasNBT(currentId)) { @@ -22,5 +22,6 @@ public class SetPatternFilter extends MCAFilterCounter { } block.setId(newBlock.getId()); block.setData(newBlock.getData()); + count.increment(); } } diff --git a/core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java b/core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java index cbdd0bc9..0b32c1e1 100644 --- a/core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java +++ b/core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java @@ -93,7 +93,7 @@ public class PlotSquaredFeature extends FaweMaskManager { return false; } UUID uid = fp.getUUID(); - return !Flags.NO_WORLDEDIT.isTrue(plot) && (plot.isOwner(uid) || (type == MaskType.MEMBER && (plot.getTrusted().contains(uid) || (plot.getMembers().contains(uid) && fp.hasPermission("fawe.plotsquared.member"))))) || fp.hasPermission("fawe.plotsquared.admin")); + return !Flags.NO_WORLDEDIT.isTrue(plot) && ((plot.isOwner(uid) || (type == MaskType.MEMBER && (plot.getTrusted().contains(uid) || (plot.getMembers().contains(uid) && fp.hasPermission("fawe.plotsquared.member"))))) || fp.hasPermission("fawe.plotsquared.admin")); } @Override