getOfflinePlayer once

This commit is contained in:
dordsor21 2020-04-23 09:21:52 +01:00
parent 0fa99d7940
commit caa4a08b26

View File

@ -105,13 +105,14 @@ public class Placeholders extends PlaceholderExpansion {
if (uid == null) {
return "";
}
final String name = UUIDHandler.getName(uid);
String name = UUIDHandler.getName(uid);
return (name != null) ?
name :
((Bukkit.getOfflinePlayer(uid).getName() != null) ?
Bukkit.getOfflinePlayer(uid).getName() :
"unknown");
if (name != null) {
return name;
}
name = Bukkit.getOfflinePlayer(uid).getName();
return name != null ? name : "unknown";
}
case "currentplot_world": {
return p.getWorld().getName();