public class Animatronic
extends java.lang.Object
Constructor and Description |
---|
Animatronic(java.lang.String name)
Animatronic object can be instantiated with just the name.
|
Modifier and Type | Method and Description |
---|---|
void |
addPose(org.bukkit.entity.ArmorStand from)
Adds a pose through a existing armorstand, will also copy clothes.
|
void |
addPose(org.bukkit.Location loc,
org.bukkit.util.EulerAngle head,
org.bukkit.util.EulerAngle body,
org.bukkit.util.EulerAngle leftArm,
org.bukkit.util.EulerAngle rightArm,
org.bukkit.util.EulerAngle leftLeg,
org.bukkit.util.EulerAngle rightLeg)
Adds a pose through specific angles and location
|
void |
editPose(int poseNum,
org.bukkit.entity.ArmorStand from)
Edit the position saved with the given armorstands pose, including clothes
|
void |
editPose(int poseNum,
org.bukkit.Location loc,
org.bukkit.util.EulerAngle head,
org.bukkit.util.EulerAngle body,
org.bukkit.util.EulerAngle leftArm,
org.bukkit.util.EulerAngle rightArm,
org.bukkit.util.EulerAngle leftLeg,
org.bukkit.util.EulerAngle rightLeg)
Edit the position saved with given location and angles
|
org.bukkit.entity.ArmorStand |
getArmorstand()
Gets the armorstand associated with the Animatronic.
|
org.bukkit.inventory.ItemStack |
getBoots(int poseNum)
Get boots for specified position number.
|
org.bukkit.inventory.ItemStack |
getChestplate(int poseNum)
Get chestplate for specified position number.
|
java.lang.Integer |
getDelay(int poseNum)
Gets the delay for given position number
|
java.lang.Integer |
getGlobalDelay()
Gets the delay set globally for the animatronic, can be overriden by indivudually set delays.
|
org.bukkit.inventory.ItemStack |
getHelmet(int poseNum)
Get helmet for specified position number.
|
org.bukkit.inventory.ItemStack |
getLeggings(int poseNum)
Get leggings for specified position number.
|
ApiPose |
getPose(int poseNum)
Gets the position info saved for given pose number
|
ApiPose[] |
getPositions()
Returns all positions saved for this Animatronic
|
boolean |
gotoPose(int pose)
Teleports/sets Animatronic to specified pose
|
boolean |
gotoStart()
Teleports a Animatronic to the start position
|
void |
removePosition(int positionToRemove)
Remove a position by number
|
void |
setBoots(int poseNum,
org.bukkit.inventory.ItemStack item)
Set boots for specified position.
|
void |
setChestplate(int poseNum,
org.bukkit.inventory.ItemStack item)
Set chestplate for specified position.
|
boolean |
setDelay(int delay)
Deprecated.
Replaced by setGlobalDelay
|
boolean |
setDelay(int poseNum,
int delayInTicks)
Sets the delay between the posenumber and pose number + 1
|
boolean |
setGlobalDelay(int delay)
Set the delay of the Animatronic globally, these can be overwritten by individually set delays.
|
void |
setHelmet(int poseNum,
org.bukkit.inventory.ItemStack item)
Set helmet for specified position.
|
void |
setLeggings(int poseNum,
org.bukkit.inventory.ItemStack item)
Set leggings for specified position.
|
boolean |
start()
Start a Animatronic
|
boolean |
start(int amount)
Start a Animatronic, with given repeat count
|
boolean |
startRev()
Spawn a Animatronic in reverse
|
boolean |
stop()
Stop a Animatronic
|
boolean |
toggle()
Toggle a Animatronic
|
public Animatronic(java.lang.String name)
name
- Name of the Animatronic.public void addPose(org.bukkit.entity.ArmorStand from)
from
- Armorstand to copy pose frompublic void addPose(org.bukkit.Location loc, org.bukkit.util.EulerAngle head, org.bukkit.util.EulerAngle body, org.bukkit.util.EulerAngle leftArm, org.bukkit.util.EulerAngle rightArm, org.bukkit.util.EulerAngle leftLeg, org.bukkit.util.EulerAngle rightLeg)
loc
- Locationhead
- Head euler anglebody
- Body euler angleleftArm
- Left arm euler anglerightArm
- Right arm euler angleleftLeg
- Left leg euler anglerightLeg
- Right leg euler anglepublic void removePosition(int positionToRemove)
positionToRemove
- position number to remove, starts at 1public void editPose(int poseNum, org.bukkit.entity.ArmorStand from)
poseNum
- Position numberfrom
- Armorstand to get pose frompublic void editPose(int poseNum, org.bukkit.Location loc, org.bukkit.util.EulerAngle head, org.bukkit.util.EulerAngle body, org.bukkit.util.EulerAngle leftArm, org.bukkit.util.EulerAngle rightArm, org.bukkit.util.EulerAngle leftLeg, org.bukkit.util.EulerAngle rightLeg)
poseNum
- Position numberpublic ApiPose getPose(int poseNum)
poseNum
- Pose number to get@Nullable public ApiPose[] getPositions()
public boolean setDelay(int poseNum, int delayInTicks)
poseNum
- Pose numberdelayInTicks
- Delay in ticks@Nullable public java.lang.Integer getDelay(int poseNum)
poseNum
- position number@Nullable public java.lang.Integer getGlobalDelay()
@Deprecated public boolean setDelay(int delay)
delay
- Delay in ticks (must be at least 3 ticks)public boolean setGlobalDelay(int delay)
delay
- Delay in ticks (must be at least 3 ticks)public boolean gotoPose(int pose)
pose
- Pose numberpublic boolean gotoStart()
public boolean startRev()
public boolean start()
public boolean start(int amount)
amount
- repeat countpublic boolean stop()
public boolean toggle()
public org.bukkit.entity.ArmorStand getArmorstand()
@Nullable public org.bukkit.inventory.ItemStack getHelmet(int poseNum)
poseNum
- position number@Nullable public org.bukkit.inventory.ItemStack getChestplate(int poseNum)
poseNum
- position number@Nullable public org.bukkit.inventory.ItemStack getLeggings(int poseNum)
poseNum
- position number@Nullable public org.bukkit.inventory.ItemStack getBoots(int poseNum)
poseNum
- position numberpublic void setHelmet(int poseNum, org.bukkit.inventory.ItemStack item)
poseNum
- Position numberitem
- Itemstack to savepublic void setChestplate(int poseNum, org.bukkit.inventory.ItemStack item)
poseNum
- Position numberitem
- Itemstack to savepublic void setLeggings(int poseNum, org.bukkit.inventory.ItemStack item)
poseNum
- Position numberitem
- Itemstack to savepublic void setBoots(int poseNum, org.bukkit.inventory.ItemStack item)
poseNum
- Position numberitem
- Itemstack to save