Merge branch 'master' into pre/1.13

Dieser Commit ist enthalten in:
Shane Freeder 2018-07-19 20:23:18 +01:00
Commit 493df9ea5c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C
6 geänderte Dateien mit 144 neuen und 117 gelöschten Zeilen

Datei anzeigen

@ -33,4 +33,5 @@ MiniDigger <admin@minidigger.me>
Brokkonaut <hannos17@gmx.de> Brokkonaut <hannos17@gmx.de>
vemacs <d@nkmem.es> vemacs <d@nkmem.es>
stonar96 <minecraft.stonar96@gmail.com> stonar96 <minecraft.stonar96@gmail.com>
Hugo Manrique <hugmanrique@gmail.com>
``` ```

Datei anzeigen

@ -1,4 +1,4 @@
From 4cff56d987e64872e5e78fd37d175ec5332710ba Mon Sep 17 00:00:00 2001 From e14922a1b5fc34fea74ad29a57592ff8398fffd8 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net> From: Minecrell <minecrell@minecrell.net>
Date: Fri, 9 Jun 2017 19:03:43 +0200 Date: Fri, 9 Jun 2017 19:03:43 +0200
Subject: [PATCH] Use TerminalConsoleAppender for console improvements Subject: [PATCH] Use TerminalConsoleAppender for console improvements
@ -15,12 +15,11 @@ New features:
IntelliJ IDEA IntelliJ IDEA
Other changes: Other changes:
- Update JLine to 3.3.1 (from 2.12.1)
- Server starts 1-2 seconds faster thanks to optimizations in Log4j - Server starts 1-2 seconds faster thanks to optimizations in Log4j
configuration configuration
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 17bc80776..f9e225b73 100644 index 17bc807763..f2c7d2ba8b 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -40,12 +40,6 @@ @@ -40,12 +40,6 @@
@ -44,12 +43,12 @@ index 17bc80776..f9e225b73 100644
+ <dependency> + <dependency>
+ <groupId>net.minecrell</groupId> + <groupId>net.minecrell</groupId>
+ <artifactId>terminalconsoleappender</artifactId> + <artifactId>terminalconsoleappender</artifactId>
+ <version>1.0.0</version> + <version>1.1.0</version>
+ </dependency> + </dependency>
+ <dependency> + <dependency>
+ <groupId>net.java.dev.jna</groupId> + <groupId>net.java.dev.jna</groupId>
+ <artifactId>jna</artifactId> + <artifactId>jna</artifactId>
+ <version>4.4.0</version> + <version>4.5.2</version>
+ <scope>runtime</scope> + <scope>runtime</scope>
+ </dependency> + </dependency>
+ +
@ -88,9 +87,55 @@ index 17bc80776..f9e225b73 100644
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
new file mode 100644
index 0000000000..688b4715eb
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
@@ -0,0 +1,40 @@
+package com.destroystokyo.paper.console;
+
+import net.minecraft.server.DedicatedServer;
+import net.minecrell.terminalconsole.SimpleTerminalConsole;
+import org.bukkit.craftbukkit.command.ConsoleCommandCompleter;
+import org.jline.reader.LineReader;
+import org.jline.reader.LineReaderBuilder;
+
+public final class PaperConsole extends SimpleTerminalConsole {
+
+ private final DedicatedServer server;
+
+ public PaperConsole(DedicatedServer server) {
+ this.server = server;
+ }
+
+ @Override
+ protected LineReader buildReader(LineReaderBuilder builder) {
+ return super.buildReader(builder
+ .appName("Paper")
+ .completer(new ConsoleCommandCompleter(this.server))
+ );
+ }
+
+ @Override
+ protected boolean isRunning() {
+ return !this.server.isStopped() && this.server.isRunning();
+ }
+
+ @Override
+ protected void runCommand(String command) {
+ this.server.issueCommand(command, this.server.getServerCommandListener());
+ }
+
+ @Override
+ protected void shutdown() {
+ this.server.safeShutdown();
+ }
+
+}
diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java
new file mode 100644 new file mode 100644
index 000000000..685deaa0e index 0000000000..685deaa0e5
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java +++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java
@@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
@ -111,108 +156,30 @@ index 000000000..685deaa0e
+ } + }
+ +
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java b/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java
new file mode 100644
index 000000000..d013bc047
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java
@@ -0,0 +1,61 @@
+package com.destroystokyo.paper.console;
+
+import net.minecraft.server.DedicatedServer;
+import net.minecrell.terminalconsole.TerminalConsoleAppender;
+import org.bukkit.craftbukkit.command.ConsoleCommandCompleter;
+import org.jline.reader.EndOfFileException;
+import org.jline.reader.LineReader;
+import org.jline.reader.LineReaderBuilder;
+import org.jline.reader.UserInterruptException;
+import org.jline.terminal.Terminal;
+
+public class TerminalHandler {
+
+ private TerminalHandler() {
+ }
+
+ public static boolean handleCommands(DedicatedServer server) {
+ final Terminal terminal = TerminalConsoleAppender.getTerminal();
+ if (terminal == null) {
+ return false;
+ }
+
+ LineReader reader = LineReaderBuilder.builder()
+ .appName("Paper")
+ .terminal(terminal)
+ .completer(new ConsoleCommandCompleter(server))
+ .build();
+ reader.setOpt(LineReader.Option.DISABLE_EVENT_EXPANSION);
+ reader.unsetOpt(LineReader.Option.INSERT_TAB);
+
+ TerminalConsoleAppender.setReader(reader);
+
+ try {
+ String line;
+ while (!server.isStopped() && server.isRunning()) {
+ try {
+ line = reader.readLine("> ");
+ } catch (EndOfFileException ignored) {
+ // Continue reading after EOT
+ continue;
+ }
+
+ if (line == null) {
+ break;
+ }
+
+ line = line.trim();
+ if (!line.isEmpty()) {
+ server.issueCommand(line, server.getServerCommandListener());
+ }
+ }
+ } catch (UserInterruptException e) {
+ server.safeShutdown();
+ } finally {
+ TerminalConsoleAppender.setReader(null);
+ }
+
+ return true;
+ }
+
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index a3d58b5ce..069eb7d68 100644 index a3d58b5ce5..681194e94f 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java --- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -79,7 +79,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -79,6 +79,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
if (!org.bukkit.craftbukkit.Main.useConsole) { if (!org.bukkit.craftbukkit.Main.useConsole) {
return; return;
} }
- jline.console.ConsoleReader bufferedreader = reader; + // Paper start - Use TerminalConsoleAppender
+ // Paper start - Use TerminalConsoleAppender implementation + new com.destroystokyo.paper.console.PaperConsole(DedicatedServer.this).start();
+ if (com.destroystokyo.paper.console.TerminalHandler.handleCommands(DedicatedServer.this)) return; + /*
+ BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8)); jline.console.ConsoleReader bufferedreader = reader;
+ // Paper end
// CraftBukkit end // CraftBukkit end
String s; @@ -101,6 +104,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -87,11 +90,17 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
try { }
// CraftBukkit start - JLine disabling compatibility
while (!DedicatedServer.this.isStopped() && DedicatedServer.this.isRunning()) { + */
+ // Paper start - code is not used for jline + // Paper end
+ /* }
if (org.bukkit.craftbukkit.Main.useJline) { };
s = bufferedreader.readLine(">", null);
} else { @@ -112,6 +117,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
s = bufferedreader.readLine();
}
+ */
+ s = bufferedreader.readLine();
+ // Paper end
+
if (s != null && s.trim().length() > 0) { // Trim to filter lines which are just spaces
DedicatedServer.this.issueCommand(s, DedicatedServer.this.getServerCommandListener());
}
@@ -112,6 +121,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
} }
global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler()); global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler());
@ -222,7 +189,7 @@ index a3d58b5ce..069eb7d68 100644
final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger()); final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger());
for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) { for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) {
if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) { if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) {
@@ -120,6 +132,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -120,6 +128,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
} }
new Thread(new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader)).start(); new Thread(new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader)).start();
@ -232,7 +199,7 @@ index a3d58b5ce..069eb7d68 100644
System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true));
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f679c6bc2..39a8b1d69 100644 index f679c6bc27..39a8b1d696 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -57,7 +57,6 @@ import org.apache.commons.lang3.Validate; @@ -57,7 +57,6 @@ import org.apache.commons.lang3.Validate;
@ -290,7 +257,7 @@ index f679c6bc2..39a8b1d69 100644
public KeyPair G() { public KeyPair G() {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 4c9ff8c29..9e403d625 100644 index 4c9ff8c297..9e403d6251 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -78,8 +78,7 @@ public abstract class PlayerList { @@ -78,8 +78,7 @@ public abstract class PlayerList {
@ -304,7 +271,7 @@ index 4c9ff8c29..9e403d625 100644
this.k = new GameProfileBanList(PlayerList.a); this.k = new GameProfileBanList(PlayerList.a);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 470e334f7..9fe7c6a0d 100644 index 470e334f79..9fe7c6a0db 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -137,8 +137,8 @@ import java.nio.ByteBuffer; @@ -137,8 +137,8 @@ import java.nio.ByteBuffer;
@ -332,7 +299,7 @@ index 470e334f7..9fe7c6a0d 100644
@Override @Override
public PluginCommand getPluginCommand(String name) { public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index aad208f47..ac38028d7 100644 index aad208f477..ac38028d7c 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -14,7 +14,7 @@ import java.util.logging.Logger; @@ -14,7 +14,7 @@ import java.util.logging.Logger;
@ -374,7 +341,7 @@ index aad208f47..ac38028d7 100644
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
deleted file mode 100644 deleted file mode 100644
index 26a2fb894..000000000 index 26a2fb8942..0000000000
--- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java --- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
+++ /dev/null +++ /dev/null
@@ -1,74 +0,0 @@ @@ -1,74 +0,0 @@
@ -453,7 +420,7 @@ index 26a2fb894..000000000
- } - }
-} -}
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
index 33e8ea02c..1e3aae3b8 100644 index 33e8ea02c4..1e3aae3b8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java --- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
@@ -8,17 +8,27 @@ import java.util.logging.Level; @@ -8,17 +8,27 @@ import java.util.logging.Level;
@ -532,7 +499,7 @@ index 33e8ea02c..1e3aae3b8 100644
} }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index 984df4083..bbb5a84f3 100644 index 984df4083d..bbb5a84f36 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -20,7 +20,7 @@ public class ServerShutdownThread extends Thread { @@ -20,7 +20,7 @@ public class ServerShutdownThread extends Thread {
@ -546,7 +513,7 @@ index 984df4083..bbb5a84f3 100644
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
deleted file mode 100644 deleted file mode 100644
index b64097113..000000000 index b640971130..0000000000
--- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java --- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
+++ /dev/null +++ /dev/null
@@ -1,54 +0,0 @@ @@ -1,54 +0,0 @@
@ -605,7 +572,7 @@ index b64097113..000000000
- } - }
-} -}
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 5cee8f00e..08b6bb7f9 100644 index 5cee8f00ef..08b6bb7f97 100644
--- a/src/main/resources/log4j2.xml --- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml
@@ -1,12 +1,11 @@ @@ -1,12 +1,11 @@

