Implement API for wolves collar color. Adds BUKKIT-3109
Dieser Commit ist enthalten in:
Ursprung
bb60e85fff
Commit
6a04fd98ad
@ -1,6 +1,7 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import net.minecraft.server.EntityWolf;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Wolf;
|
||||
@ -27,4 +28,12 @@ public class CraftWolf extends CraftTameableAnimal implements Wolf {
|
||||
public EntityType getType() {
|
||||
return EntityType.WOLF;
|
||||
}
|
||||
|
||||
public DyeColor getCollarColor() {
|
||||
return DyeColor.getByData((byte) getHandle().getCollarColor());
|
||||
}
|
||||
|
||||
public void setCollarColor(DyeColor color) {
|
||||
getHandle().setCollarColor(color.getData());
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren