Interface Registration

All Superinterfaces:
AutoCloseable

public interface Registration extends AutoCloseable
Handle returned when registering a modifier, rule, custom event, mutation, provider, or handler. Calling unregister() or close() removes the registration immediately. All registrations are also automatically removed when the owning Plugin is disabled.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
     
    boolean
     
    @NotNull net.kyori.adventure.key.Key
    key()
     
    @NotNull org.bukkit.plugin.Plugin
     
    void
    Removes this registration from StealABlock.
  • Method Details

    • owner

      @NotNull @NotNull org.bukkit.plugin.Plugin owner()
      Returns:
      the plugin that owns this registration
    • key

      @NotNull @NotNull net.kyori.adventure.key.Key key()
      Returns:
      the namespaced key of this registration
    • isActive

      boolean isActive()
      Returns:
      true if this registration is still active
    • unregister

      void unregister()
      Removes this registration from StealABlock. Safe to call multiple times.
    • close

      default void close()
      Specified by:
      close in interface AutoCloseable