geforkt von Mirrors/Paper
Added implementation of Colorable to CraftSheep
inspired by xpansive
Dieser Commit ist enthalten in:
Ursprung
09c6389b3f
Commit
c097fd9ac5
@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.entity;
|
|||||||
|
|
||||||
import net.minecraft.server.EntitySheep;
|
import net.minecraft.server.EntitySheep;
|
||||||
|
|
||||||
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.entity.Sheep;
|
import org.bukkit.entity.Sheep;
|
||||||
|
|
||||||
@ -16,4 +17,14 @@ public class CraftSheep extends CraftAnimals implements Sheep {
|
|||||||
return "CraftSheep";
|
return "CraftSheep";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DyeColor getColor() {
|
||||||
|
EntitySheep entity = (EntitySheep) getHandle();
|
||||||
|
return DyeColor.getByData((byte) entity.e_());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColor(DyeColor color) {
|
||||||
|
EntitySheep entity = (EntitySheep) getHandle();
|
||||||
|
entity.a(color.getData());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren