Package net.citizensnpcs.trait
Class MountTrait
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.MountTrait
Persists the NPC's mounted on entity, if any. Will attempt to respawn on mount.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckMounted(Entity mounted) voidCalled just before the attachedNPCis despawned.voidonSpawn()Called when anNPCis spawned.voidrun()Called every tick if overridden.voidsetMountedOn(UUID uuid) voidunmount()
-
Constructor Details
-
MountTrait
public MountTrait()
-
-
Method Details
-
checkMounted
-
getMountedOn
-
onDespawn
public void onDespawn()Description copied from class:TraitCalled just before the attachedNPCis despawned.NPC.getEntity()will be non-null. -
onSpawn
public void onSpawn()Description copied from class:TraitCalled when anNPCis spawned.NPC.getEntity()will return null until this is called. This is also called onAttach when the NPC is already spawned. -
run
public void run()Description copied from class:TraitCalled every tick if overridden. -
setMountedOn
-
unmount
public void unmount()
-