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) { if (uid == null) {
return ""; return "";
} }
final String name = UUIDHandler.getName(uid); String name = UUIDHandler.getName(uid);
return (name != null) ? if (name != null) {
name : return name;
((Bukkit.getOfflinePlayer(uid).getName() != null) ? }
Bukkit.getOfflinePlayer(uid).getName() :
"unknown"); name = Bukkit.getOfflinePlayer(uid).getName();
return name != null ? name : "unknown";
} }
case "currentplot_world": { case "currentplot_world": {
return p.getWorld().getName(); return p.getWorld().getName();