Class StatusLoadEvent
java.lang.Object
org.bukkit.event.Event
net.mathias2246.buildmc.api.event.CustomEvent
net.mathias2246.buildmc.api.event.player.StatusLoadEvent
Event fired during the loading (and reloading) phase of statuses.
This event allows plugins or internal systems to register or unregister
StatusInstance objects before the status registry is finalized.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
Fields inherited from class CustomEvent
metadataHolder -
Constructor Summary
ConstructorsConstructorDescriptionStatusLoadEvent(@NotNull BaseRegistry<StatusInstance> statusRegistry) Creates a newStatusLoadEvent. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatus(StatusInstance status) Adds a status to the registry during the loading phase.static @NotNull org.bukkit.event.HandlerListRequired static method for Bukkit event registration.@NotNull org.bukkit.event.HandlerListReturns theHandlerListfor this event type.Returns the registry being populated during this load event.voidremoveStatus(org.bukkit.NamespacedKey statusKey) Removes a previously registered status from the registry during loading.Methods inherited from class CustomEvent
getMetadata, putMetadata, removeMetadataMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
StatusLoadEvent
Creates a newStatusLoadEvent.- Parameters:
statusRegistry- the registry that will contain all loaded statuses
-
-
Method Details
-
getStatusRegistry
Returns the registry being populated during this load event.- Returns:
- the status registry
-
addStatus
Adds a status to the registry during the loading phase.- Parameters:
status- the status instance to register
-
removeStatus
public void removeStatus(org.bukkit.NamespacedKey statusKey) Removes a previously registered status from the registry during loading.- Parameters:
statusKey- the namespaced key identifying the status to remove
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Description copied from class:CustomEventReturns theHandlerListfor this event type.Bukkit requires each concrete event class to define its own static
HandlerListinstance and to return it from this method. This is necessary for Bukkitâs event registration and dispatch system.- Specified by:
getHandlersin classCustomEvent- Returns:
- the handler list for this event (never
null)
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()Required static method for Bukkit event registration.- Returns:
- the handler list for this event type
-