#stop playerInteractWithBlock from firing with playerPlaceBlock

1 messages · Page 1 of 1 (latest)

polar portal
#

is there is anyway to stop playerInteractWithBlock event from executing with the playerPlaceBlock event

polar portal
#

resolved ✅

const id = world.afterEvents.playerInteractWithBlock.subscribe(event => {
    let { player } = event;
    player.sendMessage("after interact");
})

world.afterEvents.playerPlaceBlock.subscribe(event => {
    world.afterEvents.playerInteractWithBlock.unsubscribe(id);
    let player = event.player;
    player.sendMessage("after place");
    system.runTimeout(() => {
        world.afterEvents.playerInteractWithBlock.subscribe(id);
    }, 1);
});
viral needle
#

this is not compatible with multiplayer