mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
getOfflinePlayer once
This commit is contained in:
parent
0fa99d7940
commit
caa4a08b26
1 changed files with 7 additions and 6 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue