Package de.eimmer.ereignis.block
Class SchildAenderungEreignis
java.lang.Object
de.eimmer.ereignis.Ereignis
de.eimmer.ereignis.block.BlockEreignis
de.eimmer.ereignis.block.SchildAenderungEreignis
- All Implemented Interfaces:
Abbrechbar
Called when a sign is changed by a spieler.
If a Sign Change ereignis is cancelled, the sign will not be changed.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.eimmer.ereignis.Ereignis
Ereignis.Result
-
Field Summary
Fields inherited from class de.eimmer.ereignis.block.BlockEreignis
block
-
Constructor Summary
ConstructorsConstructorDescriptionSchildAenderungEreignis
(Block theBlock, Spieler theSpieler, String[] theLines) Deprecated.SchildAenderungEreignis
(Block theBlock, Spieler theSpieler, String[] theLines, Side side) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandhaberListe
getLine
(int index) Gets a single line of text from the sign involved in this ereignis.String[]
getLines()
Gets all of the lines of text from the sign involved in this ereignis.Gets the spieler changing the sign involved in this ereignis.getSide()
Returns which side is changed.boolean
Gets the cancellation state of this ereignis.void
setCancelled
(boolean cancel) Sets the cancellation state of this ereignis.void
Sets a single line for the sign involved in this ereignisMethods inherited from class de.eimmer.ereignis.block.BlockEreignis
getBlock
Methods inherited from class de.eimmer.ereignis.Ereignis
getEventName, isAsynchronous
-
Constructor Details
-
SchildAenderungEreignis
@Deprecated public SchildAenderungEreignis(@NotNull Block theBlock, @NotNull Spieler theSpieler, @NotNull String[] theLines) Deprecated. -
SchildAenderungEreignis
-
-
Method Details
-
getPlayer
Gets the spieler changing the sign involved in this ereignis.- Returns:
- the Spieler involved in this ereignis
-
getLines
Gets all of the lines of text from the sign involved in this ereignis.- Returns:
- the String array for the sign's lines new text
-
getLine
Gets a single line of text from the sign involved in this ereignis.- Parameters:
index
- index of the line to get- Returns:
- the String containing the line of text associated with the provided index
- Throws:
IndexOutOfBoundsException
- thrown when the provided index is > 3 or < 0
-
setLine
Sets a single line for the sign involved in this ereignis- Parameters:
index
- index of the line to setline
- text to set- Throws:
IndexOutOfBoundsException
- thrown when the provided index is > 3 or < 0
-
getSide
Returns which side is changed.- Returns:
- the affected side of the sign
-
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
-