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

Additions to the delay tag #17

Open
kristophergeou opened this issue Dec 24, 2023 · 1 comment
Open

Additions to the delay tag #17

kristophergeou opened this issue Dec 24, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@kristophergeou
Copy link

What if we tweak how the <delay> tag works? I'm thinking of having Deluxemenus store delayed actions locally in the plugin, linked to users' UUIDs. This way, when a player leaves the server and comes back online, those actions can be executed. Currently, when a player leaves the server, delayed actions are lost. This sometimes leads to minor issues and requires more complex workarounds, making the delay command a bit challenging for those with limited experience in Deluxemenus. Imagine the scenario:

click_commands:
- [broadcast] &7%player_name% +2000$ in 10seconds
- [message] &7Hello Blitz<delay=100>
- [console] eco give %player_name% 2000<delay=200>

After the [broadcast] command, if the player leaves the server and doesn't return within the next 5 or 10 seconds, there's a risk of losing one or both of the delayed actions. This is where Deluxemenus could step in to store these delayed actions, perhaps in something like:

(player_uuid): 
  - [message] &7Hello Blitz  #When 5 seconds pass aka - 100 ticks
  - [console] eco give %player_name% 2000 # When 10 seconds pass aka - 200 ticks

In the usual scenario, when these actions attempt to execute but the player isn't online, they would instead be stored and executed once the player is back online.

@Starmism Starmism added the enhancement New feature or request label Dec 30, 2023
@BlitzOffline
Copy link
Member

I have considered this before but I never started working on it because of a few reasons:

  1. How long should these actions be stored? Do we still execute the actions when a user doesn't join for a year?
  2. What if important stats regarding the player have changed during this time? What if some placeholders return very different values than was expected when the action was first meant to be executed?
  3. How do we prevent spam? This question is partially related to the first question.
  4. What format do we store these actions in? Do we allow server owners or users with file permissions to edit them? Do we maybe offer commands to allow for the removal of delayed actions?

These are some of the questions that need to be answered before implementing this change.

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

3 participants