public class StructureGrowEvent extends WorldEvent implements Cancellable
Event.Result
构造器和说明 |
---|
StructureGrowEvent(Location location,
TreeType species,
boolean bonemeal,
Player player,
java.util.List<BlockState> blocks) |
限定符和类型 | 方法和说明 |
---|---|
java.util.List<BlockState> |
getBlocks()
获取与结构有关的所有方块的ArrayList.
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
Location |
getLocation()
获取这个结构的位置.
|
Player |
getPlayer()
获取“种”下这个结构的玩家.
|
TreeType |
getSpecies()
获取物种类型(白桦、橡树、云杉、红蘑菇和棕蘑菇).
|
boolean |
isCancelled()
获取这个事件是否被取消.一个被取消的事件不会在服务器里被执行,但是仍然会传递事件到其他插件。
|
boolean |
isFromBonemeal()
检测此结构的生长是否使用骨粉.
|
void |
setCancelled(boolean cancel)
取消这个事件.
|
getWorld
getEventName, isAsynchronous
public StructureGrowEvent(Location location, TreeType species, boolean bonemeal, Player player, java.util.List<BlockState> blocks)
public Location getLocation()
原文: Gets the location of the structure.
public TreeType getSpecies()
原文: Gets the species type (birch, normal, pine, red mushroom, brown mushroom)
public boolean isFromBonemeal()
原文: Checks if structure was grown using bonemeal.
public Player getPlayer()
原文: Gets the player that created the structure.
public java.util.List<BlockState> getBlocks()
原文: Gets an ArrayList of all blocks associated with the structure.
public boolean isCancelled()
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
isCancelled
在接口中 Cancellable
public void setCancelled(boolean cancel)
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.
setCancelled
在接口中 Cancellable
cancel
- 如果你想取消这个事件,则为truepublic HandlerList getHandlers()
getHandlers
在类中 Event
public static HandlerList getHandlerList()