Skip to content

Commit

Permalink
Fix player cast
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskarth committed Nov 22, 2024
1 parent e0a6525 commit d0f9612
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ public static void onPlayerClone(PlayerEvent.Clone event) {

public static CollectibleStore get(Player player) {
CollectibleStore data = player.getData(ExtraAttachments.COLLECTIBLE_STORE);
data.player = (ServerPlayer) player;
if (player instanceof ServerPlayer serverPlayer) {
data.player = serverPlayer;
}
return data;
}

Expand Down

0 comments on commit d0f9612

Please sign in to comment.