Class PlayerPropertyChangeEvent

All Implemented Interfaces:

public class PlayerPropertyChangeEvent extends Event implements Cancellable
Gets called whenever a value of a property has changed in a PlayerProperties, set or removed.

It's possible that this event might get called async.

  • Constructor Details

  • Method Details

    • getProperties

      public PlayerProperties getProperties()
      Get the PlayerProperties in which the new value might get set
      The PlayerProperties instance involved in this event
    • getKey

      public String getKey()
      Get the key of the property of who the value might change
      The key of the property
    • getOldValue

      @Nullable public @Nullable String getOldValue()
      Returns the previous value that was set.

      It is possible that it is null. In that case, it wasn't a part of the properties map.

      The previous value, null when it didn't exist before
    • getNewValue

      @Nullable public @Nullable String getNewValue()
      Get the new value that's on being planned to be set.

      It is possible that the new value may be null, which means that it is getting removed.

      The new value. May be null, in which case it gets removed
    • setNewValue

      public void setNewValue(@Nullable @Nullable String number)
      Modify the new value to be something else.

      Set it to null to remove it.

      number - The new "new value". May be null
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()