Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7152

Using /kill on yourself while it's on an ItemStack's PDC causes the server to crash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 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

            Unassigned Unassigned
            Optic_Fusion1 Optic_Fusion1
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: