Class PlayerVeinMiningPatternChangeEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
wtf.choco.veinminer.api.event.player.PlayerVeinMiningPatternChangeEvent
- All Implemented Interfaces:
Cancellable
,PatternChangeEvent
public final class PlayerVeinMiningPatternChangeEvent
extends PlayerEvent
implements Cancellable, PatternChangeEvent
Called when a
Player
changes their VeinMiningPattern
either by command
or with the client-sided mod.-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
Nested classes/interfaces inherited from interface wtf.choco.veinminer.api.event.player.PatternChangeEvent
PatternChangeEvent.Cause
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerVeinMiningPatternChangeEvent
(@NotNull Player player, @NotNull VeinMiningPattern pattern, @NotNull VeinMiningPattern newPattern, @NotNull PatternChangeEvent.Cause cause) Construct a newPlayerVeinMiningPatternChangeEvent
. -
Method Summary
Modifier and TypeMethodDescription@NotNull PatternChangeEvent.Cause
getCause()
Get theCause
of this event.static @NotNull HandlerList
@NotNull HandlerList
@NotNull VeinMiningPattern
Get theVeinMiningPattern
to change to.@NotNull VeinMiningPattern
Get the player's currentVeinMiningPattern
.boolean
Checks whether or not this event has been cancelled.void
setCancelled
(boolean cancelled) void
setNewPattern
(@NotNull VeinMiningPattern newPattern) Set theVeinMiningPattern
to change to.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerVeinMiningPatternChangeEvent
public PlayerVeinMiningPatternChangeEvent(@NotNull @NotNull Player player, @NotNull @NotNull VeinMiningPattern pattern, @NotNull @NotNull VeinMiningPattern newPattern, @NotNull @NotNull PatternChangeEvent.Cause cause) Construct a newPlayerVeinMiningPatternChangeEvent
.- Parameters:
player
- the player whose pattern was changedpattern
- the player's current patternnewPattern
- the pattern to be setcause
- the cause of this event
-
-
Method Details
-
getPattern
Get the player's currentVeinMiningPattern
.- Returns:
- the current pattern
-
setNewPattern
Set theVeinMiningPattern
to change to.- Parameters:
newPattern
- the new pattern
-
getNewPattern
Description copied from interface:PatternChangeEvent
Get theVeinMiningPattern
to change to.- Specified by:
getNewPattern
in interfacePatternChangeEvent
- Returns:
- the new pattern
-
getCause
Description copied from interface:PatternChangeEvent
Get theCause
of this event.- Specified by:
getCause
in interfacePatternChangeEvent
- Returns:
- the cause
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceCancellable
-
isCancelled
public boolean isCancelled()Description copied from interface:PatternChangeEvent
Checks whether or not this event has been cancelled.- Specified by:
isCancelled
in interfaceCancellable
- Specified by:
isCancelled
in interfacePatternChangeEvent
- Returns:
- true if cancelled, false otherwise
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-