Fixed errors
This commit is contained in:
parent
25e0a59099
commit
410b96dafe
@ -15,7 +15,49 @@ import org.bukkit.util.Vector;
|
||||
import com.comphenix.protocol.wrappers.BlockPosition;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.*;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.AgeableWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.AreaEffectCloudWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.ArmorStandWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.ArrowWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.BatWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.BlazeWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.BoatWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.CreeperWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.DroppedItemWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.EnderCrystalWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.EnderDragonWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.EndermanWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.FallingBlockWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.FireworkWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.FishingHookWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.GhastWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.GuardianWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.HorseWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.InsentientWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.IronGolemWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.ItemFrameWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.MinecartWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.OcelotWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.PigWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.PlayerWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.PolarBearWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.RabbitWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.SheepWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.ShulkerWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.SkeletonWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.SlimeWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.SnowmanWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.SpiderWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.SplashPotionWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.TNTWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.TameableWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.VillagerWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.WitchWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.WitherSkullWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.WitherWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.WolfWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.ZombieWatcher;
|
||||
|
||||
public class FlagType<Y>
|
||||
{
|
||||
@ -54,7 +96,7 @@ public class FlagType<Y>
|
||||
|
||||
public static FlagType<Byte> BAT_HANGING = new FlagType<Byte>(BatWatcher.class, 0, (byte) 1);
|
||||
|
||||
public static FlagType<Boolean> BLAZE_BLAZING = new FlagType<Boolean>(BlazeWatcher.class, 0, false);
|
||||
public static FlagType<Byte> BLAZE_BLAZING = new FlagType<Byte>(BlazeWatcher.class, 0, (byte) 0);
|
||||
|
||||
public static FlagType<Float> BOAT_DAMAGE = new FlagType<Float>(BoatWatcher.class, 2, 40F);
|
||||
|
||||
@ -187,7 +229,7 @@ public class FlagType<Y>
|
||||
|
||||
public static FlagType<Integer> SLIME_SIZE = new FlagType<Integer>(SlimeWatcher.class, 0, 0);
|
||||
|
||||
public static FlagType<Byte> SNOWMAN_HAT = new FlagType<Byte>(SnowmanWatcher.class, 0, (byte) 1);
|
||||
public static FlagType<Byte> SNOWMAN_HAT = new FlagType<Byte>(SnowmanWatcher.class, 0, (byte) 0);
|
||||
|
||||
public static FlagType<Byte> SPIDER_CLIMB = new FlagType<Byte>(SpiderWatcher.class, 0, (byte) 0);
|
||||
|
||||
|
@ -12,12 +12,12 @@ public class BlazeWatcher extends InsentientWatcher
|
||||
|
||||
public boolean isBlazing()
|
||||
{
|
||||
return getValue(FlagType.BLAZE_BLAZING);
|
||||
return getValue(FlagType.BLAZE_BLAZING) == 1;
|
||||
}
|
||||
|
||||
public void setBlazing(boolean isBlazing)
|
||||
{
|
||||
setValue(FlagType.BLAZE_BLAZING, isBlazing);
|
||||
setValue(FlagType.BLAZE_BLAZING, (byte) (isBlazing ? 1 : 0));
|
||||
sendData(FlagType.BLAZE_BLAZING);
|
||||
}
|
||||
|
||||
|
@ -12,12 +12,12 @@ public class SnowmanWatcher extends InsentientWatcher
|
||||
|
||||
public void setHat(boolean hat)
|
||||
{
|
||||
setValue(FlagType.SNOWMAN_HAT, (byte) (hat ? 1 : 0));
|
||||
setValue(FlagType.SNOWMAN_HAT, (byte) (hat ? 0 : 16));
|
||||
sendData(FlagType.SNOWMAN_HAT);
|
||||
}
|
||||
|
||||
public boolean isHat()
|
||||
{
|
||||
return getValue(FlagType.SNOWMAN_HAT) == 1;
|
||||
return getValue(FlagType.SNOWMAN_HAT) == 0;
|
||||
}
|
||||
}
|
||||
|
@ -1186,7 +1186,7 @@ public class DisguiseUtilities
|
||||
|
||||
if ((t = scoreboard.getTeam("LDPushing")) != null)
|
||||
{
|
||||
t.unregister();
|
||||
t.removeEntry(player.getName());
|
||||
}
|
||||
|
||||
// player.spigot().setCollidesWithEntities(true);
|
||||
|
@ -248,7 +248,7 @@ public class PacketListenerSounds extends PacketAdapter
|
||||
|
||||
if (((MobDisguise) disguise).isAdult() == baby)
|
||||
{
|
||||
float pitch = (Integer) mods.read(6);
|
||||
float pitch = (Float) mods.read(6);
|
||||
|
||||
if (baby)
|
||||
{
|
||||
@ -285,7 +285,7 @@ public class PacketListenerSounds extends PacketAdapter
|
||||
if (pitch > 255)
|
||||
pitch = 255;
|
||||
|
||||
mods.write(6, (int) pitch);
|
||||
mods.write(6, pitch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user