mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
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:
commit
7a0be5edf8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user