I am trying to make a script that prevent players to click an iron sword that doesn't have custom model data. But the script below will always cancel the clicking no matter the clicked sword has a custom model data or not. I wonder what could be wrong in the codes?
Script Version: 2.6.3
Minecraft Version: 1.19.3
Full Code:
Other Useful Info:
Server Version: Purpur 1.19.3-1900
No addons using
Have you tried searching the docs? Yes.
Have you tried searching the Forums? Yes.
What other methods have you tried to fix it?
I also tried the example of On Inventory Click event in the doc:
and it don't work for me too. Nothing happens when clicking a stone.
Script Version: 2.6.3
Minecraft Version: 1.19.3
Full Code:
Code:
on inventory click at iron sword:
send "1!"
if event-item doesn't have custom model data:
send "2!"
cancel event
Other Useful Info:
Server Version: Purpur 1.19.3-1900
No addons using
Have you tried searching the docs? Yes.
Have you tried searching the Forums? Yes.
What other methods have you tried to fix it?
I also tried the example of On Inventory Click event in the doc:
Code:
on inventory click:
if event-item is stone:
give player 1 stone
Last edited: