mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 09:16:06 +01:00
Implement API for wolves collar color. Adds BUKKIT-3109
By: feildmaster <admin@feildmaster.com>
This commit is contained in:
parent
9be2656543
commit
8497ec2d7c
1 changed files with 9 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
package org.bukkit.craftbukkit.entity;
|
package org.bukkit.craftbukkit.entity;
|
||||||
|
|
||||||
import net.minecraft.server.EntityWolf;
|
import net.minecraft.server.EntityWolf;
|
||||||
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Wolf;
|
import org.bukkit.entity.Wolf;
|
||||||
|
@ -27,4 +28,12 @@ public class CraftWolf extends CraftTameableAnimal implements Wolf {
|
||||||
public EntityType getType() {
|
public EntityType getType() {
|
||||||
return EntityType.WOLF;
|
return EntityType.WOLF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DyeColor getCollarColor() {
|
||||||
|
return DyeColor.getByData((byte) getHandle().getCollarColor());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCollarColor(DyeColor color) {
|
||||||
|
getHandle().setCollarColor(color.getData());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue