Package com.marcusslover.plus.lib.events
Class EventReference<T extends org.bukkit.event.Event>
java.lang.Object
com.marcusslover.plus.lib.events.EventReference<T>
- All Implemented Interfaces:
ILifeCycle<EventReference<T>>
public class EventReference<T extends org.bukkit.event.Event>
extends Object
implements ILifeCycle<EventReference<T>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull EventReference<T> asRegistered(@NotNull org.bukkit.plugin.Plugin plugin) Register the event.@NotNull EventReference<T> Deprecated.voidUnregisters the life cycle.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.marcusslover.plus.lib.lifecycle.ILifeCycle
lifeCycle
-
Constructor Details
-
EventReference
public EventReference()
-
-
Method Details
-
merge
@Deprecated @NotNull public @NotNull EventReference<T> merge(@NotNull @NotNull Class<? extends T> otherEvent) Deprecated.Allows the event to be merged with another event, as long as the other event is a subclass of the base event.- Parameters:
otherEvent- the other event- Returns:
- the event reference
-
asRegistered
@NotNull public @NotNull EventReference<T> asRegistered(@NotNull @NotNull org.bukkit.plugin.Plugin plugin) Register the event. -
unregister
public void unregister()Description copied from interface:ILifeCycleUnregisters the life cycle.- Specified by:
unregisterin interfaceILifeCycle<T extends org.bukkit.event.Event>
-