Remove duplicate perm.

This commit is contained in:
KHobbits 2013-04-13 23:50:17 +01:00
parent 7e80f440ca
commit 656a40abb2
2 changed files with 7 additions and 14 deletions

View file

@ -156,24 +156,17 @@ public class MetaItemStack
throw new Exception(_("onlyPlayerSkulls")); throw new Exception(_("onlyPlayerSkulls"));
} }
} }
else if (split.length > 1 && split[0].equalsIgnoreCase("book") && stack.getType() == Material.WRITTEN_BOOK && hasMetaPermission(sender, "book", false, true, ess)) else if (split.length > 1 && split[0].equalsIgnoreCase("book") && stack.getType() == Material.WRITTEN_BOOK
&& (hasMetaPermission(sender, "book", true, true, ess) || hasMetaPermission(sender, "chapter-" + split[1].toLowerCase(Locale.ENGLISH), true, true, ess)))
{ {
final BookMeta meta = (BookMeta)stack.getItemMeta(); final BookMeta meta = (BookMeta)stack.getItemMeta();
final IText input = new BookInput("book", true, ess); final IText input = new BookInput("book", true, ess);
final BookPager pager = new BookPager(input); final BookPager pager = new BookPager(input);
if (hasMetaPermission(sender, "chapter", true, true, ess) || hasMetaPermission(sender, "chapter-" + split[1].toLowerCase(Locale.ENGLISH), true, true, ess))
{
List<String> pages = pager.getPages(split[1]); List<String> pages = pager.getPages(split[1]);
meta.setPages(pages); meta.setPages(pages);
stack.setItemMeta(meta); stack.setItemMeta(meta);
} }
else
{
throw new Exception(_("noChapterMeta"));
}
}
else if (split.length > 1 && split[0].equalsIgnoreCase("author") && stack.getType() == Material.WRITTEN_BOOK && hasMetaPermission(sender, "author", false, true, ess)) else if (split.length > 1 && split[0].equalsIgnoreCase("author") && stack.getType() == Material.WRITTEN_BOOK && hasMetaPermission(sender, "author", false, true, ess))
{ {
final String author = split[1]; final String author = split[1];