Commits
md_5 authored 1e2e6a184a8
1838 1838 | |
1839 1839 | /** |
1840 1840 | * Gets the idle kick timeout. |
1841 1841 | * |
1842 1842 | * @return the idle timeout in minutes |
1843 1843 | */ |
1844 1844 | public static int getIdleTimeout() { |
1845 1845 | return server.getIdleTimeout(); |
1846 1846 | } |
1847 1847 | |
1848 + | /** |
1849 + | * Gets the pause when empty threshold seconds. To save resources, the |
1850 + | * server will pause most functions after this time if there are no players |
1851 + | * online. |
1852 + | * |
1853 + | * @return the pause threshold in seconds |
1854 + | */ |
1855 + | public static int getPauseWhenEmptyTime() { |
1856 + | return server.getPauseWhenEmptyTime(); |
1857 + | } |
1858 + | |
1859 + | /** |
1860 + | * Sets the pause when empty threshold seconds. To save resources, the |
1861 + | * server will pause most functions after this time if there are no players |
1862 + | * online. |
1863 + | * <p> |
1864 + | * A value of less than 0 will disable the setting |
1865 + | * |
1866 + | * @param seconds the pause threshold in seconds |
1867 + | */ |
1868 + | public static void setPauseWhenEmptyTime(int seconds) { |
1869 + | server.setPauseWhenEmptyTime(seconds); |
1870 + | } |
1871 + | |
1848 1872 | /** |
1849 1873 | * Create a ChunkData for use in a generator. |
1850 1874 | * |
1851 1875 | * See {@link ChunkGenerator#generateChunkData(org.bukkit.World, java.util.Random, int, int, org.bukkit.generator.ChunkGenerator.BiomeGrid)} |
1852 1876 | * |
1853 1877 | * @param world the world to create the ChunkData for |
1854 1878 | * @return a new ChunkData for the world |
1855 1879 | * |
1856 1880 | */ |
1857 1881 | |