3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 20:10:05 +01:00

Update Log4J (1.11.2) (#7153)

* Update Upstream (Craftbukkit)

* update log4j
Dieser Commit ist enthalten in:
sulu5890 2021-12-19 18:10:19 -06:00 committet von GitHub
Ursprung ee2ec9feac
Commit fddeb5759c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
14 geänderte Dateien mit 193 neuen und 117 gelöschten Zeilen

Datei anzeigen

@ -1,11 +1,11 @@
From e9476e0764a94d5000a6add8386864f4fe8d8b88 Mon Sep 17 00:00:00 2001
From e4ba53c1a87c140a4eff322eb67dac6fa27cb218 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 17:16:08 -0600
Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index 28d2a57..0b6fd28 100644
index 28d2a576..0b6fd28c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,35 +4,37 @@
@ -95,10 +95,11 @@ index 28d2a57..0b6fd28 100644
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -130,26 +147,6 @@
@@ -129,26 +146,6 @@
</dependency>
</dependencies>
</plugin>
<plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.15</version>
@ -118,10 +119,9 @@ index 28d2a57..0b6fd28 100644
- </signature>
- </configuration>
- </plugin>
- <plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
@@ -162,8 +159,7 @@
</execution>
</executions>
@ -133,5 +133,5 @@ index 28d2a57..0b6fd28 100644
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
--
2.9.3
2.34.0

Datei anzeigen

@ -1,17 +1,18 @@
From 68c630ca51baec9eb6c20b206e7119fd72c9c854 Mon Sep 17 00:00:00 2001
From d7d242b4076714d47f9c40bc749192767f794d1b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 1 Apr 2016 00:02:47 -0400
Subject: [PATCH] add Trove and FastUtil to Bukkit
diff --git a/pom.xml b/pom.xml
index 46df34d..5e5e5e4 100644
index 0b6fd28c..a40cfb44 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,6 +55,19 @@
@@ -54,6 +54,19 @@
</repositories>
<dependencies>
<dependency>
+ <dependency>
+ <groupId>net.sf.trove4j</groupId>
+ <artifactId>trove4j</artifactId>
+ <version>3.0.3</version>
@ -24,10 +25,9 @@ index 46df34d..5e5e5e4 100644
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
--
2.9.0
2.34.0

Datei anzeigen

@ -1,17 +1,18 @@
From 8793e6a8cbd642c7d5c8e0572888eea9df36e247 Mon Sep 17 00:00:00 2001
From 9441e2ae453aa948a8656a3a2b9fc46695106042 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 17:43:33 -0600
Subject: [PATCH] Add async chunk load API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index e9b1b0a..56f5029 100644
index e9b1b0a8..56f50296 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -137,6 +137,78 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -136,6 +136,78 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/
public Chunk getChunkAt(Block block);
/**
+ /**
+ * Used by {@link World#getChunkAtAsync(Location,ChunkLoadCallback)} methods
+ * to request a {@link Chunk} to be loaded, with this callback receiving
+ * the chunk when it is finished.
@ -83,10 +84,9 @@ index e9b1b0a..56f5029 100644
+ */
+ public void getChunkAtAsync(Block block, ChunkLoadCallback cb);
+
+ /**
/**
* Checks if the specified {@link Chunk} is loaded
*
* @param chunk The chunk to check
--
2.9.3
2.34.0

Datei anzeigen

@ -1,4 +1,4 @@
From 1a59075c01dbe0d53bd6fbfd94ccb1ef6a047a6a Mon Sep 17 00:00:00 2001
From 11fd8b957c4c15204a1ba83274893e7c5b95928f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 16 Jul 2013 21:26:50 -0400
Subject: [PATCH] Add MetadataStoreBase.removeAll(Plugin)
@ -9,10 +9,11 @@ diff --git a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java b/src/main
index 64c0f0a7..6da6abd8 100644
--- a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
+++ b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
@@ -125,6 +125,26 @@ public abstract class MetadataStoreBase<T> {
@@ -124,6 +124,26 @@ public abstract class MetadataStoreBase<T> {
}
}
/**
+ /**
+ * Removes all metadata in the metadata store that originates from the
+ * given plugin.
+ *
@ -32,10 +33,9 @@ index 64c0f0a7..6da6abd8 100644
+ }
+ }
+
+ /**
/**
* Creates a unique name for the object receiving metadata by combining
* unique data from the subject with a metadataKey.
* <p>
--
2.12.2
2.34.0

Datei anzeigen

@ -1,4 +1,4 @@
From 6b4ec223ad07f5f8c5392bf724acfa4b6765c1de Mon Sep 17 00:00:00 2001
From b4f3183a866a374c6a6188f59ab920b32c1e4543 Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Thu, 8 Sep 2016 08:47:08 -0700
Subject: [PATCH] Add source to PlayerExpChangeEvent
@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java b/s
index f37491d7..30882559 100644
--- a/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
@@ -1,21 +1,43 @@
@@ -1,20 +1,42 @@
package org.bukkit.event.player;
+import org.bukkit.entity.Entity; // Paper
@ -37,7 +37,7 @@ index f37491d7..30882559 100644
exp = expAmount;
}
/**
+ /**
+ * Get the source that provided the experience.
+ *
+ * @return The source of the experience
@ -48,10 +48,9 @@ index f37491d7..30882559 100644
+ }
+ // Paper end
+
+ /**
/**
* Get the amount of experience the player will receive
*
* @return The amount of experience
--
2.12.2
2.34.0

Datei anzeigen

@ -1,11 +1,11 @@
From 1f8f0180d8a5714931673fe8fabce687a0c24095 Mon Sep 17 00:00:00 2001
From 738ae947990c5e57c2623f02a0a4956a50e158bd Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 6d019d1..0e88ae2 100644
index 930cdb2f..d8705b50 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
@ -54,7 +54,7 @@ index 6d019d1..0e88ae2 100644
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
@@ -94,34 +95,22 @@
@@ -100,34 +101,22 @@
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
@ -100,7 +100,7 @@ index 6d019d1..0e88ae2 100644
</goals>
</execution>
</executions>
@@ -131,11 +120,12 @@
@@ -137,11 +126,12 @@
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
@ -114,10 +114,11 @@ index 6d019d1..0e88ae2 100644
<Implementation-Vendor>${maven.build.timestamp}</Implementation-Vendor>
<Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version>
@@ -165,26 +155,6 @@
@@ -170,26 +160,6 @@
</archive>
</configuration>
</plugin>
<plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.15</version>
@ -137,11 +138,10 @@ index 6d019d1..0e88ae2 100644
- </signature>
- </configuration>
- </plugin>
- <plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
@@ -195,11 +165,13 @@
@@ -201,11 +171,13 @@
<goal>shade</goal>
</goals>
<configuration>
@ -159,7 +159,7 @@ index 6d019d1..0e88ae2 100644
<relocation>
<pattern>jline</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.jline</shadedPattern>
@@ -238,20 +210,6 @@
@@ -244,20 +216,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<!-- versions after this appear to be broken -->
<version>3.1</version>
@ -181,7 +181,7 @@ index 6d019d1..0e88ae2 100644
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 9304637..674096c 100644
index 93046379..674096ca 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -11,7 +11,7 @@ public final class Versioning {
@ -194,5 +194,5 @@ index 9304637..674096c 100644
if (stream != null) {
--
2.9.3
2.34.0

Datei anzeigen

@ -1,29 +1,29 @@
From 1c2a256ac8dc0122b4a34665f614bb09ea329fe4 Mon Sep 17 00:00:00 2001
From 78c00d8e98da39e58f76f0e0d849b8422f51ff05 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
diff --git a/pom.xml b/pom.xml
index 8b96966d8..8d1e8680b 100644
index d8705b50..34b597ca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,6 +66,12 @@
@@ -71,6 +71,12 @@
<version>5.1.40</version>
<scope>compile</scope>
</dependency>
<dependency>
+ <dependency>
+ <groupId>co.aikar</groupId>
+ <artifactId>fastutil-lite</artifactId>
+ <version>1.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<dependency>
<groupId>net.sf.trove4j</groupId>
<artifactId>trove4j</artifactId>
<version>3.0.3</version>
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644
index 000000000..4b4b77a5c
index 00000000..4b4b77a5
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,124 @@
@ -153,7 +153,7 @@ index 000000000..4b4b77a5c
+}
diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
new file mode 100644
index 000000000..b79f1be7a
index 00000000..b79f1be7
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
@@ -0,0 +1,126 @@
@ -285,7 +285,7 @@ index 000000000..b79f1be7a
+}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644
index 000000000..e7789117b
index 00000000..e7789117
--- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,101 @@
@ -391,7 +391,7 @@ index 000000000..e7789117b
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 1594d7ca4..007589314 100644
index 1594d7ca..00758931 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@ -435,7 +435,7 @@ index 1594d7ca4..007589314 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index e8511ac9a..d3f1a4ac0 100644
index e8511ac9..d3f1a4ac 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -35,6 +35,15 @@ public class Block {
@ -455,7 +455,7 @@ index e8511ac9a..d3f1a4ac0 100644
public static int getId(Block block) {
return Block.REGISTRY.a(block); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 81fc04ed3..bd3b16025 100644
index 81fc04ed..bd3b1602 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -900,7 +900,7 @@ public class Chunk {
@ -503,7 +503,7 @@ index 81fc04ed3..bd3b16025 100644
private void z() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 2d267e44b..2762d1838 100644
index 2d267e44..2762d183 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -195,7 +195,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -525,7 +525,7 @@ index 2d267e44b..2762d1838 100644
this.chunkLoader.a(this.world, chunk);
} catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 65fe4e2ec..bee52d783 100644
index 65fe4e2e..bee52d78 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -388,7 +388,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -565,7 +565,7 @@ index 65fe4e2ec..bee52d783 100644
// return chunk; // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index cb83e4f56..e6819139f 100644
index cb83e4f5..e6819139 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -23,7 +23,7 @@ import java.io.PrintStream;
@ -618,7 +618,7 @@ index cb83e4f56..e6819139f 100644
return waitable.get();
} catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 9bd9dc28b..14d23556f 100644
index 9bd9dc28..14d23556 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -25,7 +25,8 @@ import org.bukkit.block.BlockFace;
@ -657,7 +657,7 @@ index 9bd9dc28b..14d23556f 100644
public void recalcPosition() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index e9002c953..b22f81b12 100644
index e9002c95..b22f81b1 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -31,7 +31,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -728,7 +728,7 @@ index e9002c953..b22f81b12 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
index 347a2b671..aceb08ce1 100644
index fdc1fe6d..75497e1a 100644
--- a/src/main/java/net/minecraft/server/EntityTracker.java
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
@@ -175,7 +175,7 @@ public class EntityTracker {
@ -759,7 +759,7 @@ index 347a2b671..aceb08ce1 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index cc0efa2e0..1b432f0d7 100644
index cc0efa2e..1b432f0d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -47,8 +47,8 @@ import org.bukkit.Bukkit;
@ -900,7 +900,7 @@ index cc0efa2e0..1b432f0d7 100644
this.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 703d5813d..021dfba14 100644
index eeac3499..e4ed2e99 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,5 +1,6 @@
@ -1000,7 +1000,7 @@ index 703d5813d..021dfba14 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9897bade8..27283efad 100644
index cbea9880..0fe8525d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory;
@ -1048,7 +1048,7 @@ index 9897bade8..27283efad 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index f74b06794..1fc632e0c 100644
index f74b0679..1fc632e0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -1,15 +1,21 @@
@ -1078,7 +1078,7 @@ index f74b06794..1fc632e0c 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 411720f2d..80bf61164 100644
index 411720f2..80bf6116 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -1102,7 +1102,7 @@ index 411720f2d..80bf61164 100644
public void addWhitelist(GameProfile gameprofile) {
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index f1f206501..fb350c408 100644
index f1f20650..fb350c40 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -1,5 +1,7 @@
@ -1144,7 +1144,7 @@ index f1f206501..fb350c408 100644
return flag;
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 6958a2e0f..b3d3df4cf 100644
index 6958a2e0..b3d3df4c 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -4,12 +4,13 @@ import javax.annotation.Nullable;
@ -1164,7 +1164,7 @@ index 6958a2e0f..b3d3df4cf 100644
private static final RegistryMaterials<MinecraftKey, Class<? extends TileEntity>> f = new RegistryMaterials();
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 758962e67..a87b37277 100644
index 758962e6..a87b3727 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -18,11 +18,11 @@ import com.google.common.collect.Maps;
@ -1270,7 +1270,7 @@ index 758962e67..a87b37277 100644
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 391a09c52..966938997 100644
index a49db179..5d97abdd 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -247,13 +247,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -1403,10 +1403,10 @@ index 391a09c52..966938997 100644
// CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 587d23dfd..d27e2ce98 100644
index 587d23df..d27e2ce9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1741,6 +1741,7 @@ public final class CraftServer implements Server {
@@ -1741,12 +1741,31 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot()
{
@ -1414,10 +1414,10 @@ index 587d23dfd..d27e2ce98 100644
@Override
public YamlConfiguration getConfig()
{
@@ -1748,6 +1749,24 @@ public final class CraftServer implements Server {
return org.spigotmc.SpigotConfig.config;
}
@Override
+ @Override
+ public YamlConfiguration getBukkitConfig()
+ {
+ return configuration;
@ -1435,13 +1435,12 @@ index 587d23dfd..d27e2ce98 100644
+ return com.destroystokyo.paper.PaperConfig.config;
+ }
+
+ @Override
@Override
public void restart() {
org.spigotmc.RestartCommand.restart();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
deleted file mode 100644
index 41d2d87ee..000000000
index 41d2d87e..00000000
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ /dev/null
@@ -1,173 +0,0 @@
@ -1619,7 +1618,7 @@ index 41d2d87ee..000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 3a95b4465..b5efb9c3f 100644
index 3a95b446..b5efb9c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -1,6 +1,8 @@
@ -1663,7 +1662,7 @@ index 3a95b4465..b5efb9c3f 100644
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0c8295435..f4d71683a 100644
index 0c829543..f4d71683 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -39,15 +39,9 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
@ -1697,7 +1696,7 @@ index 0c8295435..f4d71683a 100644
public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 92d217bce..9952b64be 100644
index 92d217bc..9952b64b 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -14,6 +14,7 @@ import java.util.concurrent.atomic.AtomicInteger;
@ -1773,7 +1772,7 @@ index 92d217bce..9952b64be 100644
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index 220e39abe..afc6c17e6 100644
index 220e39ab..afc6c17e 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -1,8 +1,8 @@
@ -1855,7 +1854,7 @@ index 220e39abe..afc6c17e6 100644
- // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
index e52ef47b7..3d90b3426 100644
index e52ef47b..3d90b342 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
@ -1867,7 +1866,7 @@ index e52ef47b7..3d90b3426 100644
this.value = value;
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index c32d44df0..5c2fb0058 100644
index c32d44df..5c2fb005 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither;
@ -1929,5 +1928,5 @@ index c32d44df0..5c2fb0058 100644
}
}
--
2.12.2.windows.2
2.34.0

Datei anzeigen

@ -1,11 +1,11 @@
From fae815991d4346aba2ebd7615b6038aa39048961 Mon Sep 17 00:00:00 2001
From 5a1131ad495b7b041e6438c4e8fd817e25b46be2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 27 Dec 2016 15:02:42 -0500
Subject: [PATCH] String based Action Bar API
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
index 1159eea1a..38359517c 100644
index 1159eea1..38359517 100644
--- a/src/main/java/net/minecraft/server/MCUtil.java
+++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -1,10 +1,13 @@
@ -62,13 +62,14 @@ index 1159eea1a..38359517c 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 61c32223d..072b59125 100644
index 61c32223..072b5912 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -165,6 +165,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -164,6 +164,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper start
@Override
+ @Override
+ public void sendActionBar(String message) {
+ if (getHandle().playerConnection == null || message == null || message.isEmpty()) return;
+ getHandle().playerConnection.sendPacket(new PacketPlayOutChat(new ChatComponentText(message), (byte) 2));
@ -80,10 +81,9 @@ index 61c32223d..072b59125 100644
+ sendActionBar(org.bukkit.ChatColor.translateAlternateColorCodes(alternateChar, message));
+ }
+
+ @Override
@Override
public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) {
PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter();
packet.header = header;
--
2.12.2
2.34.0

Datei anzeigen

@ -1,4 +1,4 @@
From 266c59f458cc4862a706054efa751b6f83c45ee5 Mon Sep 17 00:00:00 2001
From a5713fdf5ec9f69a1beb2de8aac7af4d3d1467fc Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 13 May 2017 20:11:21 -0500
Subject: [PATCH] Add system property to disable book size limits
@ -11,12 +11,12 @@ to make books with as much data as they want. Do not use this without
limiting incoming data from packets in some other way.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index 5d971f07b..6a7d10344 100644
index 78065e13..01456324 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -37,6 +37,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
static final int MAX_PAGES = 50;
static final int MAX_PAGE_LENGTH = 320; // 256 limit + 64 characters to allow for psuedo colour codes
static final int MAX_PAGE_LENGTH = 256;
static final int MAX_TITLE_LENGTH = 32;
+ private static final boolean OVERRIDE_CHECKS = Boolean.getBoolean("disable.book-limits"); // Paper - Add override
@ -31,21 +31,23 @@ index 5d971f07b..6a7d10344 100644
return false;
}
@@ -229,7 +230,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -229,8 +230,8 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
throw new IllegalArgumentException("Invalid page number " + page + "/" + pages.size());
}
- String newText = text == null ? "" : text.length() > MAX_PAGE_LENGTH ? text.substring(0, MAX_PAGE_LENGTH) : text;
- pages.set(page - 1, CraftChatMessage.fromString(newText, true)[0]);
+ String newText = text == null ? "" : text.length() > MAX_PAGE_LENGTH && !OVERRIDE_CHECKS ? text.substring(0, MAX_PAGE_LENGTH) : text;
pages.set(page - 1, CraftChatMessage.fromString(newText, true)[0]);
+ pages.set(page - 1, CraftChatMessage.fromString(newText, true)[0]);
}
public void setPages(final String... pages) {
@@ -241,13 +242,13 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
public void addPage(final String... pages) {
for (String page : pages) {
- if (this.pages.size() >= MAX_PAGES) {
+ if (this.pages.size() >= MAX_PAGES && !OVERRIDE_CHECKS) {
+ if (this.pages.size() >= MAX_PAGES && !OVERRIDE_CHECKS) { // Paper - Add override
return;
}
@ -57,5 +59,5 @@ index 5d971f07b..6a7d10344 100644
}
--
2.13.0.windows.1
2.34.0

Datei anzeigen

@ -0,0 +1,84 @@
From 2252af3646587d5f647d9cc831902c0b3bde385f Mon Sep 17 00:00:00 2001
From: sulu5890 <sulu@sulu.me>
Date: Fri, 17 Dec 2021 14:03:18 -0600
Subject: [PATCH] update log4j
diff --git a/pom.xml b/pom.xml
index 34b597caf..e30e7527b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,7 +38,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
- <version>2.8.1</version>
+ <version>2.17.0</version> <!-- paper - update log4j -->
<scope>compile</scope>
</dependency>
<dependency>
@@ -100,8 +100,8 @@
<!-- required until fixed plexus-compiler-eclipse is deployed -->
<pluginRepositories>
<pluginRepository>
- <id>spigotmc-public</id>
- <url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
+ <id>papermc</id> <!-- paper - update log4j -->
+ <url>https://papermc.io/repo/repository/maven-public/</url> <!-- paper - update log4j -->
</pluginRepository>
</pluginRepositories>
@@ -142,6 +142,7 @@
<Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version>
<Specification-Vendor>Bukkit Team</Specification-Vendor>
+ <Multi-Release>true</Multi-Release> <!-- paper - update log4j -->
</manifestEntries>
<manifestSections>
<manifestSection>
@@ -169,7 +170,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>2.4.3</version>
+ <version>3.2.4</version> <!-- paper - update log4j -->
<executions>
<execution>
<phase>package</phase>
@@ -177,6 +178,16 @@
<goal>shade</goal>
</goals>
<configuration>
+ <!-- paper start - update log4j -->
+ <filters>
+ <filter>
+ <artifact>org.spigotmc:minecraft-server:**</artifact>
+ <excludes>
+ <exclude>org/apache/logging/log4j/**</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ <!-- paper end - update log4j -->
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation> <!-- Paper -->
<relocations>
<!-- Paper - Workaround for hardcoded path lookup in dependency, easier than forking it - GH-189 -->
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index c99aedb40..20bb83ac0 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -3,10 +3,10 @@
<Appenders>
<Console name="WINDOWS_COMPAT" target="SYSTEM_OUT"></Console>
<Queue name="TerminalConsole">
- <PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg{nolookups}%n" />
+ <PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" /> <!-- paper - update log4j -->
</Queue>
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
- <PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg{nolookups}%n" />
+ <PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" /> <!-- paper - update log4j -->
<Policies>
<TimeBasedTriggeringPolicy />
<OnStartupTriggeringPolicy />
--
2.34.1

12
pom.xml
Datei anzeigen

@ -33,16 +33,8 @@
<repositories>
<repository>
<id>md_5-releases</id>
<url>http://repo.md-5.net/content/repositories/releases/</url>
</repository>
<repository>
<id>aikar</id>
<url>http://ci.emc.gs/nexus/content/groups/aikar/</url>
</repository>
<repository>
<id>destroystokyo-releases</id>
<url>https://repo.destroystokyo.com/repository/maven-releases/</url>
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
</repositories>

Datei anzeigen

@ -5,14 +5,14 @@ set -e
basedir="$(cd "$1" && pwd -P)"
workdir="$basedir/work"
mcver=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
paperjar="../../Paper-Server/target/paper-$mcver.jar"
vanillajar="../$mcver/$mcver.jar"
paperjar="$basedir/Paper-Server/target/paper-$mcver.jar"
vanillajar="$workdir/$mcver/$mcver.jar"
(
cd "$workdir/Paperclip"
mvn clean package "-Dmcver=$mcver" "-Dpaperjar=$paperjar" "-Dvanillajar=$vanillajar"
)
cp "$workdir/Paperclip/target/paperclip-${mcver}.jar" "$basedir/paperclip.jar"
cp "$workdir/Paperclip/assembly/target/paperclip-${mcver}.jar" "$basedir/paperclip.jar"
echo ""
echo ""

@ -1 +1 @@
Subproject commit 6e3cec8bc78269d72ef7ef49ce82a5eadfb9615a
Subproject commit 34612b072e8e77f144aabe013a080f32060eddfe

@ -1 +1 @@
Subproject commit 6dcb3241ca8e69fb8209e54fea507425c508915e
Subproject commit 2d4c7b3bbd322d8b7f3bbe2fe33ecf627251c828