public class PlayerEggThrowEvent extends PlayerEvent
Event.Result
player
构造器和说明 |
---|
PlayerEggThrowEvent(Player player,
Egg egg,
boolean hatching,
byte numHatches,
EntityType hatchingType) |
限定符和类型 | 方法和说明 |
---|---|
Egg |
getEgg()
获取事件中的鸡蛋.
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
EntityType |
getHatchingType()
获取将被孵化的生物类型 (默认为EntityType.CHICKEN ).
|
byte |
getNumHatches()
检测将被孵化生物的数量。
|
boolean |
isHatching()
检测鸡蛋是否将被孵化。
|
void |
setHatching(boolean hatching)
设置鸡蛋是否将被孵化.
|
void |
setHatchingType(EntityType hatchType)
修改将被孵化生物的类型.
|
void |
setNumHatches(byte numHatches)
改变将被孵化生物的数量.
|
getPlayer
getEventName, isAsynchronous
public PlayerEggThrowEvent(Player player, Egg egg, boolean hatching, byte numHatches, EntityType hatchingType)
public Egg getEgg()
原文:Gets the egg involved in this event.
public boolean isHatching()
原文:Gets whether the egg is hatching or not. Will be what the server would've done without interaction.
public void setHatching(boolean hatching)
原文:Sets whether the egg will hatch or not.
hatching
- 你是否希望鸡蛋孵化public EntityType getHatchingType()
原文:Get the type of the mob being hatched (EntityType.CHICKEN by default)
public void setHatchingType(EntityType hatchType)
原文:Change the type of mob being hatched by the egg
hatchType
- 将被孵化生物的类型public byte getNumHatches()
原文:Get the number of mob hatches from the egg. By default the number will be the number the server would've done
public void setNumHatches(byte numHatches)
hatching
的值将覆盖该数值的作用。
如果hatching
被设为false, 则本数值不会生效。
原文:Change the number of mobs coming out of the hatched egg
The boolean hatching will override this number. Ie. If hatching = false, this number will not matter
numHatches
- 将被孵化生物的数量public HandlerList getHandlers()
getHandlers
在类中 Event
public static HandlerList getHandlerList()