SPIGOT-7946: API for server pause when empty seconds
By: md_5 <git@md-5.net>
This commit is contained in:
@ -1845,6 +1845,30 @@ public final class Bukkit {
|
||||
return server.getIdleTimeout();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the pause when empty threshold seconds. To save resources, the
|
||||
* server will pause most functions after this time if there are no players
|
||||
* online.
|
||||
*
|
||||
* @return the pause threshold in seconds
|
||||
*/
|
||||
public static int getPauseWhenEmptyTime() {
|
||||
return server.getPauseWhenEmptyTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the pause when empty threshold seconds. To save resources, the
|
||||
* server will pause most functions after this time if there are no players
|
||||
* online.
|
||||
* <p>
|
||||
* A value of less than 0 will disable the setting
|
||||
*
|
||||
* @param seconds the pause threshold in seconds
|
||||
*/
|
||||
public static void setPauseWhenEmptyTime(int seconds) {
|
||||
server.setPauseWhenEmptyTime(seconds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a ChunkData for use in a generator.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user