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

Getter and Setter for a Player's exp cooldown

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • This server is running CraftBukkit version 3625-Spigot-d90018e-585ab5b (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT)
    • Yes

      net/minecraft/world/entity/player/EntityHuman has an exp-cooldown field (in 1.19.3 it's called bZ). Setting this field to a very high value (Integer.MAX_VALUE) allows a plugin to prevent a player from being able to pick up experience orbs and also prevents the animation of the orbs moving towards the player. Currently this has to be done via reflections as there is no getter/setter for this field. Therefore I'd suggest adding methods like Player#getExpCooldown & Player#setExpCooldown that return/set the value of the exp-cooldown field.

            Unassigned Unassigned
            Almighty-Satan Almighty-Satan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: