Merge pull request #1040 from DevCyntrix/fix-class-cast-exception

Use the OfflinePlayer$getPlayer method instead of casting to Player class
This commit is contained in:
Gabriel Dumitru 2024-03-07 22:59:24 +02:00 committed by GitHub
commit 7a0be5edf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,7 +29,7 @@ public abstract class PlaceholderHook {
@Nullable
public String onRequest(final OfflinePlayer player, @NotNull final String params) {
if (player != null && player.isOnline()) {
return onPlaceholderRequest((Player) player, params);
return onPlaceholderRequest(player.getPlayer(), params);
}
return onPlaceholderRequest(null, params);