mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
SPIGOT-7946: API for server pause when empty seconds
By: md_5 <git@md-5.net>
This commit is contained in:
parent
0df40ed8d9
commit
bbe0572877
2 changed files with 17 additions and 1 deletions
|
@ -17,7 +17,13 @@
|
|||
public final boolean onlineMode = this.get("online-mode", true);
|
||||
public final boolean preventProxyConnections = this.get("prevent-proxy-connections", false);
|
||||
public final String serverIp = this.get("server-ip", "");
|
||||
@@ -105,8 +110,10 @@
|
||||
@@ -100,13 +105,15 @@
|
||||
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Boolean> whiteList;
|
||||
public final boolean enforceSecureProfile;
|
||||
public final boolean logIPs;
|
||||
- public final int pauseWhenEmptySeconds;
|
||||
+ public int pauseWhenEmptySeconds;
|
||||
private final DedicatedServerProperties.WorldDimensionData worldDimensionData;
|
||||
public final WorldOptions worldOptions;
|
||||
public boolean acceptsTransfers;
|
||||
|
||||
|
|
|
@ -2292,6 +2292,16 @@ public final class CraftServer implements Server {
|
|||
return console.getPlayerIdleTimeout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPauseWhenEmptyTime() {
|
||||
return this.getProperties().pauseWhenEmptySeconds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPauseWhenEmptyTime(int seconds) {
|
||||
this.getProperties().pauseWhenEmptySeconds = seconds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChunkGenerator.ChunkData createChunkData(World world) {
|
||||
Preconditions.checkArgument(world != null, "World cannot be null");
|
||||
|
|
Loading…
Reference in a new issue