mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-28 12:55:34 +01:00
Improved permission handling for "inventory" and "item" actions
This commit is contained in:
parent
02afc6c530
commit
cd8ef0d273
@ -209,7 +209,7 @@ public class LookupCommand {
|
||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||
return;
|
||||
}
|
||||
if (argAction.contains(4) && !player.hasPermission("coreprotect.lookup.container")) {
|
||||
if (argAction.contains(4) && !argAction.contains(11) && !player.hasPermission("coreprotect.lookup.container")) {
|
||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||
return;
|
||||
}
|
||||
@ -233,7 +233,11 @@ 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.inventory") || !player.hasPermission("coreprotect.lookup.item"))) {
|
||||
if (argAction.contains(11) && !argAction.contains(4) && !player.hasPermission("coreprotect.lookup.item")) {
|
||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||
return;
|
||||
}
|
||||
if (argAction.contains(4) && argAction.contains(11) && !player.hasPermission("coreprotect.lookup.inventory")) {
|
||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||
return;
|
||||
}
|
||||
|
@ -106,8 +106,8 @@ permissions:
|
||||
description: Has permission to lookup inventory transactions
|
||||
default: op
|
||||
coreprotect.lookup.item:
|
||||
description: Has permission to lookup inventory transactions (deprecated)
|
||||
default: true
|
||||
description: Has permission to lookup item transactions
|
||||
default: op
|
||||
coreprotect.lookup.kill:
|
||||
description: Has permission to lookup entity kills
|
||||
default: op
|
||||
|
Loading…
Reference in New Issue
Block a user