Package org.bukkit
Interface ServerTickManager
public interface ServerTickManager
Manages ticking within a server.
 
To learn more about the features surrounding this interface.
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionintGets the amount of frozen ticks left to run.floatGets the current tick rate of the server.booleanisFrozen()Checks if the server is currently frozen.booleanChecks if a given entity is frozen.booleanChecks if the server is running normally.booleanChecks if the server is currently sprinting.booleanChecks if the server is currently stepping.booleanrequestGameToSprint(int ticks) Attempts to initiate a sprint, which executes all server ticks at a faster rate then normal.voidsetFrozen(boolean frozen) Sets the server to a frozen state that does not tick most things.voidsetTickRate(float tick) Sets the tick rate of the server.booleanstepGameIfFrozen(int ticks) Steps the game a certain amount of ticks if the server is currently frozen.booleanStops the current sprint if one is currently happening.booleanStops the current stepping if stepping is occurring.
- 
Method Details- 
isRunningNormallyboolean isRunningNormally()Checks if the server is running normally.When the server is running normally it indicates that the server is not currently frozen. - Returns:
- true if the server is running normally, otherwise false
 
- 
isSteppingboolean isStepping()Checks if the server is currently stepping.- Returns:
- true if stepping, otherwise false
 
- 
isSprintingboolean isSprinting()Checks if the server is currently sprinting.- Returns:
- true if sprinting, otherwise false
 
- 
isFrozenboolean isFrozen()Checks if the server is currently frozen.- Returns:
- true if the server is frozen, otherwise false
 
- 
getTickRatefloat getTickRate()Gets the current tick rate of the server.- Returns:
- the current tick rate of the server
 
- 
setTickRatevoid setTickRate(float tick) Sets the tick rate of the server.The normal tick rate of the server is 20. No tick rate below 1.0F or above 10,000 can be applied to the server. - Parameters:
- tick- the tick rate to set the server to
- Throws:
- IllegalArgumentException- if tick rate is too low or too high for the server to handle
 
- 
setFrozenvoid setFrozen(boolean frozen) Sets the server to a frozen state that does not tick most things.- Parameters:
- frozen- true to freeze the server, otherwise false
 
- 
stepGameIfFrozenboolean stepGameIfFrozen(int ticks) Steps the game a certain amount of ticks if the server is currently frozen.Steps occur when the server is in a frozen state which can be started by either using the in game /tick freeze command or the setFrozen(boolean)method.- Parameters:
- ticks- the amount of ticks to step the game for
- Returns:
- true if the game is now stepping. False if the game is not frozen so the request could not be fulfilled.
 
- 
stopSteppingboolean stopStepping()Stops the current stepping if stepping is occurring.- Returns:
- true if the game is no-longer stepping. False if the server was not stepping or was already done stepping.
 
- 
requestGameToSprintboolean requestGameToSprint(int ticks) Attempts to initiate a sprint, which executes all server ticks at a faster rate then normal.- Parameters:
- ticks- the amount of ticks to sprint for
- Returns:
- true if a sprint was already initiated and was stopped, otherwise false
 
- 
stopSprintingboolean stopSprinting()Stops the current sprint if one is currently happening.- Returns:
- true if the game is no-longer sprinting, false if the server was not sprinting or was already done sprinting
 
- 
isFrozenChecks if a given entity is frozen.- Parameters:
- entity- the entity to check if frozen.
- Returns:
- true if the entity is currently frozen otherwise false.
 
- 
getFrozenTicksToRunint getFrozenTicksToRun()Gets the amount of frozen ticks left to run.- Returns:
- the amount of frozen ticks left to run
 
 
-