@@ -1,10 +1,11 @@
|
||||
--- a/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/DedicatedServer.java
|
||||
@@ -22,6 +22,14 @@
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -60,6 +60,15 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.level.DataPackConfiguration;
|
||||
+import org.apache.logging.log4j.Level;
|
||||
+import org.apache.logging.log4j.io.IoBuilder;
|
||||
+import org.bukkit.command.CommandSender;
|
||||
@@ -15,7 +16,7 @@
|
||||
public class DedicatedServer extends MinecraftServer implements IMinecraftServer {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
@@ -36,8 +44,10 @@
|
||||
@@ -74,8 +83,10 @@
|
||||
@Nullable
|
||||
private final TextFilter r;
|
||||
|
||||
@@ -28,7 +29,7 @@
|
||||
this.propertyManager = dedicatedserversettings;
|
||||
this.remoteControlCommandListener = new RemoteControlCommandListener(this);
|
||||
this.r = null;
|
||||
@@ -47,13 +57,44 @@
|
||||
@@ -85,13 +96,44 @@
|
||||
public boolean init() throws IOException {
|
||||
Thread thread = new Thread("Server console handler") {
|
||||
public void run() {
|
||||
@@ -76,7 +77,7 @@
|
||||
}
|
||||
} catch (IOException ioexception) {
|
||||
DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
|
||||
@@ -62,6 +103,27 @@
|
||||
@@ -100,6 +142,27 @@
|
||||
}
|
||||
};
|
||||
|
||||
@@ -104,7 +105,7 @@
|
||||
thread.setDaemon(true);
|
||||
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
|
||||
thread.start();
|
||||
@@ -88,7 +150,7 @@
|
||||
@@ -126,7 +189,7 @@
|
||||
this.setForceGamemode(dedicatedserverproperties.forceGamemode);
|
||||
super.setIdleTimeout((Integer) dedicatedserverproperties.playerIdleTimeout.get());
|
||||
this.i(dedicatedserverproperties.enforceWhitelist);
|
||||
@@ -113,7 +114,7 @@
|
||||
DedicatedServer.LOGGER.info("Default game type: {}", dedicatedserverproperties.gamemode);
|
||||
InetAddress inetaddress = null;
|
||||
|
||||
@@ -112,6 +174,12 @@
|
||||
@@ -150,6 +213,12 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -126,7 +127,7 @@
|
||||
if (!this.getOnlineMode()) {
|
||||
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
||||
@@ -126,7 +194,7 @@
|
||||
@@ -164,7 +233,7 @@
|
||||
if (!NameReferencingFileConverter.e(this)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -135,7 +136,7 @@
|
||||
long i = SystemUtils.getMonotonicNanos();
|
||||
|
||||
this.c(dedicatedserverproperties.maxBuildHeight);
|
||||
@@ -134,7 +202,7 @@
|
||||
@@ -172,7 +241,7 @@
|
||||
TileEntitySkull.a(this.getMinecraftSessionService());
|
||||
UserCache.a(this.getOnlineMode());
|
||||
DedicatedServer.LOGGER.info("Preparing level \"{}\"", this.getWorld());
|
||||
@@ -144,7 +145,7 @@
|
||||
long j = SystemUtils.getMonotonicNanos() - i;
|
||||
String s = String.format(Locale.ROOT, "%.3fs", (double) j / 1.0E9D);
|
||||
|
||||
@@ -151,6 +219,7 @@
|
||||
@@ -189,6 +258,7 @@
|
||||
if (dedicatedserverproperties.enableRcon) {
|
||||
DedicatedServer.LOGGER.info("Starting remote control listener");
|
||||
this.remoteControlListener = RemoteControlListener.a((IMinecraftServer) this);
|
||||
@@ -152,7 +153,7 @@
|
||||
}
|
||||
|
||||
if (this.getMaxTickTime() > 0L) {
|
||||
@@ -265,6 +334,7 @@
|
||||
@@ -303,6 +373,7 @@
|
||||
this.remoteStatusListener.b();
|
||||
}
|
||||
|
||||
@@ -160,7 +161,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -293,7 +363,15 @@
|
||||
@@ -331,7 +402,15 @@
|
||||
while (!this.serverCommandQueue.isEmpty()) {
|
||||
ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0);
|
||||
|
||||
@@ -177,7 +178,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -503,14 +581,45 @@
|
||||
@@ -541,14 +620,45 @@
|
||||
|
||||
@Override
|
||||
public String getPlugins() {
|
||||
@@ -225,7 +226,7 @@
|
||||
});
|
||||
return this.remoteControlCommandListener.getMessages();
|
||||
}
|
||||
@@ -552,4 +661,15 @@
|
||||
@@ -590,4 +700,15 @@
|
||||
public ITextFilter a(EntityPlayer entityplayer) {
|
||||
return this.r != null ? this.r.a(entityplayer.getProfile()) : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user