mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-10 05:39:19 +01:00
Add offline player support for PAPI (#1855)
Affects issues: - Fixed #1854
This commit is contained in:
parent
1a19ec85f6
commit
91ea079e28
@ -26,7 +26,7 @@ import com.github.benmanes.caffeine.cache.Cache;
|
|||||||
import com.github.benmanes.caffeine.cache.Caffeine;
|
import com.github.benmanes.caffeine.cache.Caffeine;
|
||||||
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.OfflinePlayer;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -92,7 +92,7 @@ public class PlanPlaceholderExtension extends PlaceholderExpansion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onPlaceholderRequest(Player player, String params) {
|
public String onRequest(OfflinePlayer player, String params) {
|
||||||
UUID uuid = player != null ? player.getUniqueId() : null;
|
UUID uuid = player != null ? player.getUniqueId() : null;
|
||||||
if ("Server thread".equalsIgnoreCase(Thread.currentThread().getName())) {
|
if ("Server thread".equalsIgnoreCase(Thread.currentThread().getName())) {
|
||||||
return getCached(params, uuid);
|
return getCached(params, uuid);
|
||||||
|
Loading…
Reference in New Issue
Block a user