Update calls to DyeColor getData and getByData. Addresses BUKKIT-2786
These two methods are now deprecated and replaced by the strictly equivalent calls using wool data. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
@@ -13,11 +13,11 @@ public class CraftSheep extends CraftAnimals implements Sheep {
|
||||
}
|
||||
|
||||
public DyeColor getColor() {
|
||||
return DyeColor.getByData((byte) getHandle().getColor());
|
||||
return DyeColor.getByWoolData((byte) getHandle().getColor());
|
||||
}
|
||||
|
||||
public void setColor(DyeColor color) {
|
||||
getHandle().setColor(color.getData());
|
||||
getHandle().setColor(color.getWoolData());
|
||||
}
|
||||
|
||||
public boolean isSheared() {
|
||||
|
||||
@@ -30,10 +30,10 @@ public class CraftWolf extends CraftTameableAnimal implements Wolf {
|
||||
}
|
||||
|
||||
public DyeColor getCollarColor() {
|
||||
return DyeColor.getByData((byte) getHandle().getCollarColor());
|
||||
return DyeColor.getByWoolData((byte) getHandle().getCollarColor());
|
||||
}
|
||||
|
||||
public void setCollarColor(DyeColor color) {
|
||||
getHandle().setCollarColor(color.getData());
|
||||
getHandle().setCollarColor(color.getWoolData());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user