mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 06:53:44 +01:00
Merge pull request #268 from xPaw/master
Implemented hasSaddle/setSaddle
This commit is contained in:
commit
88d0171c43
@ -5,14 +5,24 @@ import org.bukkit.craftbukkit.CraftServer;
|
|||||||
import org.bukkit.entity.Pig;
|
import org.bukkit.entity.Pig;
|
||||||
|
|
||||||
public class CraftPig extends CraftAnimals implements Pig {
|
public class CraftPig extends CraftAnimals implements Pig {
|
||||||
|
|
||||||
public CraftPig(CraftServer server, EntityPig entity) {
|
public CraftPig(CraftServer server, EntityPig entity) {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasSaddle() {
|
||||||
|
return getHandle().x();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSaddle(boolean flag) {
|
||||||
|
getHandle().a(flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityPig getHandle() {
|
||||||
|
return (EntityPig) super.getHandle();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "CraftPig";
|
return "CraftPig";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user