Package net.citizensnpcs.trait
Class Gravity
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.Gravity
Enable/disable Minecraft's gravity.
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanvoidonSpawn()Called when anNPCis spawned.voidrun()Called every tick if overridden.voidsetHasGravity(boolean hasGravity) Set whether to have gravity or notbooleantoggle()
- 
Constructor Details- 
Gravitypublic Gravity()
 
- 
- 
Method Details- 
hasGravitypublic boolean hasGravity()
- 
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.
- 
setHasGravitypublic void setHasGravity(boolean hasGravity) Set whether to have gravity or not
- 
togglepublic boolean toggle()
 
-