From 610c593a4d0691692c50049e08ba6366591d0cfd Mon Sep 17 00:00:00 2001 From: wotnak Date: Sat, 1 Jul 2023 17:34:29 +0200 Subject: [PATCH] add option to configure permissions for each command separately by default `invunload.use` works the same but optionally `invunload.` can be set to restrict/allow access to specific command --- src/main/resources/config.yml | 4 ++++ src/main/resources/plugin.yml | 21 +++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 6d57ee6..e8aa233 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -47,6 +47,10 @@ ############################### # invunload.use: Allows to use the commands /unload, /dump, /unloadinfo, /blacklist +# invunload.unload: Allows to use the command /unload +# invunload.dump: Allows to use the command /dump +# invunload.unloadinfo: Allows to use the command /unloadinfo +# invunload.blacklist: Allows to use the command /blacklist # invunload.reload: Allows to reload the config using /unload reload # invunload.search: Allows to use the command /searchitem diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 3e86e79..8e17fba 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -13,19 +13,19 @@ commands: usage: | / [radius] -- Unloads inventory in nearby matching chests / hotbar -- Toggles whether / affects your hotbar - permission: invunload.use + permission: invunload.unload aliases: [store,ul,invunload,unloadinv] dump: description: Unloads inventory in nearby matching chests and dumps the rest into the nearest chests usage: | / [radius] -- Unloads inventory in nearby matching chests and dumps the rest into the nearest chests / hotbar -- Toggles whether / affects your hotbar - permission: invunload.use + permission: invunload.dump aliases: [invdump,dumpinv] unloadinfo: description: Shows into which chests your last /unload or /dump went into usage: / [duration] - permission: invunload.use + permission: invunload.unloadinfo aliases: [dumpinfo,uli] searchitem: description: Searches for items in nearby chests @@ -49,10 +49,23 @@ commands: / remove hotbar -- Removes all items from your hotbar from your blacklist / remove -- Remove items from your blacklist / reset -- Removes all items from your blacklist - permission: invunload.use + permission: invunload.blacklist permissions: + invunload.unload: + description: Allows usage of the /unload command + invunload.dump: + description: Allows usage of the /dump command + invunload.unloadinfo: + description: Allows usage of the /unloadinfo command + invunload.blacklist: + description: Allows usage of the /blacklist command invunload.use: description: Allows usage of command /unload, /dump, /unloadinfo and /blacklist + children: + invunload.unload: true + invunload.dump: true + invunload.unloadinfo: true + invunload.blacklist: true invunload.search: description: Allows usage of the /searchitem command invunload.reload: