Skip to content

Commit

Permalink
Fix logic error for offlineplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jan 28, 2022
1 parent dcae5ab commit b1c87df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/citizensnpcs/api/util/Placeholders.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static String replace(String text, CommandSender sender, NPC npc) {
}

public static String replace(String text, OfflinePlayer player) {
if (player == null) {
if (player == null || !player.hasPlayedBefore()) {
return setPlaceholderAPIPlaceholders(text, player);
}
if (player instanceof Entity && ((Entity) player).isValid()) {
Expand Down

0 comments on commit b1c87df

Please sign in to comment.