fixed bugs

This commit is contained in:
boy0001 2014-11-07 21:30:29 +11:00
parent 487aa93986
commit 12c476f3c2
2 changed files with 8 additions and 2 deletions

View File

@ -71,7 +71,7 @@ public class FlagManager {
public static List<AbstractFlag> getFlags(final Player player) { public static List<AbstractFlag> getFlags(final Player player) {
final List<AbstractFlag> returnFlags = new ArrayList<>(); final List<AbstractFlag> returnFlags = new ArrayList<>();
for (final AbstractFlag flag : flags) { 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); returnFlags.add(flag);
} }
} }

View File

@ -262,7 +262,13 @@ public class Set extends SubCommand {
sendMessage(plr, C.NAME_LITTLE, "Material", args[1].length() + "", "2"); sendMessage(plr, C.NAME_LITTLE, "Material", args[1].length() + "", "2");
return true; 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) { * for (Material m : PlotWorld.BLOCKS) {
* if (m.toString().equalsIgnoreCase(args[1])) { * if (m.toString().equalsIgnoreCase(args[1])) {