mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Inline method
This commit is contained in:
parent
1a9bdd93d7
commit
8f3b52a8b9
@ -13,7 +13,7 @@ import java.util.function.Function;
|
||||
|
||||
public interface EventFilter<E extends Event, H> {
|
||||
|
||||
EventFilter<Event, ?> ALL = from(Event.class);
|
||||
EventFilter<Event, ?> ALL = from(Event.class, null);
|
||||
EventFilter<EntityEvent, Entity> ENTITY = from(EntityEvent.class, EntityEvent::getEntity);
|
||||
EventFilter<PlayerEvent, Player> PLAYER = from(PlayerEvent.class, PlayerEvent::getPlayer);
|
||||
EventFilter<ItemEvent, ItemStack> ITEM = from(ItemEvent.class, ItemEvent::getItemStack);
|
||||
@ -35,10 +35,6 @@ public interface EventFilter<E extends Event, H> {
|
||||
};
|
||||
}
|
||||
|
||||
static <E extends Event, H> EventFilter<E, H> from(@NotNull Class<E> type) {
|
||||
return from(type, null);
|
||||
}
|
||||
|
||||
@Nullable H getHandler(@NotNull E event);
|
||||
|
||||
@NotNull Class<E> getEventType();
|
||||
|
Loading…
Reference in New Issue
Block a user