mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-11-04 08:59:47 +01:00
Boat disguise is always generic now
This commit is contained in:
parent
4fe23a629d
commit
bcc4bdd2a2
@ -1,63 +1,51 @@
|
||||
package me.libraryaddict.disguise.disguisetypes.watchers;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.TreeSpecies;
|
||||
|
||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||
import me.libraryaddict.disguise.disguisetypes.MetaIndex;
|
||||
import me.libraryaddict.disguise.disguisetypes.FlagWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.MetaIndex;
|
||||
|
||||
public class BoatWatcher extends FlagWatcher
|
||||
{
|
||||
public BoatWatcher(Disguise disguise)
|
||||
{
|
||||
public class BoatWatcher extends FlagWatcher {
|
||||
public BoatWatcher(Disguise disguise) {
|
||||
super(disguise);
|
||||
|
||||
setBoatType(TreeSpecies.values()[new Random().nextInt(6)]);
|
||||
setBoatType(TreeSpecies.GENERIC);
|
||||
}
|
||||
|
||||
public float getDamage()
|
||||
{
|
||||
public float getDamage() {
|
||||
return getData(MetaIndex.BOAT_DAMAGE);
|
||||
}
|
||||
|
||||
public void setDamage(float dmg)
|
||||
{
|
||||
public void setDamage(float dmg) {
|
||||
setData(MetaIndex.BOAT_DAMAGE, dmg);
|
||||
sendData(MetaIndex.BOAT_DAMAGE);
|
||||
}
|
||||
|
||||
public void setRightPaddling(boolean rightPaddling)
|
||||
{
|
||||
public void setRightPaddling(boolean rightPaddling) {
|
||||
setData(MetaIndex.BOAT_RIGHT_PADDLING, rightPaddling);
|
||||
sendData(MetaIndex.BOAT_RIGHT_PADDLING);
|
||||
}
|
||||
|
||||
public void setLeftPaddling(boolean leftPaddling)
|
||||
{
|
||||
public void setLeftPaddling(boolean leftPaddling) {
|
||||
setData(MetaIndex.BOAT_LEFT_PADDLING, leftPaddling);
|
||||
sendData(MetaIndex.BOAT_LEFT_PADDLING);
|
||||
}
|
||||
|
||||
public boolean isRightPaddling()
|
||||
{
|
||||
public boolean isRightPaddling() {
|
||||
return getData(MetaIndex.BOAT_RIGHT_PADDLING);
|
||||
}
|
||||
|
||||
public boolean isLeftPaddling()
|
||||
{
|
||||
public boolean isLeftPaddling() {
|
||||
return getData(MetaIndex.BOAT_LEFT_PADDLING);
|
||||
}
|
||||
|
||||
public void setBoatType(TreeSpecies boatType)
|
||||
{
|
||||
public void setBoatType(TreeSpecies boatType) {
|
||||
setData(MetaIndex.BOAT_TYPE, (int) boatType.getData());
|
||||
sendData(MetaIndex.BOAT_TYPE);
|
||||
}
|
||||
|
||||
public TreeSpecies getBoatType()
|
||||
{
|
||||
public TreeSpecies getBoatType() {
|
||||
return TreeSpecies.getByData(getData(MetaIndex.BOAT_TYPE).byteValue());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user