diff --git a/bootstrap/mod/src/main/java/org/geysermc/geyser/platform/mod/mixin/server/BlockPlaceMixin.java b/bootstrap/mod/src/main/java/org/geysermc/geyser/platform/mod/mixin/server/BlockPlaceMixin.java index 77023af89..a2d76497e 100644 --- a/bootstrap/mod/src/main/java/org/geysermc/geyser/platform/mod/mixin/server/BlockPlaceMixin.java +++ b/bootstrap/mod/src/main/java/org/geysermc/geyser/platform/mod/mixin/server/BlockPlaceMixin.java @@ -49,6 +49,10 @@ public class BlockPlaceMixin { @Inject(method = "place", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;playSound(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/core/BlockPos;Lnet/minecraft/sounds/SoundEvent;Lnet/minecraft/sounds/SoundSource;FF)V")) private void geyser$hijackPlaySound(BlockPlaceContext blockPlaceContext, CallbackInfoReturnable callbackInfoReturnable, @Local BlockPos pos, @Local Player player, @Local(ordinal = 1) BlockState placedState) { + if (player == null) { + return; + } + GeyserSession session = GeyserImpl.getInstance().connectionByUuid(player.getUUID()); if (session == null) { return;