mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +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) {
|
||||
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 New Issue
Block a user