API to allow/disallow tick sleeping

This commit is contained in:
Abel
2024-11-12 22:25:20 +01:00
parent b4c394a1c6
commit 7294ae3022
2 changed files with 104 additions and 72 deletions

View File

@ -3264,5 +3264,10 @@ public final class CraftServer implements Server {
public boolean isPaused() {
return this.console.isTickPaused();
}
@Override
public void allowPausing(final Plugin plugin, final boolean value) {
this.console.addPluginAllowingSleep(plugin.getName(), value);
}
// Paper end - API to check if the server is sleeping
}