下面列出了org.bukkit.inventory.HorseInventory#org.bukkit.entity.ChestedHorse 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Override
public void setChested(boolean flag) {
if (Versioning.NMS_VERSION.compareTo(NmsVersion.v1_11_R1) >= 0) {
if (!(getBukkitEntity() instanceof ChestedHorse)) {
/*
* To fail silently, or to throw an exception; that is the question.
* Whether is nobler to be confusing and get a bug report,
* or be annoying and get a bug report?
*/
return;
}
}
getEntity().setCarryingChest(flag);
}
@Override
public void setCarryingChest(boolean flag) {
if (getBukkitEntity() instanceof ChestedHorse) {
((ChestedHorse) getBukkitEntity()).setCarryingChest(flag);
}
}
@Override
public void setCarryingChest(boolean flag) {
if (getBukkitEntity() instanceof ChestedHorse) {
((ChestedHorse) getBukkitEntity()).setCarryingChest(flag);
}
}