Boat disguise is always generic now

This commit is contained in:
libraryaddict 2017-02-24 01:09:03 +13:00
parent 4fe23a629d
commit bcc4bdd2a2

View File

@ -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());
}