Package icu.suc.mc.serverevents
Interface Listener
public interface Listener
Represents a listener for specific events in the application.
This interface is used to define callbacks that can be triggered when certain events occur. Listeners must implement the methods defined in this interface to specify the events they are interested in and the actions to be taken when those events are triggered.
Listeners can specify a phase using the `phase()` method. The default phase is [Event#DEFAULT_PHASE].
The `events()` method must return an array of event types that the listener is interested in. When an event of one of these types occurs, the corresponding method in the listener will be invoked.
-
Method Summary
-
Method Details
-
phase
@NotNull default @NotNull net.minecraft.resources.Identifier phase()Returns the phase in which the listener is interested.- Returns:
- the default phase [Event.DEFAULT_PHASE]
-
events
@NotNull @NotNull net.fabricmc.fabric.api.event.Event<?>[] events()Returns an array of event types that the listener is interested in.When an event of one of these types occurs, the corresponding method in the listener will be invoked.
- Returns:
- An array of event types.
-