Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
Fixed Console
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexeption committed Nov 23, 2019
1 parent c340d4e commit 50c3c21
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions patches/net/minecraft/server/dedicated/DedicatedServer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
Thread thread = new Thread("Server Infinisleeper")
{
{
@@ -96,15 +103,23 @@
@@ -96,15 +103,24 @@
{
public void run()
{
Expand All @@ -81,6 +81,7 @@
+ }
+ jline.console.ConsoleReader bufferedreader = reader;
String s4;
+ if (net.minecraftforge.server.console.TerminalHandler.handleCommands(DedicatedServer.this)) return;

- try
- {
Expand All @@ -101,7 +102,7 @@
}
}
catch (IOException ioexception1)
@@ -113,6 +128,27 @@
@@ -113,6 +129,27 @@
}
}
};
Expand Down Expand Up @@ -129,7 +130,7 @@
thread.setDaemon(true);
thread.start();
LOGGER.info("Starting minecraft server version 1.12.2");
@@ -125,7 +161,7 @@
@@ -125,7 +162,7 @@
net.minecraftforge.fml.common.FMLCommonHandler.instance().onServerStart(this);

LOGGER.info("Loading properties");
Expand All @@ -138,7 +139,7 @@
this.eula = new ServerEula(new File("eula.txt"));

if (!this.eula.hasAcceptedEULA())
@@ -144,7 +180,7 @@
@@ -144,7 +181,7 @@
{
this.setOnlineMode(this.settings.getBooleanProperty("online-mode", true));
this.setPreventProxyConnections(this.settings.getBooleanProperty("prevent-proxy-connections", false));
Expand All @@ -147,7 +148,7 @@
}

this.setCanSpawnAnimals(this.settings.getBooleanProperty("spawn-animals", true));
@@ -180,11 +216,19 @@
@@ -180,11 +217,19 @@
{
this.setServerPort(this.settings.getIntProperty("server-port", 25565));
}
Expand All @@ -167,7 +168,7 @@
try
{
this.getNetworkSystem().addLanEndpoint(inetaddress, this.getServerPort());
@@ -196,13 +240,6 @@
@@ -196,13 +241,6 @@
LOGGER.warn("Perhaps a server is already running on that port?");
return false;
}
Expand All @@ -181,7 +182,7 @@
}

if (this.convertFiles())
@@ -217,7 +254,7 @@
@@ -217,7 +255,7 @@
else
{
net.minecraftforge.fml.common.FMLCommonHandler.instance().onServerStarted();
Expand All @@ -190,7 +191,7 @@
long j = System.nanoTime();

if (this.getFolderName() == null)
@@ -271,8 +308,8 @@
@@ -271,8 +309,8 @@
long i1 = System.nanoTime() - j;
String s3 = String.format("%.3fs", (double)i1 / 1.0E9D);
LOGGER.info("Done ({})! For help, type \"help\" or \"?\"", (Object)s3);
Expand All @@ -200,7 +201,7 @@
if (this.settings.hasProperty("announce-player-achievements"))
{
this.worlds[0].getGameRules().setOrCreateGameRule("announceAdvancements", this.settings.getBooleanProperty("announce-player-achievements", true) ? "true" : "false");
@@ -287,21 +324,32 @@
@@ -287,21 +325,32 @@
this.rconQueryThread.startThread();
}

Expand Down Expand Up @@ -241,7 +242,7 @@
Items.AIR.getSubItems(CreativeTabs.SEARCH, NonNullList.create());
// <3 you Grum for this, saves us ~30 patch files! --^
return net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerStarting(this);
@@ -427,11 +475,19 @@
@@ -427,11 +476,19 @@

public void executePendingCommands()
{
Expand All @@ -265,7 +266,7 @@
}

public boolean isDedicatedServer()
@@ -684,13 +740,65 @@
@@ -684,13 +741,65 @@

public String getPlugins()
{
Expand Down

0 comments on commit 50c3c21

Please sign in to comment.