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

[API] Add and expose isRunning #3770

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ericlmao
Copy link

Exposing this variable on the API level will allow developers to run certain logic if the proxy server shuts down. To my knowledge, there is no way of telling if the proxy is shutting down besides the onDisable() method in Plugin, and that would only be invoked after clients are disconnected and whatnot.

@Janmm14
Copy link
Contributor

Janmm14 commented Dec 29, 2024

During initial loading bungee plugins on bungee start just before enabling plugins, isRunning will also return false (i.e. static initalizer, constructor, onLoad).

This, as well as isRunning returning false during the shutdown process should be documented in javadoc.

@md-5
Copy link
Member

md-5 commented Dec 29, 2024

Use case?

@Janmm14
Copy link
Contributor

Janmm14 commented Dec 30, 2024

Use case?

Only use case I can see is inside PlayerDisconnectEvent (it should fire when bungee kicks players on shutdown I guess).

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.

4 participants