#Itemframe problem

1 messages · Page 1 of 1 (latest)

celest temple
#

I'm using paper 1.18.2

#

🙂

frigid rain
#

shouldnt it be

#

e.getRightClicked().getType() instanceof ItemFrame

#

thats my guess

celest temple
#

The code works perfectly, the problem is that it doesn't cancel the event when the player is sneaking (holding shift).

frigid rain
#

then add a check?

#

if theyre shifting or not

celest temple
#

i tried :3 still rotate the item if sneaking

#

it cancel the event if the player is not sneaking

frigid rain
#

e.getAction() instanceof Action.blah

#

im not sure about getRightClicked()

#

you'll have to check if the player interacted, then check the clikc type

#

then do ur coce

#

code

scarlet ravine
#

You can just do

if(event.getAction() == Action.RIGHT_CLICK_AIR)```
or similar