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

Canceling events do not cancel all functionality

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Windows 11

      Java 21

      1.21.1 Spigot Server

    • This server is running CraftBukkit version 4226-Spigot-146439e-2889b3a (MC: 1.21) (Implementing API version 1.21-R0.1-SNAPSHOT)
    • Yes

      Some events like PlayerItemConsumeEvent or EntitySpawnEvent when cancelled do not cancel everything about the event. For example, PlayerItemConsumeEvent when cancelled will not cancel any potion effects on suspicious stew from being sent to the client. This means effects like darkness will still be present on the player's screen. Things like milk and commands do nothing as the server thinks that the event was cancelled and so the player seems to have no effects.

      This is also an issue with EntitySpawnEvent. When you cancel the event, it does not cancel the mob's ambient sound it makes whenever it is spawned.

      I have confirmed this is a Spigot Api bug because I have tested it both on paper 1.21 and spigot 1.21 servers and the results are the same.

      These issues can be fixed by listening for packets with ProtocolLib or any other packet library. However, considering these issues didn't affect earlier versions like Spigot 1.8.8, I'm assuming it's a bug and needs addressing.

            Unassigned Unassigned
            klb Keegan Bates
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: