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 Type
    Method
    Description
    boolean
    Whether Zentrix itself provides this scenario.
    default @NotNull ScenarioDescriptor
    The scenario's metadata.
    boolean
    Whether the entry is still in the registry.
    @NotNull org.bukkit.plugin.Plugin
    The plugin that registered the scenario.
    @NotNull Scenario
    The registered scenario.
    boolean
    Removes the scenario from the registry.
  • Method Details

    • scenario

      @NotNull @NotNull Scenario scenario()
      The registered scenario.
    • descriptor

      @NotNull default @NotNull ScenarioDescriptor 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