Class MountManager

java.lang.Object
com.ticxo.modelengine.api.mount.MountManager

public class MountManager extends Object
This class manages everything mounting related of a ModeledEntity.
  • Constructor Details

  • Method Details

    • setCanSteer

      public void setCanSteer(boolean flag)
    • setCanRide

      public void setCanRide(boolean flag)
    • setDriverBone

      public void setDriverBone(Mountable driverBone)
    • setDriver

      public void setDriver(@NotNull @NotNull org.bukkit.entity.Entity driver, MountController controller) throws IllegalStateException
      Throws:
      IllegalStateException
    • removeDriver

      public void removeDriver()
    • isControlled

      public boolean isControlled()
    • addPassengerToSeat

      public void addPassengerToSeat(String modelId, String seatId, org.bukkit.entity.Entity passenger, MountController controller) throws IllegalStateException
      Throws:
      IllegalStateException
    • removePassenger

      public void removePassenger(org.bukkit.entity.Entity entity)
    • removePassengers

      public void removePassengers(org.bukkit.entity.Entity... entities)
    • removePassengersOnSeat

      public void removePassengersOnSeat(String modelId, String seatId, org.bukkit.entity.Entity... passengers)
    • clearPassengersOnSeat

      public void clearPassengersOnSeat(String modelId, String seatId)
    • dismountAll

      public void dismountAll()
    • dismountAllPassengers

      public void dismountAllPassengers()
    • removeRiders

      public void removeRiders(org.bukkit.entity.Entity... riders)
    • hasRider

      public boolean hasRider(org.bukkit.entity.Entity rider)
    • setCanDamageMount

      @Deprecated(since="R3.1.5") public void setCanDamageMount(UUID uuid, boolean flag)
      Deprecated.
      Deprecated. Use setCanDamageMount(Entity, boolean) instead.
    • setCanDamageMount

      public void setCanDamageMount(org.bukkit.entity.Entity entity, boolean flag)
      Set if the entity can damage the mount.
      If the entity is a player, also toggle the visibility of the main hitbox and sub-hitboxes of this model.
      Parameters:
      entity - entity performing the attack
      flag - true if entity can attack this model
    • isDamageNullified

      public boolean isDamageNullified(UUID uuid)
    • getPassengersOnSeat

      public Set<org.bukkit.entity.Entity> getPassengersOnSeat(String modelId, String seatId)
    • hasPassengers

      public boolean hasPassengers()
    • getPassengers

      public Map<org.bukkit.entity.Entity,Mountable> getPassengers()
    • getMountedBone

      @Nullable public @Nullable Mountable getMountedBone(org.bukkit.entity.Entity entity)
    • getMountedBone

      @Nullable public @Nullable Mountable getMountedBone(UUID uuid)
    • getController

      public MountController getController(UUID uuid)
    • registerPair

      protected void registerPair(org.bukkit.entity.Entity entity, MountController controller)
    • unregisterPair

      protected void unregisterPair(org.bukkit.entity.Entity entity)
    • setCollidable

      protected void setCollidable(org.bukkit.entity.Entity entity, boolean flag)
    • removePassengerReference

      protected void removePassengerReference(org.bukkit.entity.Entity entity)
    • getMountable

      @Nullable protected @Nullable Mountable getMountable(String modelId, String seatId)