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 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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds a new Handler to the bottom of the queue.boolean
Adds a new Handler to the top of the queue.static HandlerList
Returns the queue invoked in this event.boolean
Tries to remove a Handler that has been added beforeMethods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
false
if thehandler
is 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:
false
if thehandler
is already included
-
removeHandler
Tries to remove a Handler that has been added before- Parameters:
handler
- The Handler instance that shall be removed- Returns:
true
if this queue contained the specified element
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-