Improved permission handling for "inventory" and "item" actions
This commit is contained in:
parent
02afc6c530
commit
cd8ef0d273
2 changed files with 8 additions and 4 deletions
|
|
@ -209,7 +209,7 @@ public class LookupCommand {
|
||||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||||
return;
|
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));
|
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -233,7 +233,11 @@ public class LookupCommand {
|
||||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||||
return;
|
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));
|
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,8 @@ permissions:
|
||||||
description: Has permission to lookup inventory transactions
|
description: Has permission to lookup inventory transactions
|
||||||
default: op
|
default: op
|
||||||
coreprotect.lookup.item:
|
coreprotect.lookup.item:
|
||||||
description: Has permission to lookup inventory transactions (deprecated)
|
description: Has permission to lookup item transactions
|
||||||
default: true
|
default: op
|
||||||
coreprotect.lookup.kill:
|
coreprotect.lookup.kill:
|
||||||
description: Has permission to lookup entity kills
|
description: Has permission to lookup entity kills
|
||||||
default: op
|
default: op
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue