mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-12-23 09:31:46 +00:00
Fixed NPE when creating a shop not in a PlotSquared plot
This commit is contained in:
parent
71e2c48cc2
commit
08f65dbee0
@ -246,7 +246,7 @@ public class Utils {
|
||||
* @return Whether the flag is allowed for the player
|
||||
*/
|
||||
public static boolean isFlagAllowedOnPlot(Plot plot, Flag flag, Player p) {
|
||||
if (flag != null) {
|
||||
if (plot != null && flag != null) {
|
||||
Object o = plot.getFlag(flag, PlotSquaredShopFlag.Group.NONE);
|
||||
|
||||
if (o instanceof PlotSquaredShopFlag.Group) {
|
||||
@ -267,7 +267,7 @@ public class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user