-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
-
CraftBukkit version 3580-Spigot-e53686f-5901d58 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT)
-
Yes
If a plugin uses the PlayerInteractEvent to execute commands that are stored on an ItemStack's PDC it works fine. HOWEVER if the command that gets executed is either kill @e[type=player] OR kill <your_player_name> and you execute it while in creative mode it causes a crash with the following exception: https://paste.md-5.net/eqaqupayeh.md. Another interesting thing is if you do player.setHealth(0) within the PlayerInteractEvent or even the two mentioned commands w/o it being on the PDC it works as expected.
A temp fix is cancelling the PlayerInteractEvent, however on the off chance said fix is not applied then it should be fixed at the source.
While this is limited to creative mode only, this is a possible exploit that could happen on creative mode servers.
steps to replicate:
1) Type ==test
2) Right click block, it works as expected
3) Type == test again
3) Right click air, kill server
Video of crash and steps taken to repoduce w/ the provided plugin: https://www.youtube.com/watch?v=EsS3ZH0d7Mw