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:
parent
a80792d947
commit
fd5202748c
@ -96,7 +96,7 @@ public class LimboCache {
|
|||||||
if (player.isDead()) {
|
if (player.isDead()) {
|
||||||
loc = plugin.getSpawnLocation(player);
|
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) {
|
public void addLimboPlayer(Player player, String group) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user