Skip to content

Enable per-rank afk kick limits (#3648)#7

Open
sarah-oreilly wants to merge 1 commit into
MillsMCS:2.xfrom
sarah-oreilly:afk-kick
Open

Enable per-rank afk kick limits (#3648)#7
sarah-oreilly wants to merge 1 commit into
MillsMCS:2.xfrom
sarah-oreilly:afk-kick

Conversation

@sarah-oreilly
Copy link
Copy Markdown
Collaborator

Information

This PR closes EssentialsX#3648.

Details

Server admins can now edit their config.yml files to include afk kick ranks, which will allow different players to remain afk for different lengths of time before being kicked.

Environments tested:

CraftBukkit 1.16.4 (macOS, Java 15.0.1)

@sarah-oreilly
Copy link
Copy Markdown
Collaborator Author

PR made to practice formatting. Closing.

@Override
public long getAutoAfkKick() {
return config.getLong("auto-afk-kick", -1);
public long getAutoAfkKick(final User user) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can a user belong to multiple sets? If so, I would think that the most generous limit should be used. If not, you can return after the first limit is found (and eliminate the variable limit).

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.

Customizable AFK kick durations

2 participants