Class PlayerPropertyChangeEvent
java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.player.PlayerPropertyChangeEvent
- All Implemented Interfaces:
- 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.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerPropertyChangeEvent(PlayerProperties playerProperties, boolean fromRemote, boolean async, String key, String previous, String after) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic HandlerListgetKey()Get the key of the property of who the value might change@Nullable StringGet the new value that's on being planned to be set.@Nullable StringReturns the previous value that was set.Get thePlayerPropertiesin which the new value might get setbooleanGet whether a non-local server has caused the change.voidsetNewValue(@Nullable String number) Modify the new value to be something else.Methods inherited from class org.bukkit.event.EventgetEventName, isAsynchronousMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.event.CancellableisCancelled, setCancelled
- 
Constructor Details- 
PlayerPropertyChangeEventpublic PlayerPropertyChangeEvent(PlayerProperties playerProperties, boolean fromRemote, boolean async, String key, String previous, String after) 
 
- 
- 
Method Details- 
getPropertiesGet thePlayerPropertiesin which the new value might get set- Returns:
- The PlayerProperties instance involved in this event
 
- 
isFromRemoteServerpublic boolean isFromRemoteServer()Get whether a non-local server has caused the change.May be truewhen the ProxySync addon is used.- Returns:
- trueif a non-local server initiated the change
 
- 
getKeyGet the key of the property of who the value might change- Returns:
- The key of the property
 
- 
getOldValueReturns 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. - Returns:
- The previous value, nullwhen it didn't exist before
 
- 
getNewValueGet 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. - Returns:
- The new value. May be null, in which case it gets removed
 
- 
setNewValueModify the new value to be something else.Set it to nullto remove it.- Parameters:
- number- The new "new value". May be- null
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-