mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-23 00:21:26 +01:00
Remove unused parameter
This commit is contained in:
parent
5b42ce4a52
commit
1a9bdd93d7
@ -14,14 +14,13 @@ import java.util.function.Function;
|
|||||||
public interface EventFilter<E extends Event, H> {
|
public interface EventFilter<E extends Event, H> {
|
||||||
|
|
||||||
EventFilter<Event, ?> ALL = from(Event.class);
|
EventFilter<Event, ?> ALL = from(Event.class);
|
||||||
EventFilter<EntityEvent, Entity> ENTITY = from(EntityEvent.class, Entity.class, EntityEvent::getEntity);
|
EventFilter<EntityEvent, Entity> ENTITY = from(EntityEvent.class, EntityEvent::getEntity);
|
||||||
EventFilter<PlayerEvent, Player> PLAYER = from(PlayerEvent.class, Player.class, PlayerEvent::getPlayer);
|
EventFilter<PlayerEvent, Player> PLAYER = from(PlayerEvent.class, PlayerEvent::getPlayer);
|
||||||
EventFilter<ItemEvent, ItemStack> ITEM = from(ItemEvent.class, ItemStack.class, ItemEvent::getItemStack);
|
EventFilter<ItemEvent, ItemStack> ITEM = from(ItemEvent.class, ItemEvent::getItemStack);
|
||||||
EventFilter<InstanceEvent, Instance> INSTANCE = from(InstanceEvent.class, Instance.class, InstanceEvent::getInstance);
|
EventFilter<InstanceEvent, Instance> INSTANCE = from(InstanceEvent.class, InstanceEvent::getInstance);
|
||||||
EventFilter<InventoryEvent, Inventory> INVENTORY = from(InventoryEvent.class, Inventory.class, InventoryEvent::getInventory);
|
EventFilter<InventoryEvent, Inventory> INVENTORY = from(InventoryEvent.class, InventoryEvent::getInventory);
|
||||||
|
|
||||||
static <E extends Event, H> EventFilter<E, H> from(@NotNull Class<E> eventType,
|
static <E extends Event, H> EventFilter<E, H> from(@NotNull Class<E> eventType,
|
||||||
@Nullable Class<H> handlerType,
|
|
||||||
@Nullable Function<E, H> handlerGetter) {
|
@Nullable Function<E, H> handlerGetter) {
|
||||||
return new EventFilter<>() {
|
return new EventFilter<>() {
|
||||||
@Override
|
@Override
|
||||||
@ -37,7 +36,7 @@ public interface EventFilter<E extends Event, H> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static <E extends Event, H> EventFilter<E, H> from(@NotNull Class<E> type) {
|
static <E extends Event, H> EventFilter<E, H> from(@NotNull Class<E> type) {
|
||||||
return from(type, null, null);
|
return from(type, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable H getHandler(@NotNull E event);
|
@Nullable H getHandler(@NotNull E event);
|
||||||
|
Loading…
Reference in New Issue
Block a user