Remove unused parameter

This commit is contained in:
TheMode 2021-06-02 22:58:43 +02:00
parent 5b42ce4a52
commit 1a9bdd93d7

View File

@ -14,14 +14,13 @@ import java.util.function.Function;
public interface EventFilter<E extends Event, H> {
EventFilter<Event, ?> ALL = from(Event.class);
EventFilter<EntityEvent, Entity> ENTITY = from(EntityEvent.class, Entity.class, EntityEvent::getEntity);
EventFilter<PlayerEvent, Player> PLAYER = from(PlayerEvent.class, Player.class, PlayerEvent::getPlayer);
EventFilter<ItemEvent, ItemStack> ITEM = from(ItemEvent.class, ItemStack.class, ItemEvent::getItemStack);
EventFilter<InstanceEvent, Instance> INSTANCE = from(InstanceEvent.class, Instance.class, InstanceEvent::getInstance);
EventFilter<InventoryEvent, Inventory> INVENTORY = from(InventoryEvent.class, Inventory.class, InventoryEvent::getInventory);
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);
EventFilter<InstanceEvent, Instance> INSTANCE = from(InstanceEvent.class, InstanceEvent::getInstance);
EventFilter<InventoryEvent, Inventory> INVENTORY = from(InventoryEvent.class, InventoryEvent::getInventory);
static <E extends Event, H> EventFilter<E, H> from(@NotNull Class<E> eventType,
@Nullable Class<H> handlerType,
@Nullable Function<E, H> handlerGetter) {
return new EventFilter<>() {
@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) {
return from(type, null, null);
return from(type, null);
}
@Nullable H getHandler(@NotNull E event);