org.bukkit.entity.ChestedHorse Java Examples

The following examples show how to use org.bukkit.entity.ChestedHorse. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityHorsePet.java    From SonarPet with GNU General Public License v3.0 5 votes vote down vote up
@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);
}
 
Example #2
Source File: NMSEntityHorseImpl.java    From SonarPet with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void setCarryingChest(boolean flag) {
    if (getBukkitEntity() instanceof ChestedHorse) {
        ((ChestedHorse) getBukkitEntity()).setCarryingChest(flag);
    }
}
 
Example #3
Source File: NMSEntityHorseImpl.java    From SonarPet with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void setCarryingChest(boolean flag) {
    if (getBukkitEntity() instanceof ChestedHorse) {
        ((ChestedHorse) getBukkitEntity()).setCarryingChest(flag);
    }
}