From aeba1918f3141aa9a02a70231f3503d4cdca7de3 Mon Sep 17 00:00:00 2001 From: Intelli Date: Mon, 26 Jul 2021 18:49:39 -0600 Subject: [PATCH] Changed name of "coreprotect.lookup.item" permission to "coreprotect.lookup.inventory" --- docs/permissions.md | 4 ++-- src/main/java/net/coreprotect/command/LookupCommand.java | 2 +- src/main/resources/plugin.yml | 9 +++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/permissions.md b/docs/permissions.md index 13fb1bd..5dd5d33 100644 --- a/docs/permissions.md +++ b/docs/permissions.md @@ -55,8 +55,8 @@ The following permissions can be used to restrict functionality within the plugi * **coreprotect.lookup.container** *(default: op)* Can be optionally used as a negative permission to prevent container lookups.   -* **coreprotect.lookup.item** *(default: op)* - Can be optionally used as a negative permission to prevent item lookups. +* **coreprotect.lookup.inventory** *(default: op)* + Can be optionally used as a negative permission to prevent inventory lookups.   * **coreprotect.lookup.kill** *(default: op)* Can be optionally used as a negative permission to prevent entity kill lookups. diff --git a/src/main/java/net/coreprotect/command/LookupCommand.java b/src/main/java/net/coreprotect/command/LookupCommand.java index f696654..404b1b9 100755 --- a/src/main/java/net/coreprotect/command/LookupCommand.java +++ b/src/main/java/net/coreprotect/command/LookupCommand.java @@ -227,7 +227,7 @@ public class LookupCommand { Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION)); return; } - if (argAction.contains(11) && !player.hasPermission("coreprotect.lookup.item")) { + if (argAction.contains(11) && (!player.hasPermission("coreprotect.lookup.inventory") || !player.hasPermission("coreprotect.lookup.item"))) { Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION)); return; } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index cbb30ac..54a2ad0 100755 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -44,6 +44,7 @@ permissions: coreprotect.lookup.sign: true coreprotect.lookup.click: true coreprotect.lookup.container: true + coreprotect.lookup.inventory: true coreprotect.lookup.item: true coreprotect.lookup.kill: true coreprotect.teleport: true @@ -71,6 +72,7 @@ permissions: coreprotect.lookup.sign: true coreprotect.lookup.click: true coreprotect.lookup.container: true + coreprotect.lookup.inventory: true coreprotect.lookup.item: true coreprotect.lookup.kill: true coreprotect.lookup.near: @@ -100,9 +102,12 @@ permissions: coreprotect.lookup.container: description: Has permission to lookup container transactions default: op - coreprotect.lookup.item: - description: Has permission to lookup item transactions + coreprotect.lookup.inventory: + description: Has permission to lookup inventory transactions default: op + coreprotect.lookup.item: + description: Has permission to lookup inventory transactions (deprecated) + default: true coreprotect.lookup.kill: description: Has permission to lookup entity kills default: op