Update ProtocolLib version to BETA

This commit is contained in:
NavidK0 2016-03-08 06:18:17 -05:00
parent 51483e0572
commit 22f46cc824
2 changed files with 13 additions and 3 deletions

View File

@ -98,7 +98,7 @@ ant.get src: 'http://server.o2gaming.com/downloads/spigot-1.9.jar', dest: file('
dependencies {
compile "org.spigotmc:spigot-api:$project.ext.spigotVersion"
compile 'com.comphenix.protocol:ProtocolLib:3.7-SNAPSHOT'
compile 'com.comphenix.protocol:ProtocolLib:3.7.0-BETA'
compile name: 'spigot-1.9'
testCompile group: 'junit', name: 'junit', version: '4.10'
}

View File

@ -2,6 +2,7 @@ package me.libraryaddict.disguise.disguisetypes.watchers;
import com.google.common.base.Optional;
import me.libraryaddict.disguise.disguisetypes.Disguise;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Horse.Color;
import org.bukkit.entity.Horse.Style;
@ -15,16 +16,25 @@ public class HorseWatcher extends AgeableWatcher {
public HorseWatcher(Disguise disguise) {
super(disguise);
setColor(Color.values()[new Random().nextInt(Color.values().length)]);
Variant variant = getVariant();
if (variant == Variant.DONKEY || variant == Variant.MULE || variant == Variant.HORSE)
setColor(Color.values()[new Random().nextInt(Color.values().length)]);
}
//TODO: Check and make sure Variants work
public Variant getVariant() {
return Variant.values()[(int) getValue(14, 0)];
}
public void setVariant(Variant variant) {
setValue(14, variant.ordinal());
Bukkit.broadcastMessage("Variant set to: " + variant);
Bukkit.broadcastMessage("Ordinal: " + variant.ordinal());
setVariant(variant.ordinal());
}
public void setVariant(int variant) {
setValue(14, variant);
sendData(14);
}