From 511662cbc65a502f5ae96a2d35948e101d922c82 Mon Sep 17 00:00:00 2001 From: Ethan Date: Sat, 27 Nov 2021 13:16:10 -0500 Subject: [PATCH] placeholders now return null if the PlayerData isn't loaded. --- .../net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java index 90196498..5cab1044 100644 --- a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java +++ b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java @@ -44,8 +44,10 @@ public class RPGPlaceholders extends PlaceholderExpansion { @SuppressWarnings("DuplicateExpressions") @Override public String onRequest(OfflinePlayer player, String identifier) { - PlayerData playerData = PlayerData.get(player); + if (!PlayerData.has(player.getUniqueId())) + return null; + PlayerData playerData = PlayerData.get(player); if (identifier.equals("mana_icon")) return playerData.getProfess().getManaDisplay().getIcon(); if (identifier.equals("mana_name"))