When using "on leftclick" and "on drop" events, they both trigger if you attempt to drop an item while facing the air/sky.
Write a simple code like the following:
on leftclick:
broadcast "leftclick"
on drop:
broadcast "drop"
Hold an item then drop it WHILE facing the air/sky. You will notice that both events are triggered. Only the "on drop" event gets triggered if the user faces the block.
The code should have only triggered the "on drop" event if dropping an item, regardless if the user is facing the air or anything else.
No errors.
Either this is a Bukkit/Spigot bug or something happened with the Skript internal code itself.
using
paper 1.14.4 186
plugins
Skript, Sk-NBeet, skript-mirror, worldedit-bukkit-7.0.1, worldguard-bukkit-7.0.1
code
on drop:
broadcast "drop"
on leftclick:
broadcast "leftclick"
the behavior does not happen to me
using
paper 1.14.4 186
plugins
Skript, Sk-NBeet, skript-mirror, worldedit-bukkit-7.0.1, worldguard-bukkit-7.0.1
codeon drop: broadcast "drop" on leftclick: broadcast "leftclick"the behavior does not happen to me
Seems like it's because you're using paper spigot, not default spigot. Going to edit my post to clarify that I am using default spigot for the server.
using
paper 1.14.4 186
plugins
Skript, Sk-NBeet, skript-mirror, worldedit-bukkit-7.0.1, worldguard-bukkit-7.0.1
codeon drop: broadcast "drop" on leftclick: broadcast "leftclick"the behavior does not happen to me
Seems like it's because you're using paper spigot, not default spigot. Going to edit my post to clarify that I am using default spigot for the server.
Can you replicate this issue in Spigot 1.14.4 or Paper 1.14.4? If you can't then it's very likely a Spigot issue in 1.15.1
This is 100% a Spigot/CB issue.
I have reported it to Spigot, hopefully they will fix it soon.
Marking this as Invalid, but leaving it open until Spigot fixes the issues, this way if others notice it they can see this issue.
Ok so update:
Long story short, Bukkit's playerInteractEvent for LEFT_CLICK_AIR is just a hacky way of listening to the arm swing packet. Since 1.15 added arm swing animations for a lot of things (including dropping an item) that is why the click event is getting called. Im sure we can try find a hacky way to fix this, but its going to take a bit of work.
@ShaneBeee Could you link the issue you made here for reference?
This is the issue I created:
https://hub.spigotmc.org/jira/browse/PLUG-370
Which was closed and referenced as a duplicate of:
https://hub.spigotmc.org/jira/browse/SPIGOT-5435
Which was closed and marked as invalid
Most helpful comment
Ok so update:
Long story short, Bukkit's playerInteractEvent for LEFT_CLICK_AIR is just a hacky way of listening to the arm swing packet. Since 1.15 added arm swing animations for a lot of things (including dropping an item) that is why the click event is getting called. Im sure we can try find a hacky way to fix this, but its going to take a bit of work.