SPIGOT-7946: API for server pause when empty seconds

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2024-11-06 20:38:04 +11:00
parent efc7364e5b
commit eca2ac0d7e
2 changed files with 42 additions and 0 deletions

View File

@@ -1565,6 +1565,24 @@ public interface Server extends PluginMessageRecipient {
*/
public int getIdleTimeout();
/**
* Gets the pause when empty threshold seconds. To save resources, the
* pause most functions after this time if there are no players online.
*
* @return the pause threshold in seconds
*/
public int getPauseWhenEmptyTime();
/**
* Sets the pause when empty threshold seconds. To save resources, the
* 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 void setPauseWhenEmptyTime(int seconds);
/**
* Create a ChunkData for use in a generator.
*