Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Click Command/Action Variables #69

Open
UPSOKen opened this issue Feb 15, 2024 · 0 comments
Open

[Feature Request] Click Command/Action Variables #69

UPSOKen opened this issue Feb 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@UPSOKen
Copy link

UPSOKen commented Feb 15, 2024

After consideration - I think this should be called "Saved Action Variables". This is too differentiate it a bit from regular "actions". Having "saved" before the title of the feature would immediately differentiate it from the "actions" section.

I think there needs to be a "Saved Click Command/Action Variables" feature that works across the plugin.

These variables should have the option to be "per-menu" (Within the menu file) or global for any menu (a separate file).

Specifically for things like click commands. Where you could have a list like this:

- CDVAR1: '[message] &8(&cCOOLDOWN&8) &7You can not send another public stat message for &e%mcd_left_formatted_StatBroadcastCD%&7.'

And then any click commands section could use it, and then if you needed to change something like the formatting - you would only need to update one variable. EX:

deny_commands:
          - '[sound] ENTITY_GOAT_RAM_IMPACT 1 0.5'
          - '[sound] ENTITY_ITEM_FRAME_BREAK 1 0.5'
          - '[sound] ENTITY_VILLAGER_NO 1 1'
          - '[variable] CDVAR1'

^ The last line would execute the action defined earlier.

This would make it a lot simpler to put together menus where many items have similar messages (like cooldowns). Saves you from cluttering your menu config and also having to copy and paste all your messages. Plus, if you need to reformat a message, you don't need to do a search and replace, or manually go through everything - just update the variable.

You could also expand this system to let variables contain multiple actions. EX:

SOUNDVAR1:
    - '[sound] ENTITY_GOAT_RAM_IMPACT 1 0.5'
    - '[sound] ENTITY_ITEM_FRAME_BREAK 1 0.5'
    - '[sound] ENTITY_VILLAGER_NO 1 1'

Then if it's used in a click command section, it activates ALL the actions associated with it:

deny_commands:
          - '[variable] SOUNDVAR1'
          - '[variable] CDVAR1'

This would save tons of time and effort when putting together larger menus (Or any sized menu with global variables). I know there have been some placeholderAPI expansions suggested, and some luckperms meta options - but all of those can get confusing to keep track of. This system would keep it all within the plugin. Making it nice and tidy. Just a suggestion - it would save me an absurd amount of hours.

@BlitzOffline BlitzOffline added the enhancement New feature or request label May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants