Skip to content

Commit

Permalink
Don't try to getStoredPlayer on client
Browse files Browse the repository at this point in the history
  • Loading branch information
vgskye committed Aug 19, 2024
1 parent de10fa6 commit 9da50ef
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ public BlockEntityRedstoneImpetus(BlockPos pWorldPosition, BlockState pBlockStat

protected @Nullable
GameProfile getPlayerName() {
Player player = getStoredPlayer();
if (player != null) {
return player.getGameProfile();
if (this.level instanceof ServerLevel) {
Player player = getStoredPlayer();
if (player != null) {
return player.getGameProfile();
}
}

return this.storedPlayerProfile;
Expand Down

0 comments on commit 9da50ef

Please sign in to comment.