Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
PlaceholderAPI: fix getting default placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFaser committed Nov 5, 2023
1 parent fdea643 commit 0f7dc20
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ public String onRequest(@Nullable OfflinePlayer player, @NotNull String params)
default -> null;
};

if (placeholder != null) return placeholder;

FModule fModule = FlectoneChat.getModuleManager().get(NameModule.class);
if (!(fModule instanceof NameModule nameModule)) return placeholder;
if (!(fModule instanceof NameModule nameModule)) return null;
Player onlinePlayer = fPlayer.getPlayer();
if (onlinePlayer == null) return placeholder;
if (onlinePlayer == null) return null;

return switch (params.toLowerCase()) {
case "player_name_real" -> nameModule.getReal(onlinePlayer);
Expand Down

0 comments on commit 0f7dc20

Please sign in to comment.