Simplify the configuration and permission of difference command type.
momoservertw opened this issue ยท 3 comments
I have "1545" lines in my items.yml. It may be a little inconvenient to modify the file... XD
Even though I am used to it, it would be more convenient if the setting can be concise. This is easier for people who have just used this plugin, because ItemJoin is now very powerful and the setting is much more complicated than before.
For example, most of my items are enabled globally, and "triggers" is disabled, so the "permission-node" option is not needed.
The slot part uses "Arbitrary", which automatically gives the item in the first space.
Describe the solution you'd like
- Default value of "enabled-worlds": global
- Default value of "triggers": disabled
- Default value of "slot": Arbitrary
- Default value of "permission-node": not permission need. I think the person who need the feature will know that he should setup it? Except for the "Mini game" server, the "survival" server basically only needs an automatically given item "Server Menu".
If the above four options have default values, the configuration will be reduced by 4 lines.
- Advance permission idea:
(1) triggers-permission: like the option "permission-node" before. (More intuitive?)
(2) interact-right-permission: the permission of execute "interact-right" command.
Additional context
I think ItemJoin is about to have no functions to add. As a plugin for custom items (non-RGB), there is no plugin that can surpass it. You are really good...
At most I can think of interacting with "blocks" and "entities", but this seems unnecessary, because this is what the plugin that controls the "Player Event" needs to do.
Okay so small update;
The latest snapshot contains the following;
1.) No slot defaults to ARBITRARY -- ItemJoin menu does not save the slot if it is set to ARBITRARY
2.) No enabled-worlds defaults to ALL/GLOBAL -- ItemJoin menu does not save this if it is set to ALL/GLOBAL
As for the permission-node I need some clarification on this, as far as I know you do not need the permission node defined on the item and the default permission for the item when a node is not defined is itemjoin.nodename
and there is the itemjoin.world.*
to get all items etc. Maybe I am mis-understanding.
Notes;
I will not be able to implement the trigger request as I specifically implemented it so defining no triggers defaults to JOIN so that players will for sure get the item if they simply define an item. It was causing too many issues with new users not understanding how triggers worked thus I added the DISABLE
option. So I apologize for not being able to change this.
Okay so, a follow up to my previous note.
I added a customizable value in the config.yml that you can set as the DEFAULT trigger is no trigger is defined for the item. By default it is set to JOIN but you can change it to DISABLED so you can remove the many trigger lines from your items.
This can also be a listed format just like regular triggers so if you want to default any item not defined with triggers to be given on join, respawn, world-switch you would define it as;
Default-Triggers: JOIN, RESPAWN, WORLD-SWITCH
I hope that makes sense.
Simply add this to your settings section in the config.yml (change JOIN to DISABLED);
Default-Triggers: JOIN
Example;
# These settings will take effect globally throughout the plugins system.
Settings:
HeldItem-Slot: -1
HeldItem-Triggers: JOIN, WORLD-SWITCH
HeldItem-Animations: true
Default-Triggers: JOIN
DataTags: true
Link; https://ci.craftationgaming.com/job/ItemJoin/719/
Remember to remove your old ItemJoin.jar file
These features has been officially added in the release of ItemJoin v5.2.2.
You can grab it here; https://www.spigotmc.org/resources/itemjoin.12661/download?version=403809
Please read the changelog as the documentation has not been updated yet;
https://github.com/RockinChaos/ItemJoin/wiki/Recent-Changes