I couldn't hold it in. (Attempt to get rid of spotty).

This commit is contained in:
SuPaH sPii committed 2012-06-24 23:18:43 -05:00
1 parent b518f108d0
commit 3f38bdabe1
1 file changed
+11
@@ -72,6 +72,17 @@ public class PlayerManager
else else
{ {
final String name = player.getName(); final String name = player.getName();
// Sometimes, JavaBukkit likes to tie itself into a knot.
// And troll us with player variable showing somebody else.
// Because spotty haunts us in our dreams,
// I have to place these annotations and place this hacky fix here.
player = Bukkit.getPlayerExact(name);
// Why, Why, Whyyyyy!
if (player == null)
return true;
if (level.get(name) == null || level.get(name) == 0) if (level.get(name) == null || level.get(name) == 0)
{ {
level.put(name, 1); level.put(name, 1);