Class PlayerStatChangeEvent
java.lang.Object
org.bukkit.event.Event
com.tomkeuper.bedwars.api.events.player.PlayerStatChangeEvent
public class PlayerStatChangeEvent
extends org.bukkit.event.Event
An event that is called when player statistics are changed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Represents the types of statistics that can be changed.Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerStatChangeEvent
(org.bukkit.entity.Player player, IArena arena, PlayerStatChangeEvent.StatType statType) Constructs a new PlayerStatChangeEvent. -
Method Summary
Modifier and TypeMethodDescriptiongetArena()
Gets the arena associated with the event.static org.bukkit.event.HandlerList
Gets the list of event handlers for the event.org.bukkit.event.HandlerList
Gets the list of event handlers for the event.org.bukkit.entity.Player
Gets the player associated with the event.Gets the type of statistic being changed.boolean
Checks if the event is cancelled.void
setCancelled
(boolean cancelled) Sets the cancellation status of the event.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerStatChangeEvent
public PlayerStatChangeEvent(org.bukkit.entity.Player player, IArena arena, PlayerStatChangeEvent.StatType statType) Constructs a new PlayerStatChangeEvent.- Parameters:
player
- the target playerarena
- the target arenastatType
- the type of statistic being changed
-
-
Method Details
-
getArena
Gets the arena associated with the event.- Returns:
- the arena associated with the event
-
getPlayer
public org.bukkit.entity.Player getPlayer()Gets the player associated with the event.- Returns:
- the player associated with the event
-
getStatType
Gets the type of statistic being changed.- Returns:
- the type of statistic being changed
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()Gets the list of event handlers for the event.- Specified by:
getHandlers
in classorg.bukkit.event.Event
- Returns:
- the list of event handlers for the event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Gets the list of event handlers for the event.- Returns:
- the list of event handlers for the event
-
isCancelled
public boolean isCancelled()Checks if the event is cancelled.- Returns:
- true if the event is cancelled, false otherwise
-
setCancelled
public void setCancelled(boolean cancelled) Sets the cancellation status of the event.- Parameters:
cancelled
- true to cancel the event, false otherwise
-