From 94816a6e5220f8579bdf9abc1a8809db33811ad5 Mon Sep 17 00:00:00 2001 From: basicsensei Date: Mon, 16 Jul 2012 18:11:27 +0200 Subject: [PATCH] fix evil bug with getPlayer matching online players if the offline player had similar name with the online player ie. online "s2", offline "s", then "s" would show as online because getPlayer("s") will return getPlayer("s2") this is why getPlayerExact should be used --- src/com/massivecraft/factions/zcore/persist/PlayerEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/massivecraft/factions/zcore/persist/PlayerEntity.java b/src/com/massivecraft/factions/zcore/persist/PlayerEntity.java index bbe9491f..c79bc0b2 100644 --- a/src/com/massivecraft/factions/zcore/persist/PlayerEntity.java +++ b/src/com/massivecraft/factions/zcore/persist/PlayerEntity.java @@ -9,7 +9,7 @@ public class PlayerEntity extends Entity { public Player getPlayer() { - return Bukkit.getPlayer(this.getId()); + return Bukkit.getPlayerExact(this.getId()); } public boolean isOnline()