Package net.citizensnpcs.trait
Class Controllable
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.Controllable
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic classstatic classstatic interfacestatic class
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanbooleanvoidonSpawn()Called when anNPCis spawned.voidrun()Called every tick if overridden.voidsetControls(Controllable.BuiltInControls controls) booleansetEnabled(boolean enabled) voidsetOwnerRequired(boolean ownerRequired) booleantoggle()
- 
Constructor Details- 
Controllablepublic Controllable()
 
- 
- 
Method Details- 
isEnabledpublic boolean isEnabled()
- 
mount- Parameters:
- toMount- the player to mount
- Returns:
- whether the mount was successful
 
- 
onSpawnpublic 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.
- 
runpublic void run()Description copied from class:TraitCalled every tick if overridden.
- 
setControls
- 
setEnabledpublic boolean setEnabled(boolean enabled) 
- 
setOwnerRequiredpublic void setOwnerRequired(boolean ownerRequired) - See Also:
 
- 
togglepublic boolean toggle()
 
-