mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-01 07:03:55 +01:00
Add permission to drop Quests Journal, fixes #332
This commit is contained in:
parent
c8df950280
commit
8202fa60af
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user