#event not cancel event
1 messages · Page 1 of 1 (latest)
world.beforeEvents.playerInteractWithBlock.subscribe(({ player, block, cancel }) => {
if (restrictedBlocks.includes(block.type.id) && !player.hasTag("admin")) {
cancel = true;
system.run(() => {
player.sendMessage("§cYou do not have permission to use this.");
});
}
});
still not canceling
odd
destructuring is not valid here
world.beforeEvents.playerInteractWithBlock.subscribe(event) => {
event.cancel = true;
});
oh ye that could be the case