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

[SUGGESTION] AFK Commands #60

Open
OreoKirby opened this issue Jun 26, 2024 · 2 comments
Open

[SUGGESTION] AFK Commands #60

OreoKirby opened this issue Jun 26, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@OreoKirby
Copy link

Suggestion

Description:

  • A command for a Player to set themself as AFK.
    /playtimes:afk
  • A command for Admins to set a player as AFK.
    /playtimes:afk {playername}

Benefits:

  • Players can manually pause their Play Time from increasing and Admins could force a player to pause their Play Time increasing through other means such as automated tasks.

Implementation:

  • New in-game command will set the "isAFK" boolean in AFKManager.java to "true".
  • Ideally the command would have tab-completion and ignore casing for usernames.

Additional Context

Additional Context:

  • I have another plugin specifically for advanced AFK checking that can perform actions based on different time intervals set. When that status is triggered automatically OR manually; we are able to perform specified actions. Currently, I have PlayTimes synced up to the 5 minute interval tasks. However, if a player sets themselves as AFK manually (with the other plugin) the Play Time continues to increase. It would be nice to have the above commands so that a player can stop their own Play Time from increasing or, in my case, an admin command could set their status as well. By allowing an admin command I could have my other AFK plugin handle its own tasks and also pause their Play Time in sync.
@OreoKirby OreoKirby added the enhancement New feature or request label Jun 26, 2024
@CodedRedGIT
Copy link
Contributor

This is a great suggestion. I will definitely add this feature. I might also enable streamlined integration, allowing popular AFK plugins to effortlessly connect with PlayTimes for managing the AFK system.

What AFK Plugin do you use?

(ETA - I am going on vacation tomorrow so expect this to be added near the end of next week)

@OreoKirby
Copy link
Author

That would be great, thanks!

The main one we use is JetsAntiAKFPro for automation of stetting temporary permissions via commands:
https://www.spigotmc.org/resources/jetsantiafkpro-play-time-afk-reward-detection-actions-bungee-regions-gui-1-8-1-20.63179/

We also use EssentialsX Admin commands to set a user as AFK to send them a personal message:
https://essentialsx.net/

No worries on timeline; let me know if you wanted some help as well and I might be able to push a PR.

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