Package org.bukkit.event.player
Class PlayerStatisticIncrementEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerStatisticIncrementEvent
- All Implemented Interfaces:
- Cancellable
Called when a player statistic is incremented.
 
This event is not called for some high frequency statistics, e.g. movement based statistics.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFieldsFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerStatisticIncrementEvent(Player player, Statistic statistic, int initialValue, int newValue) PlayerStatisticIncrementEvent(Player player, Statistic statistic, int initialValue, int newValue, EntityType entityType) PlayerStatisticIncrementEvent(Player player, Statistic statistic, int initialValue, int newValue, Material material) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the EntityType ifgetStatistic()is an entity statistic otherwise returns null.static HandlerListGets the Material ifgetStatistic()is a block or item statistic otherwise returns null.intGets the new value of the statistic.intGets the previous value of the statistic.Gets the statistic that is being incremented.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Field Details- 
statistic
 
- 
- 
Constructor Details- 
PlayerStatisticIncrementEvent
- 
PlayerStatisticIncrementEventpublic PlayerStatisticIncrementEvent(@NotNull Player player, @NotNull Statistic statistic, int initialValue, int newValue, @NotNull EntityType entityType) 
- 
PlayerStatisticIncrementEvent
 
- 
- 
Method Details- 
getStatisticGets the statistic that is being incremented.- Returns:
- the incremented statistic
 
- 
getPreviousValuepublic int getPreviousValue()Gets the previous value of the statistic.- Returns:
- the previous value of the statistic
 
- 
getNewValuepublic int getNewValue()Gets the new value of the statistic.- Returns:
- the new value of the statistic
 
- 
getEntityTypeGets the EntityType ifgetStatistic()is an entity statistic otherwise returns null.- Returns:
- the EntityType of the statistic
 
- 
getMaterialGets the Material ifgetStatistic()is a block or item statistic otherwise returns null.- Returns:
- the Material of the statistic
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-