From 1a9bdd93d75d7ab5f155029157d26feb343f5b5f Mon Sep 17 00:00:00 2001 From: TheMode Date: Wed, 2 Jun 2021 22:58:43 +0200 Subject: [PATCH] Remove unused parameter --- .../java/net/minestom/server/event/EventFilter.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/minestom/server/event/EventFilter.java b/src/main/java/net/minestom/server/event/EventFilter.java index 2ece64c1d..8035e9a29 100644 --- a/src/main/java/net/minestom/server/event/EventFilter.java +++ b/src/main/java/net/minestom/server/event/EventFilter.java @@ -14,14 +14,13 @@ import java.util.function.Function; public interface EventFilter { EventFilter ALL = from(Event.class); - EventFilter ENTITY = from(EntityEvent.class, Entity.class, EntityEvent::getEntity); - EventFilter PLAYER = from(PlayerEvent.class, Player.class, PlayerEvent::getPlayer); - EventFilter ITEM = from(ItemEvent.class, ItemStack.class, ItemEvent::getItemStack); - EventFilter INSTANCE = from(InstanceEvent.class, Instance.class, InstanceEvent::getInstance); - EventFilter INVENTORY = from(InventoryEvent.class, Inventory.class, InventoryEvent::getInventory); + EventFilter ENTITY = from(EntityEvent.class, EntityEvent::getEntity); + EventFilter PLAYER = from(PlayerEvent.class, PlayerEvent::getPlayer); + EventFilter ITEM = from(ItemEvent.class, ItemEvent::getItemStack); + EventFilter INSTANCE = from(InstanceEvent.class, InstanceEvent::getInstance); + EventFilter INVENTORY = from(InventoryEvent.class, InventoryEvent::getInventory); static EventFilter from(@NotNull Class eventType, - @Nullable Class handlerType, @Nullable Function handlerGetter) { return new EventFilter<>() { @Override @@ -37,7 +36,7 @@ public interface EventFilter { } static EventFilter from(@NotNull Class type) { - return from(type, null, null); + return from(type, null); } @Nullable H getHandler(@NotNull E event);