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

Add getPlayer() method to BlockExpEvent

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • This server is running CraftBukkit version 3212-Spigot-ff89b97-2cdc6b1 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
    • Yes

      Considering that both children of the BlockExpEvent class (BlockBreakEvent and FurnaceExtractEvent) contain a method getPlayer() that returns the player responsible for triggering the event, I think it might be a good idea to include that method in the BlockExpEvent class so that if someone wants to cause something to occur regarding a player during either of the events, they don't need to set up two separate listeners to do the same thing. Specifically, in a plugin I am working on, I want the BlockExpEvent to change the dropped experience depending on certain attributes of the player responsible. I have to set up two separate listeners to do so, however, which seems unnecessary. I could be mistaken and this may be more complicated than I realize, but if so I'd love to know why. Thanks!

            Unassigned Unassigned
            KirkFox Kirk Fox
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: