mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-09 09:17:39 +00:00
Fixed an NullPointerException with PlotSquared
This commit is contained in:
parent
c1fe16b0e9
commit
e32e17b15c
@ -108,11 +108,14 @@ public class PlotSquaredFeature extends FaweMaskManager {
|
|||||||
@Override
|
@Override
|
||||||
public FaweMask getMask(Player player, MaskType type) {
|
public FaweMask getMask(Player player, MaskType type) {
|
||||||
final PlotPlayer pp = PlotPlayer.wrap(player.getUniqueId());
|
final PlotPlayer pp = PlotPlayer.wrap(player.getUniqueId());
|
||||||
|
if (pp == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
final Set<CuboidRegion> regions;
|
final Set<CuboidRegion> regions;
|
||||||
Plot plot = pp.getCurrentPlot();
|
Plot plot = pp.getCurrentPlot();
|
||||||
if (isAllowed(player, plot, type)) {
|
if (isAllowed(player, plot, type)) {
|
||||||
regions = plot.getRegions();
|
regions = plot.getRegions();
|
||||||
} else {
|
} else {
|
||||||
plot = null;
|
plot = null;
|
||||||
regions = WEManager.getMask(pp);
|
regions = WEManager.getMask(pp);
|
||||||
if (regions.size() == 1) {
|
if (regions.size() == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user