#Deny create contraption interact?

13 messages · Page 1 of 1 (latest)

strange marsh
#

How to deny players to interact with create contraptions?

ItemEvents.entityInteracted(event => {
    const {target} = event

    console.log(`entityInteracted! ${target}`)

    if (target == `create:carriage_contraption`) {
        event.cancel()
    }
})

Seems not to be working

pine escarpBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

wintry hare
strange marsh
#

log doesn't print anything

#

so event doesn't fired

wintry hare
#

You’re checking the kubejs log or latest.log?

strange marsh
#
console.log(`entityInteracted! ${target}`)
#

in console

wintry hare
#

I know that’s the code

#

I’m referring to which log your reading

strange marsh
#

other entites like minecraft:skeleton is displaying in the log

wintry hare
#

Ok

#

Maybe create uses its own interact method?