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

Add WhosAFK integration #6

Closed
wants to merge 1 commit into from

Conversation

MattSturgeon
Copy link
Contributor

This adds a very simple method that checks if a player has been added to the afkers team (as done by WhosAFK).

It should be fairly simple to extend the method in the future to check other AFK plugins too, maybe even decide which AFK plugins to check in the config.

See issue #4

Add a method that checks if a player is AFK. For now we can just check
whether WhosAFK has added the player to the afkers team, in the future
the method could do a number of checks to establish whether the player
has been set AFK by more plugins.
@MattSturgeon
Copy link
Contributor Author

@Phoenix616 Any feedback would be appreciated. I have tried to keep this change simple and without drawbacks, but I am open to suggestions. :)

@Phoenix616
Copy link
Owner

Phoenix616 commented Sep 27, 2016

You should directly use the methods provided by the plugin to check whether or not a player is afk and also make sure that the plugin is actually running on the server.

I'm closing this pr in favour of a more clean, future version. (Which shouldn't unnecessarily move the plugin.yml and config.yml to another location)

@Phoenix616 Phoenix616 closed this Sep 27, 2016
@MattSturgeon
Copy link
Contributor Author

Thanks for your feedback. Moving the yml files wasn't meant to be committed, my mistake!

WhosAFK only exposes events for when a player becomes AFK and leaves AFK, so IMO this is a better solution than the one in my initial (separate) plugin.

If you were to use the events exposed by WhosAFK, you would have to keep track of which players are currently AFK.

This may be needed anyway in the future to integrate with other AFK plugins, but seems unnecessarily complicated for this case.

@Phoenix616
Copy link
Owner

Phoenix616 commented Sep 28, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants