added * perms for disguise commands

This commit is contained in:
Andrew
2013-09-19 08:19:39 +12:00
parent 7b079d3c2f
commit 5215025ffa
4 changed files with 15 additions and 4 deletions

View File

@@ -28,7 +28,8 @@ public class DisguiseEntityCommand implements CommandExecutor {
ArrayList<String> names = new ArrayList<String>();
for (DisguiseType type : DisguiseType.values()) {
String name = type.name().toLowerCase();
if (sender.hasPermission("libsdisguises.disguiseentity." + name))
if (sender.hasPermission("libsdisguises.disguiseentity.*")
|| sender.hasPermission("libsdisguises.disguiseentity." + name))
names.add(name);
}
Collections.sort(names, String.CASE_INSENSITIVE_ORDER);
@@ -37,6 +38,8 @@ public class DisguiseEntityCommand implements CommandExecutor {
private ArrayList<String> forbiddenDisguises(CommandSender sender) {
ArrayList<String> names = new ArrayList<String>();
if (sender.hasPermission("libsdisguises.disguiseentity.*"))
return names;
for (DisguiseType type : DisguiseType.values()) {
String name = type.name().toLowerCase();
if (!sender.hasPermission("libsdisguises.disguiseentity." + name))