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 TypeMethodDescriptionvoid
checkMounted
(Entity mounted) void
Called just before the attachedNPC
is despawned.void
onSpawn()
Called when anNPC
is spawned.void
run()
Called every tick if overridden.void
setMountedOn
(UUID uuid) void
unmount()
-
Constructor Details
-
MountTrait
public MountTrait()
-
-
Method Details
-
checkMounted
-
getMountedOn
-
onDespawn
public void onDespawn()Description copied from class:Trait
Called just before the attachedNPC
is despawned.NPC.getEntity()
will be non-null. -
onSpawn
public void onSpawn()Description copied from class:Trait
Called when anNPC
is 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:Trait
Called every tick if overridden. -
setMountedOn
-
unmount
public void unmount()
-