From 1e4654ac9fc2ca5e063d970f542c688699dfa8d7 Mon Sep 17 00:00:00 2001 From: Robert Herhold Date: Sun, 24 Dec 2017 16:33:37 -0500 Subject: [PATCH] Return if no event key provider found --- .../badgeup/sponge/eventlistener/BadgeUpEventListener.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/io/badgeup/sponge/eventlistener/BadgeUpEventListener.java b/src/main/java/io/badgeup/sponge/eventlistener/BadgeUpEventListener.java index c745cdf..8c2581b 100644 --- a/src/main/java/io/badgeup/sponge/eventlistener/BadgeUpEventListener.java +++ b/src/main/java/io/badgeup/sponge/eventlistener/BadgeUpEventListener.java @@ -149,6 +149,11 @@ public String provide(FishingEvent.Stop event) { public void processEvent(Event event, Player player) { EventKeyProvider keyProvider = resolveKeyProvider(event.getClass()); + + if (keyProvider == null) { + return; + } + final String key = keyProvider.provide(event); processEvent(event, player, key, 1);