From c5be1754c4841fb496fdfe0ecc8298d6411d622e Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Wed, 21 Aug 2013 10:02:40 +0200 Subject: [PATCH] Performance improvement as suggested by md_5, thanks. --- .../factions/listeners/FactionsListenerChat.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/massivecraft/factions/listeners/FactionsListenerChat.java b/src/com/massivecraft/factions/listeners/FactionsListenerChat.java index 9d208f20..5b253b01 100644 --- a/src/com/massivecraft/factions/listeners/FactionsListenerChat.java +++ b/src/com/massivecraft/factions/listeners/FactionsListenerChat.java @@ -63,7 +63,7 @@ public class FactionsListenerChat implements Listener { try { - if (!AsyncPlayerChatEvent.class.isAssignableFrom(event.getClass())) return; + if (!(event instanceof AsyncPlayerChatEvent)) return; setFormat((AsyncPlayerChatEvent)event); } catch (Throwable t) @@ -89,7 +89,7 @@ public class FactionsListenerChat implements Listener { try { - if (!AsyncPlayerChatEvent.class.isAssignableFrom(event.getClass())) return; + if (!(event instanceof AsyncPlayerChatEvent)) return; parseTags((AsyncPlayerChatEvent)event); } catch (Throwable t) @@ -117,7 +117,7 @@ public class FactionsListenerChat implements Listener { try { - if (!AsyncPlayerChatEvent.class.isAssignableFrom(event.getClass())) return; + if (!(event instanceof AsyncPlayerChatEvent)) return; parseRelcolor((AsyncPlayerChatEvent)event); } catch (Throwable t)