mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-22 10:45:22 +01:00
Fix for #2446 that showed console error when player joined.
This commit is contained in:
parent
11540c047f
commit
05eef0f8ef
@ -84,9 +84,11 @@ public class PlayersManager {
|
|||||||
Objects.requireNonNull(playerUUID, "Player UUID must not be null");
|
Objects.requireNonNull(playerUUID, "Player UUID must not be null");
|
||||||
|
|
||||||
// If the player exists in the database, load it; otherwise, create and save a new player
|
// If the player exists in the database, load it; otherwise, create and save a new player
|
||||||
Players player = loadPlayer(playerUUID);
|
if (handler.objectExists(playerUUID.toString())) {
|
||||||
if (player != null) {
|
Players p = loadPlayer(playerUUID);
|
||||||
return player;
|
if (p != null) {
|
||||||
|
return p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Players newPlayer = new Players(plugin, playerUUID);
|
Players newPlayer = new Players(plugin, playerUUID);
|
||||||
handler.saveObjectAsync(newPlayer);
|
handler.saveObjectAsync(newPlayer);
|
||||||
|
Loading…
Reference in New Issue
Block a user