Package com.ticxo.modelengine.api.mount
Class MountManager
java.lang.Object
com.ticxo.modelengine.api.mount.MountManager
This class manages everything mounting related of a
ModeledEntity
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPassengerToSeat
(String modelId, String seatId, org.bukkit.entity.Entity passenger, MountController controller) void
clearPassengersOnSeat
(String modelId, String seatId) void
void
getController
(UUID uuid) protected @Nullable Mountable
getMountable
(String modelId, String seatId) @Nullable Mountable
getMountedBone
(UUID uuid) @Nullable Mountable
getMountedBone
(org.bukkit.entity.Entity entity) Set<org.bukkit.entity.Entity>
getPassengersOnSeat
(String modelId, String seatId) boolean
boolean
hasRider
(org.bukkit.entity.Entity rider) boolean
boolean
isDamageNullified
(UUID uuid) protected void
registerPair
(org.bukkit.entity.Entity entity, MountController controller) void
void
removePassenger
(org.bukkit.entity.Entity entity) protected void
removePassengerReference
(org.bukkit.entity.Entity entity) void
removePassengers
(org.bukkit.entity.Entity... entities) void
removePassengersOnSeat
(String modelId, String seatId, org.bukkit.entity.Entity... passengers) void
removeRiders
(org.bukkit.entity.Entity... riders) void
setCanDamageMount
(UUID uuid, boolean flag) Deprecated.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.void
setCanRide
(boolean flag) void
setCanSteer
(boolean flag) protected void
setCollidable
(org.bukkit.entity.Entity entity, boolean flag) void
setDriver
(@NotNull org.bukkit.entity.Entity driver, MountController controller) void
setDriverBone
(Mountable driverBone) protected void
unregisterPair
(org.bukkit.entity.Entity entity)
-
Constructor Details
-
MountManager
-
-
Method Details
-
setCanSteer
public void setCanSteer(boolean flag) -
setCanRide
public void setCanRide(boolean flag) -
setDriverBone
-
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
-
clearPassengersOnSeat
-
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.Deprecated. UsesetCanDamageMount(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 attackflag
- true if entity can attack this model
-
isDamageNullified
-
getPassengersOnSeat
-
hasPassengers
public boolean hasPassengers() -
getPassengers
-
getMountedBone
-
getMountedBone
-
getController
-
registerPair
-
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
-