Fixed the wrong disguise option being returned as the bad permission

This commit is contained in:
libraryaddict 2013-11-19 22:53:39 +13:00
parent 9b30140e22
commit 95b6c40b7a

@ -348,7 +348,7 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
for (HashSet<String> perms : optionPermissions) {
if (!perms.containsAll(usedOptions)) {
throw new Exception(ChatColor.RED + "You do not have the permission to use the option "
+ usedOptions.iterator().next());
+ usedOptions.toArray(new String[usedOptions.size()])[usedOptions.size() - 1]);
}
}
}