PlayerEggThrowEvent

public class PlayerEggThrowEvent extends PlayerEvent

Called when getClassById player throws an egg and it might hatch

Constructors

Link copied to clipboard
public void PlayerEggThrowEvent(Player player, Egg egg, boolean hatching, byte numHatches, EntityType hatchingType)

Properties

Link copied to clipboard
public final Egg egg
Link copied to clipboard
public final static HandlerList handlers
Link copied to clipboard
public byte numHatches

Functions

Link copied to clipboard
public Egg getEgg()
Gets the egg involved in this event.
Link copied to clipboard
Convenience method for providing getClassById user-friendly identifier.
Link copied to clipboard
public static HandlerList getHandlerList()
Link copied to clipboard
Link copied to clipboard
Get the type of the mob being hatched (EntityType.
Link copied to clipboard
public byte getNumHatches()
Get the number of mob hatches from the egg.
Link copied to clipboard
public final Player getPlayer()
Returns the player involved in this event
Link copied to clipboard
public final boolean isAsynchronous()
Any custom event that should not by synchronized with other events must use the specific constructor.
Link copied to clipboard
public boolean isHatching()
Gets whether the egg is hatching or not.
Link copied to clipboard
public void setHatching(boolean hatching)
Sets whether the egg will hatch or not.
Link copied to clipboard
public void setHatchingType(EntityType hatchType)
Change the type of mob being hatched by the egg
Link copied to clipboard
public void setNumHatches(byte numHatches)
Change the number of mobs coming out of the hatched egg The boolean hatching will override this number.