Updated server configuration; add UPnP and JVM memory options, and enhance startup behaviour with dynamic memory allocation and ZUncommitDelay settings.
This commit is contained in:
1 parent
151e1d459f
commit
05eed7e205
4 files changed
+132
-62
No files matched your search
+10
-4
@@ -142,7 +142,9 @@ public final class ShopMod extends Mod
|
||||
@Override
|
||||
public void onLoad() // main thread, registration only
|
||||
{
|
||||
this.events().onMain(TickEvent.class, event -> { /* every frame, on the main thread */ });
|
||||
this.events().onMain(TickEvent.class, event -> {
|
||||
/* every frame, on the main thread */
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -150,8 +152,12 @@ public final class ShopMod extends Mod
|
||||
{
|
||||
this.modThread().scheduleAtFixedRate(() -> {
|
||||
// on zf-mod-shop: slow work, no game objects
|
||||
this.main().submit(GameServer::getPlayerCount) // game objects only on the main thread
|
||||
.thenAcceptAsync(players -> this.logger().log(INFO, players + " online"), this.modThread());
|
||||
this.main()
|
||||
.submit(GameServer::getPlayerCount) // game objects only on the main thread
|
||||
.thenAcceptAsync(
|
||||
players -> this.logger().log(INFO, players + " online"),
|
||||
this.modThread()
|
||||
);
|
||||
}, Duration.ZERO, Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@@ -162,7 +168,7 @@ public final class ShopMod extends Mod
|
||||
|
||||
## Services
|
||||
|
||||
Methods of `Mod`, usable from the constructor on (also in field initializers):
|
||||
Methods of `Mod`, usable from the constructor on, and in field initializers:
|
||||
|
||||
| Method | Returns | Use |
|
||||
|--------------------|------------------|---------------------------------------------------------------|
|
||||
|
||||
Reference in new issue
Block a user