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

[REQUEST] Event when there are no more online players in the server #12

Open
tioalexis opened this issue Sep 8, 2021 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@tioalexis
Copy link

tioalexis commented Sep 8, 2021

Is your feature request related to a problem? Please describe.
I want to be able to run a command whenever a player leaves the server BUT only if there are no more players in the server.

Describe the solution you'd like
Possibly a server_empty event:

"server_empty": {
    "actions": [
        "nothing but chickens"
    ]
}

or a condition specifically for leave event:

"leave": {
    "actions": [
        "nothing but chickens",
        "/someServerCommandLikeBackup idk"
    ],
   "requiredOnlinePlayerCount": 0
}

Describe alternatives you've considered
I first tried this using execute command when the player leaves. It is possible to check if there are players in the server using execute if entity @a run someOtherCommand but there's no way to negate this condition (like a not option).

I understand this might be beyond the scope of this project (considering it's called "player" events) but I think this is still slightly relevant.

@tioalexis tioalexis added the enhancement New feature or request label Sep 8, 2021
@IotaBread
Copy link
Owner

Thanks for the suggestion! I'll consider adding it in the next update

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