Package net.citizensnpcs.trait
Class Gravity
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.Gravity
- All Implemented Interfaces:
Runnable
,Toggleable
,Listener
Enable/disable Minecraft's gravity.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
gravitate
(boolean gravitate) Set whether to disable gravity or notboolean
void
run()
Called every tick if overridden.void
setEnabled
(boolean enabled) boolean
toggle()
-
Constructor Details
-
Gravity
public Gravity()
-
-
Method Details
-
gravitate
public void gravitate(boolean gravitate) Set whether to disable gravity or not- Parameters:
gravitate
- true = disable gravity, false = enable gravity
-
hasGravity
public boolean hasGravity() -
run
public void run()Description copied from class:Trait
Called every tick if overridden. -
setEnabled
public void setEnabled(boolean enabled) -
toggle
public boolean toggle()- Specified by:
toggle
in interfaceToggleable
-