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 21, 2024
1 parent 2759689 commit 4b96530
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 4b96530

Please sign in to comment.