1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-29 06:34:17 +02:00

Fixed a bug where unknown players would crash the SMod menu

This commit is contained in:
Shy
2024-08-04 14:47:29 +02:00
parent 5c5eee0bca
commit 22f42df1da
2 changed files with 11 additions and 3 deletions
@@ -25,7 +25,7 @@ public abstract class PlayerUtil {
return "CONSOLE";
}
OfflinePlayer player = Bukkit.getOfflinePlayer(uuid);
return player.getName() == null ? uuid.toString() : player.getName();
return player.getName() == null ? "Unknown Player" + uuid : player.getName();
}
public static @Nullable UUID offlinePlayerUUIDByName(String name){