mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-13 15:16:50 +01:00
Changed getHorseArmor to return a itemstack, rename getHorseArmor to getHorseAmorAsInt and default owner name is null
This commit is contained in:
parent
b12e4b1da9
commit
04de21dba4
@ -20,12 +20,28 @@ public class HorseWatcher extends AgeableWatcher {
|
||||
return Color.values()[((Integer) getValue(20, 0) & 0xFF)];
|
||||
}
|
||||
|
||||
public int getHorseArmor() {
|
||||
public ItemStack getHorseArmor() {
|
||||
int horseValue = getHorseArmorAsInt();
|
||||
switch (horseValue) {
|
||||
case 1:
|
||||
return new ItemStack(Material.getMaterial("IRON_BARDING"));
|
||||
case 2:
|
||||
return new ItemStack(Material.getMaterial("GOLD_BARDING"));
|
||||
case 3:
|
||||
return new ItemStack(Material.getMaterial("DIAMOND_BARDING"));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getHorseArmorAsInt() {
|
||||
return (Integer) getValue(22, 0);
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return (String) getValue(21, "");
|
||||
return (String) getValue(21, null);
|
||||
}
|
||||
|
||||
public Style getStyle() {
|
||||
|
Loading…
Reference in New Issue
Block a user