From e32e17b15c47633b2f926c33d05b9ffda73736ed Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Thu, 5 Mar 2020 18:05:33 -0500 Subject: [PATCH] Fixed an NullPointerException with PlotSquared --- .../fawe/bukkit/regions/plotsquared/PlotSquaredFeature.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/regions/plotsquared/PlotSquaredFeature.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/regions/plotsquared/PlotSquaredFeature.java index 2d2c31118..0f08e2ec9 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/regions/plotsquared/PlotSquaredFeature.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/regions/plotsquared/PlotSquaredFeature.java @@ -108,11 +108,14 @@ public class PlotSquaredFeature extends FaweMaskManager { @Override public FaweMask getMask(Player player, MaskType type) { final PlotPlayer pp = PlotPlayer.wrap(player.getUniqueId()); + if (pp == null) { + return null; + } final Set regions; Plot plot = pp.getCurrentPlot(); if (isAllowed(player, plot, type)) { regions = plot.getRegions(); - } else { + } else { plot = null; regions = WEManager.getMask(pp); if (regions.size() == 1) {