diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/FlagManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/FlagManager.java index 083cafd60..a1b2d9350 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/FlagManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/FlagManager.java @@ -71,7 +71,7 @@ public class FlagManager { public static List getFlags(final Player player) { final List returnFlags = new ArrayList<>(); for (final AbstractFlag flag : flags) { - if (player.hasPermission("plots.set." + flag.getKey().toLowerCase())) { + if (player.hasPermission("plots.set.flag." + flag.getKey().toLowerCase())) { returnFlags.add(flag); } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java index 1b22e7c63..22ed5110d 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java @@ -262,7 +262,13 @@ public class Set extends SubCommand { sendMessage(plr, C.NAME_LITTLE, "Material", args[1].length() + "", "2"); return true; } - final Material material = getMaterial(args[1], PlotWorld.BLOCKS); + Material material; + try { + material = getMaterial(args[1], PlotWorld.BLOCKS); + } + catch (NullPointerException e) { + material = null; + } /* * for (Material m : PlotWorld.BLOCKS) { * if (m.toString().equalsIgnoreCase(args[1])) {