Interface ScenarioRegistration
public interface ScenarioRegistration
A live entry in the scenario registry.
Holding the registration is the tidiest way for an addon to remove its scenario again, but it is never required: Zentrix unregisters every scenario a plugin owns as soon as that plugin is disabled.
- Since:
- 1.6.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbuiltIn()Whether Zentrix itself provides this scenario.default @NotNull ScenarioDescriptorThe scenario's metadata.booleanWhether the entry is still in the registry.@NotNull org.bukkit.plugin.Pluginowner()The plugin that registered the scenario.@NotNull Scenarioscenario()The registered scenario.booleanRemoves the scenario from the registry.
-
Method Details
-
scenario
The registered scenario. -
descriptor
The scenario's metadata. -
owner
@NotNull @NotNull org.bukkit.plugin.Plugin owner()The plugin that registered the scenario. -
builtIn
boolean builtIn()Whether Zentrix itself provides this scenario. -
isRegistered
boolean isRegistered()Whether the entry is still in the registry. -
unregister
boolean unregister()Removes the scenario from the registry.Matches already running it keep going until their instances are deactivated, which happens immediately for a scenario removed mid-match.
- Returns:
- true when this call removed the entry
-