Class PlayerDeathInventoryDropEvent
- All Implemented Interfaces:
ArenaEvent
The determination of what shall be dropped works by a queue that's effectively only a List under the hood.
You're able to modify the queue within this event. After the execution of this event MBedwars will execute
each PlayerDeathInventoryDropEvent.Handler inside the queue which runs in an order from top to bottom. Updated states get passed to the PlayerDeathInventoryDropEvent.Handler below.
MBedwars delivers a few default Handlers out of the box, but it depends on the configuration of the user which of them get added to the queue.
-
Nested Class Summary
Nested ClassesNested 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a new Handler to the bottom of the queue.booleanAdds a new Handler to the top of the queue.static HandlerListReturns the queue invoked in this event.booleanTries to remove a Handler that has been added beforeMethods 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
-
PlayerDeathInventoryDropEvent
-
-
Method Details
-
getHandlerQueue
Returns the queue invoked in this event.Entries at index 0 are on top, those at
Collection.size()-1 are at bottom. It's safe to modify this List (add/remove entries).- Returns:
- The queue involved in this event
-
addHandlerToTop
Adds a new Handler to the top of the queue.This Handler might get executed first in the queue and might even contain all original states. Executing this again will put the existing ones below the new one.
- Parameters:
handler- Handles what shall happen with the drops- Returns:
falseif thehandleris already included
-
addHandlerToBottom
Adds a new Handler to the bottom of the queue.This Handler might get executed as last in the queue whereby it probably won't have the original states. Executing this again will put the existing ones above the new one.
- Parameters:
handler- Handles what shall happen with the drops- Returns:
falseif thehandleris already included
-
removeHandler
Tries to remove a Handler that has been added before- Parameters:
handler- The Handler instance that shall be removed- Returns:
trueif this queue contained the specified element
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-