Datei anzeigen

@ -1,4 +1,4 @@
From 0e62d99829b081db8d0554601b468a3361d7ca30 Mon Sep 17 00:00:00 2001 From 85d40c5071b3c70477b3dfbb204207f97904c8d3 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net> From: Minecrell <minecrell@minecrell.net>
Date: Mon, 18 Sep 2017 12:00:03 +0200 Date: Mon, 18 Sep 2017 12:00:03 +0200
Subject: [PATCH] Use Log4j IOStreams to redirect System.out/err to logger Subject: [PATCH] Use Log4j IOStreams to redirect System.out/err to logger
@ -12,7 +12,7 @@ results in a separate line, even though it should not result in
a line break. Log4j's implementation handles it correctly. a line break. Log4j's implementation handles it correctly.
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index f9e225b73..9d2473317 100644 index f2c7d2ba8b..fa6c3702a7 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -90,6 +90,13 @@ @@ -90,6 +90,13 @@
@ -30,10 +30,10 @@ index f9e225b73..9d2473317 100644
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 069eb7d68..7ff2fa535 100644 index 681194e94f..927cbeedcd 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java --- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -135,8 +135,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -131,8 +131,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
*/ */
// Paper end // Paper end

Datei anzeigen

@ -1,14 +1,14 @@
From c258c11325b05c25e869b4f3f8cd073734829f69 Mon Sep 17 00:00:00 2001 From 1b5e237639a102046ad53bf1e8f0993344645ce7 Mon Sep 17 00:00:00 2001
From: Kyle Wood <demonwav@gmail.com> From: Kyle Wood <demonwav@gmail.com>
Date: Thu, 1 Mar 2018 19:38:14 -0600 Date: Thu, 1 Mar 2018 19:38:14 -0600
Subject: [PATCH] Load version history at server start Subject: [PATCH] Load version history at server start
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 7ff2fa535..a329887ce 100644 index 927cbeedcd..ae7a8c1046 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java --- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -211,6 +211,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -207,6 +207,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
// Paper start // Paper start
com.destroystokyo.paper.PaperConfig.init((File) options.valueOf("paper-settings")); com.destroystokyo.paper.PaperConfig.init((File) options.valueOf("paper-settings"));
com.destroystokyo.paper.PaperConfig.registerCommands(); com.destroystokyo.paper.PaperConfig.registerCommands();

