Add permission to drop Quests Journal, fixes #332

This commit is contained in:
HappyPikachu 2018-03-13 22:57:37 -04:00
parent c8df950280
commit 8202fa60af
2 changed files with 8 additions and 2 deletions

View File

@ -178,8 +178,11 @@ public class PlayerListener implements Listener {
@EventHandler
public void onPlayerDropItem(PlayerDropItemEvent evt) {
if (ItemUtil.isJournal(evt.getItemDrop().getItemStack()))
evt.setCancelled(true);
if (ItemUtil.isJournal(evt.getItemDrop().getItemStack())) {
if (!evt.getPlayer().hasPermission("quests.admin.drop")) {
evt.setCancelled(true);
}
}
}
@EventHandler

View File

@ -83,6 +83,9 @@ permissions:
quests.admin.reload:
description: Reload all Quests
default: op
quests.admin.drop:
description: Drop Quests Journal
default: op
quests.editor.editor:
description: Open Quests Editor
default: op