Update PlayerOnlineListener.java

This commit is contained in:
Aurora Lahtela 2021-11-19 17:12:50 +02:00 committed by GitHub
parent 2f78f5528e
commit f1de7ad85e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,7 +166,7 @@ public class PlayerOnlineListener implements Listener {
BukkitAFKListener.afkTracker.performedAction(playerUUID, time);
String world = player.getWorld().getName();
String gm = Optional.of(player.getGameMode()).map(gameMode -> gameMode.name()).orElse("Unknown");
String gm = Optional.ofNullable(player.getGameMode()).map(gameMode -> gameMode.name()).orElse("Unknown");
Database database = dbSystem.getDatabase();
database.executeTransaction(new WorldNameStoreTransaction(serverUUID, world));