Package org.bukkit.event.block
Class SculkBloomEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.SculkBloomEvent
- All Implemented Interfaces:
Cancellable
Represents an event triggered when a new cursor is created by a
SculkCatalyst
.
Cursor Definition: A cursor in this context is a dynamic marker or pointer generated by the SculkCatalyst. It occupies a block and spreads sculk as it moves. It is similar to entity, but it is not an entity. Cursors are ticked by the tile entity.
Triggers for Cursor Creation:
- An entity, when killed and drops experience, within an 8-block radius of a
SculkCatalyst
. - An explicit call from a plugin using
SculkCatalyst.bloom(Block, int)
.
BlockEvent.getBlock()
is the location that the cursor is spawning at.-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.block.BlockEvent
block
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the charge of the cursor, < 1000 by default.static @NotNull HandlerList
boolean
Gets the cancellation state of this event.void
setCancelled
(boolean cancel) Sets the cancellation state of this event.void
setCharge
(int charge) Sets the charge of the cursor.Methods inherited from class org.bukkit.event.block.BlockEvent
getBlock
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
SculkBloomEvent
-
-
Method Details
-
getCharge
public int getCharge()Returns the charge of the cursor, < 1000 by default.- Returns:
- the charge of the cursor
-
setCharge
public void setCharge(int charge) Sets the charge of the cursor.Increasing the charge of a cursor makes the cursor last longer, giving it more time to spread sculk blocks across a larger range.
Typically, charges should be set to the exp reward of a mob (
EntityDeathEvent.getDroppedExp()
), which is usually 3-5 for animals, and 5-10 for the average mob (up to 50 for wither skeletons). Roughly speaking, for each charge, 1 more sculk block will be placed.- Parameters:
charge
- the charge of the cursor.
-
isCancelled
public boolean isCancelled()Description copied from interface:Cancellable
Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
isCancelled
in interfaceCancellable
- Returns:
- true if this event is cancelled
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:Cancellable
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancel
- true if you wish to cancel this event
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-