Package de.eimmer.ereignis.spieler
Class SpielerTauschHandGegenstaendeEreignis
java.lang.Object
de.eimmer.ereignis.Ereignis
de.eimmer.ereignis.spieler.SpielerEreignis
de.eimmer.ereignis.spieler.SpielerTauschHandGegenstaendeEreignis
- All Implemented Interfaces:
Abbrechbar
Called when a spieler swap items between main hand and off hand using the
hotkey.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.eimmer.ereignis.Ereignis
Ereignis.Result
-
Field Summary
Fields inherited from class de.eimmer.ereignis.spieler.SpielerEreignis
spieler
-
Constructor Summary
ConstructorsConstructorDescriptionSpielerTauschHandGegenstaendeEreignis
(Spieler spieler, GegenstandsStapel mainHandItem, GegenstandsStapel offHandItem) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandhaberListe
Gets the item switched to the main hand.Gets the item switched to the off hand.boolean
Gets the cancellation state of this ereignis.void
setCancelled
(boolean cancel) Sets the cancellation state of this ereignis.void
setMainHandItem
(GegenstandsStapel mainHandItem) Sets the item in the main hand.void
setOffHandItem
(GegenstandsStapel offHandItem) Sets the item in the off hand.Methods inherited from class de.eimmer.ereignis.spieler.SpielerEreignis
getPlayer
Methods inherited from class de.eimmer.ereignis.Ereignis
getEventName, isAsynchronous
-
Constructor Details
-
SpielerTauschHandGegenstaendeEreignis
public SpielerTauschHandGegenstaendeEreignis(@NotNull Spieler spieler, @NotNull GegenstandsStapel mainHandItem, @NotNull GegenstandsStapel offHandItem)
-
-
Method Details
-
getMainHandItem
Gets the item switched to the main hand.- Returns:
- item in the main hand
-
setMainHandItem
Sets the item in the main hand.- Parameters:
mainHandItem
- new item in the main hand
-
getOffHandItem
Gets the item switched to the off hand.- Returns:
- item in the off hand
-
setOffHandItem
Sets the item in the off hand.- Parameters:
offHandItem
- new item in the off hand
-
isCancelled
public boolean isCancelled()Description copied from interface:Abbrechbar
Gets the cancellation state of this ereignis. A cancelled ereignis will not be executed in the server, but will still pass to other plugins- Specified by:
isCancelled
in interfaceAbbrechbar
- Returns:
- true if this ereignis is cancelled
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:Abbrechbar
Sets the cancellation state of this ereignis. A cancelled ereignis will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelled
in interfaceAbbrechbar
- Parameters:
cancel
- true if you wish to cancel this ereignis
-
getHandlers
- Specified by:
getHandlers
in classEreignis
-
getHandlerList
-