Fix NPE when onPlayerJoins occurs

When #addLimboPlayer(Player player) is called, the player is put into the list with his real name, but when #getLimboPlayer(String name) is called, its looking for the lowercased name, causing a NullPointerException
This commit is contained in:
Trojaner 2015-05-02 01:59:08 +03:00
parent a80792d947
commit fd5202748c

View File

@ -96,7 +96,7 @@ public class LimboCache {
if (player.isDead()) {
loc = plugin.getSpawnLocation(player);
}
cache.put(player.getName(), new LimboPlayer(name, loc, inv, arm, gameMode, operator, playerGroup, flying));
cache.put(name, new LimboPlayer(name, loc, inv, arm, gameMode, operator, playerGroup, flying));
}
public void addLimboPlayer(Player player, String group) {