|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerEggThrowEvent
public class PlayerEggThrowEvent
Called when a player throws an egg and it might hatch
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.bukkit.event.Event |
|---|
Event.Result |
| Field Summary |
|---|
| Fields inherited from class org.bukkit.event.player.PlayerEvent |
|---|
player |
| Constructor Summary | |
|---|---|
PlayerEggThrowEvent(Player player,
Egg egg,
boolean hatching,
byte numHatches,
CreatureType hatchingType)
Deprecated. |
|
PlayerEggThrowEvent(Player player,
Egg egg,
boolean hatching,
byte numHatches,
EntityType hatchingType)
|
|
| Method Summary | |
|---|---|
Egg |
getEgg()
Gets the egg involved in this event. |
static HandlerList |
getHandlerList()
|
HandlerList |
getHandlers()
|
EntityType |
getHatchingType()
Get the type of the mob being hatched (EntityType.CHICKEN by default) |
CreatureType |
getHatchType()
Deprecated. In favour of getHatchingType(). |
byte |
getNumHatches()
Get the number of mob hatches from the egg. |
boolean |
isHatching()
Gets whether the egg is hatching or not. |
void |
setHatching(boolean hatching)
Sets whether the egg will hatch or not. |
void |
setHatchingType(EntityType hatchType)
Change the type of mob being hatched by the egg |
void |
setHatchType(CreatureType hatchType)
Deprecated. In favour of setHatchingType(EntityType). |
void |
setNumHatches(byte numHatches)
Change the number of mobs coming out of the hatched egg The boolean hatching will override this number. |
| Methods inherited from class org.bukkit.event.player.PlayerEvent |
|---|
getPlayer |
| Methods inherited from class org.bukkit.event.Event |
|---|
getEventName, isAsynchronous |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlayerEggThrowEvent(Player player,
Egg egg,
boolean hatching,
byte numHatches,
EntityType hatchingType)
@Deprecated
public PlayerEggThrowEvent(Player player,
Egg egg,
boolean hatching,
byte numHatches,
CreatureType hatchingType)
| Method Detail |
|---|
public Egg getEgg()
public boolean isHatching()
public void setHatching(boolean hatching)
hatching - true if you want the egg to hatch
false if you want it not to@Deprecated public CreatureType getHatchType()
getHatchingType().
public EntityType getHatchingType()
@Deprecated public void setHatchType(CreatureType hatchType)
setHatchingType(EntityType).
hatchType - The type of the mob being hatched by the eggpublic void setHatchingType(EntityType hatchType)
hatchType - The type of the mob being hatched by the eggpublic byte getNumHatches()
public void setNumHatches(byte numHatches)
numHatches - The number of mobs coming out of the eggpublic HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||