You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Endermux: configure via system properties and use static instance
- Add paper.endermux.* system properties in PaperEndermux: enabled, maxConnections, and socketPath.
- Rename earlyInstance to INSTANCE and align static config fields to uppercase.
- Start Endermux in bootstrap only when enabled.
- Remove per-server Endermux storage/use and call through PaperEndermux.INSTANCE.
- Clear PaperEndermux.INSTANCE on close.
- Set paper.endermux.enabled=true for run tasks in build.gradle.kts.
index c2227d57ea2e2da537a313d4bfd2f8c7f776be64..be81ec43794001f7908c27bdad239b1f760c0913 100644
8
+
index c2227d57ea2e2da537a313d4bfd2f8c7f776be64..4b677c2b0f2334e6c36ddd1891605e122f068e8a 100644
9
9
--- a/net/minecraft/server/MinecraftServer.java
10
10
+++ b/net/minecraft/server/MinecraftServer.java
11
-
@@ -306,6 +306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
12
-
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
13
-
private final Set<String> pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
14
-
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
15
-
+ public io.papermc.paper.console.endermux.PaperEndermux endermux;
16
-
// Paper start - improve tick loop
17
-
public final ca.spottedleaf.moonrise.common.time.TickData tickTimes1s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(1L));
18
-
public final ca.spottedleaf.moonrise.common.time.TickData tickTimes5s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(5L));
19
-
@@ -1086,11 +1087,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
11
+
@@ -1086,11 +1086,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
20
12
// Paper end - rewrite chunk system
21
13
// Paper start - Improved watchdog support - move final shutdown items here
22
14
Util.shutdownExecutors();
@@ -28,15 +20,15 @@ index c2227d57ea2e2da537a313d4bfd2f8c7f776be64..be81ec43794001f7908c27bdad239b1f
28
20
this.onServerExit();
29
21
// Paper end - Improved watchdog support - move final shutdown items here
30
22
}
31
-
@@ -1115,6 +1111,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23
+
@@ -1115,6 +1110,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
32
24
this.isRestarting = isRestarting;
33
25
this.hasLoggedStop = true; // Paper - Debugging
34
26
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
35
-
+ if (this.endermux != null) this.endermux.disableInteractivity();
27
+
+ if (io.papermc.paper.console.endermux.PaperEndermux.INSTANCE != null) io.papermc.paper.console.endermux.PaperEndermux.INSTANCE.disableInteractivity();
36
28
// Paper end
37
29
this.running = false;
38
30
if (waitForShutdown) {
39
-
@@ -1992,7 +1989,23 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
31
+
@@ -1992,7 +1988,23 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
40
32
41
33
@Override
42
34
public void sendSystemMessage(Component message) {
@@ -62,36 +54,22 @@ index c2227d57ea2e2da537a313d4bfd2f8c7f776be64..be81ec43794001f7908c27bdad239b1f
@@ -270,6 +277,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
60
+
@@ -270,6 +270,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
83
61
// Paper end - fix converting txt to json file
84
62
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
85
63
thread.start(); // Paper - Enhance console tab completions for brigadier commands; start console thread after MinecraftServer.console & PaperConfig are initialized
86
-
+ if (this.endermux != null) this.endermux.enableInteractivity(this);
64
+
+ if (io.papermc.paper.console.endermux.PaperEndermux.INSTANCE != null) io.papermc.paper.console.endermux.PaperEndermux.INSTANCE.enableInteractivity(this);
87
65
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
88
66
this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark
89
67
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
90
-
@@ -540,6 +548,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
68
+
@@ -540,6 +541,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
91
69
}
92
70
}
93
71
94
-
+ if (this.endermux != null) this.endermux.close();
72
+
+ if (io.papermc.paper.console.endermux.PaperEndermux.INSTANCE != null) io.papermc.paper.console.endermux.PaperEndermux.INSTANCE.close();
95
73
+
96
74
this.hasFullyShutdown = true; // Paper - Improved watchdog support
97
75
System.exit(this.abnormalExit ? 70 : 0); // CraftBukkit // Paper - Improved watchdog support
0 commit comments