Datei anzeigen

@ -0,0 +1,24 @@
From 6e4c3841196ccf68344d2220c4e48186d0028e6f Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com>
Date: Mon, 16 Jul 2018 12:42:20 +0200
Subject: [PATCH] Avoid item merge if stack size above max stack size
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index d232bab745..b0f22f8f09 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -173,6 +173,10 @@ public class EntityItem extends Entity {
}
private void v() {
+ // Paper start - avoid item merge if stack size above max stack size
+ ItemStack stack = getItemStack();
+ if (stack.getCount() >= stack.getMaxStackSize()) return;
+ // Paper end
// Spigot start
double radius = world.spigotConfig.itemMerge;
Iterator iterator = this.world.a(EntityItem.class, this.getBoundingBox().grow(radius, radius, radius)).iterator();
--
2.18.0

Datei anzeigen

@ -0,0 +1,35 @@
From 033fcb77bd332732f270f7a66f42cf2dfb3bc51e Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Tue, 17 Jul 2018 16:42:17 +0200
Subject: [PATCH] Use asynchronous Log4j 2 loggers
diff --git a/pom.xml b/pom.xml
index 8fd1e36283..0c4b0daf56 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,6 +103,14 @@
<version>2.8.1</version>
</dependency>
+ <!-- Paper - Async loggers -->
+ <dependency>
+ <groupId>com.lmax</groupId>
+ <artifactId>disruptor</artifactId>
+ <version>3.4.2</version>
+ <scope>runtime</scope>
+ </dependency>
+
<!-- testing -->
<dependency>
<groupId>junit</groupId>
diff --git a/src/main/resources/log4j2.component.properties b/src/main/resources/log4j2.component.properties
new file mode 100644
index 0000000000..ee7c90784c
--- /dev/null
+++ b/src/main/resources/log4j2.component.properties
@@ -0,0 +1 @@
+Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
--
2.18.0