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,9 +178,12 @@ public class PlayerListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerDropItem(PlayerDropItemEvent evt) {
|
public void onPlayerDropItem(PlayerDropItemEvent evt) {
|
||||||
if (ItemUtil.isJournal(evt.getItemDrop().getItemStack()))
|
if (ItemUtil.isJournal(evt.getItemDrop().getItemStack())) {
|
||||||
|
if (!evt.getPlayer().hasPermission("quests.admin.drop")) {
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerInteract(PlayerInteractEvent evt) {
|
public void onPlayerInteract(PlayerInteractEvent evt) {
|
||||||
|
@ -83,6 +83,9 @@ permissions:
|
|||||||
quests.admin.reload:
|
quests.admin.reload:
|
||||||
description: Reload all Quests
|
description: Reload all Quests
|
||||||
default: op
|
default: op
|
||||||
|
quests.admin.drop:
|
||||||
|
description: Drop Quests Journal
|
||||||
|
default: op
|
||||||
quests.editor.editor:
|
quests.editor.editor:
|
||||||
description: Open Quests Editor
|
description: Open Quests Editor
|
||||||
default: op
|
default: op
|
||||||
|
Loading…
Reference in New Issue
Block a user