mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-04-17 19:12:14 +02:00
Reintroduce player place null check in BlockPlaceMixin (#5465)
This commit is contained in:
parent
7a9c6b3ac3
commit
59b0be8985
1 changed files with 4 additions and 0 deletions
|
@ -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<InteractionResult> 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;
|
||||
|
|
Loading…
Add table
Reference in a new issue