world.beforeEvents.playerInteractWithBlock.subscribe((event) => {
let { block,player } = event
let { location } = block
let { x, y, z } = location
if ( x === 9993 && y === 100 && z === 9993 &&
block.typeId === "minecraft:barrel" &&
player.hasTag(player.name, "vaulttp")) {
event.cancel();
system.run(() => {
plots(player);
});
}
});```
#Any one know why this is happening
1 messages · Page 1 of 1 (latest)
world.beforeEvents.playerInteractWithBlock.subscribe((event) => {
let { block,player } = event
let { location } = block
let { x, y, z } = location
if ( x === 9993 && y === 100 && z === 9993 &&
block.typeId === "minecraft:barrel" &&
player.hasTag("vaulttp")) {
event.cancel();
system.run(() => {
plots(player);
});
}
});```
hasTag method takes only the tag you're looking for. The player name/id/etc. is given by the Player Object/Class.
Its saying its not a function now
event.cancel = true
they should really just make it event.cancel() though right?? because if u dont want to cancel it whats the point in adding event.cancel = false