Package de.marcely.bedwars.api.levelshop
Class PlayerPickupOrbEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.levelshop.PlayerPickupOrbEvent
- All Implemented Interfaces:
ArenaEvent
Gets called when a player picks up an orb and thereby earns level.
It is not possible to cancel or obtain the orb entity, as the bukkit API doesn't provide an easy solution for that either.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerPickupOrbEvent(PlayerPickupOrbEvent event, Player player) PlayerPickupOrbEvent(Player player, Arena arena, int levelAmount) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerListintGet the amount of levels the player is about to earn.voidsetLevelAmount(int levelAmount) Set the amount of levels the player is about to earn.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronousMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.marcely.bedwars.api.event.arena.ArenaEvent
getArena
-
Constructor Details
-
PlayerPickupOrbEvent
-
PlayerPickupOrbEvent
-
-
Method Details
-
getLevelAmount
public int getLevelAmount()Get the amount of levels the player is about to earn.- Returns:
- The amount of levels he picked up
-
setLevelAmount
public void setLevelAmount(int levelAmount) Set the amount of levels the player is about to earn.- Parameters:
levelAmount- The amount of levels he picked up- Throws:
IllegalArgumentException- levelAmount must be 0 or greater
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-