mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
getOfflinePlayer once
This commit is contained in:
parent
0fa99d7940
commit
caa4a08b26
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user