mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-11-04 08:59:47 +01:00
Update ProtocolLib version to BETA
This commit is contained in:
parent
51483e0572
commit
22f46cc824
@ -98,7 +98,7 @@ ant.get src: 'http://server.o2gaming.com/downloads/spigot-1.9.jar', dest: file('
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile "org.spigotmc:spigot-api:$project.ext.spigotVersion"
|
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'
|
compile name: 'spigot-1.9'
|
||||||
testCompile group: 'junit', name: 'junit', version: '4.10'
|
testCompile group: 'junit', name: 'junit', version: '4.10'
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package me.libraryaddict.disguise.disguisetypes.watchers;
|
|||||||
|
|
||||||
import com.google.common.base.Optional;
|
import com.google.common.base.Optional;
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Horse.Color;
|
import org.bukkit.entity.Horse.Color;
|
||||||
import org.bukkit.entity.Horse.Style;
|
import org.bukkit.entity.Horse.Style;
|
||||||
@ -15,16 +16,25 @@ public class HorseWatcher extends AgeableWatcher {
|
|||||||
|
|
||||||
public HorseWatcher(Disguise disguise) {
|
public HorseWatcher(Disguise disguise) {
|
||||||
super(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
|
//TODO: Check and make sure Variants work
|
||||||
public Variant getVariant() {
|
public Variant getVariant() {
|
||||||
return Variant.values()[(int) getValue(14, 0)];
|
return Variant.values()[(int) getValue(14, 0)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVariant(Variant variant) {
|
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);
|
sendData(14);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user