Search in sources :

Example 1 with GuardianStoppingEvent

use of com.ichorpowered.guardian.event.GuardianStoppingEvent in project guardian by ichorpowered.

the class GamePluginFacet method shutdown.

public Boolean shutdown() {
    PropertyInjector propertyInjector = this.plugin.getPropertyInjector();
    propertyInjector.inject("state", GuardianState.STOPPING);
    this.plugin.getEventBus().post(new GuardianStoppingEvent(this.plugin, Origin.source(this.plugin.getPluginContainer()).build()));
    this.plugin.getSequenceTask().stop();
    this.facetState = FacetState.STOP;
    return true;
}
Also used : PropertyInjector(com.ichorpowered.guardian.util.property.PropertyInjector) GuardianStoppingEvent(com.ichorpowered.guardian.event.GuardianStoppingEvent)

Aggregations

GuardianStoppingEvent (com.ichorpowered.guardian.event.GuardianStoppingEvent)1 PropertyInjector (com.ichorpowered.guardian.util.property.PropertyInjector)1