From 1e1925b43e0fc93e4e77d9d6bcb04d6ac8ec7d5f Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Fri, 16 Dec 2011 00:19:01 +0100 Subject: [PATCH] Performance boost? And fixed capi integration once again. --- .../factions/integration/capi/CapiFeatures.java | 2 +- .../factions/listeners/FactionsPlayerListener.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/massivecraft/factions/integration/capi/CapiFeatures.java b/src/com/massivecraft/factions/integration/capi/CapiFeatures.java index 96095d9d..f50c09ad 100644 --- a/src/com/massivecraft/factions/integration/capi/CapiFeatures.java +++ b/src/com/massivecraft/factions/integration/capi/CapiFeatures.java @@ -12,7 +12,7 @@ public class CapiFeatures public static void setup() { Plugin plug = Bukkit.getServer().getPluginManager().getPlugin("capi"); - if (plug != null && plug.getClass().getName().equals("com.massivecraft.capi.capi")) + if (plug != null && plug.getClass().getName().equals("com.massivecraft.capi.P")) { P.p.log("Integration with the CAPI plugin was successful"); P.p.registerEvent(Event.Type.CUSTOM_EVENT, new PluginCapiListener(P.p), Priority.Normal); diff --git a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java index 439b2e41..544c3687 100644 --- a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -168,11 +168,11 @@ public class FactionsPlayerListener extends PlayerListener @Override public void onPlayerMove(PlayerMoveEvent event) { - Player player = event.getPlayer(); - FPlayer me = FPlayers.i.get(player); - // Did we change block? if (event.getFrom().equals(event.getTo())) return; + + Player player = event.getPlayer(); + FPlayer me = FPlayers.i.get(player); // Did we change coord? FLocation from = me.getLastStoodAt();