Add Engine#shuttingDown field
This commit is contained in:
parent
129537a60c
commit
a26c8035c1
1 changed files with 9 additions and 0 deletions
|
@ -72,6 +72,14 @@ public final class Engine implements SubsystemMainClass {
|
|||
@NotNull
|
||||
private LoggerInstance logger;
|
||||
|
||||
/**
|
||||
* Indicates if the engine is shutting down.
|
||||
*
|
||||
* @since 1-alpha1
|
||||
*/
|
||||
@Getter
|
||||
private boolean shuttingDown = false;
|
||||
|
||||
/**
|
||||
* Constructor, initializes the StarOpenSource Engine.
|
||||
*
|
||||
|
@ -199,6 +207,7 @@ public final class Engine implements SubsystemMainClass {
|
|||
*/
|
||||
public void shutdown(@Range(from = 0, to = 255) int exitCode) {
|
||||
logger.info("Shutting engine down");
|
||||
shuttingDown = true;
|
||||
logger.verb("Notifiying classes about shutdown");
|
||||
new EngineShutdownEvent().callEvent();
|
||||
logger.verb("Notifying subsystems about shutdown");
|
||||
|
|
Loading…
Reference in a new issue