mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 20:46:59 +01:00
Fix NPE when getting location from players EnderChest (fixes #1041)
This commit is contained in:
parent
09692269ca
commit
9daa9cec93
@ -1,17 +1,18 @@
|
||||
From 0ed1405b722f13790683af1131a2f730973de468 Mon Sep 17 00:00:00 2001
|
||||
From f428f0343bf4b0aa2c42fa1755d9523eaec91d3b 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 4220760..623d9ea 100644
|
||||
index 4220760f..623d9eae 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -56,6 +56,19 @@
|
||||
@@ -55,6 +55,19 @@
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>net.sf.trove4j</groupId>
|
||||
+ <artifactId>trove4j</artifactId>
|
||||
+ <version>3.0.3</version>
|
||||
@ -24,10 +25,9 @@ index 4220760..623d9ea 100644
|
||||
+ <version>1.0</version>
|
||||
+ <scope>provided</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.6</version>
|
||||
--
|
||||
2.7.4
|
||||
2.16.2
|
||||
|
||||
|
@ -1,17 +1,18 @@
|
||||
From 09eb3c8e3b1d9927cba4ef385e4a0b331ccac59c Mon Sep 17 00:00:00 2001
|
||||
From 8707e3ae8555862ee88d25e9fc066c243ddfe919 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 9b6eb48..561ef0e 100644
|
||||
index 9b6eb48f..561ef0e1 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 9b6eb48..561ef0e 100644
|
||||
+ */
|
||||
+ public void getChunkAtAsync(Block block, ChunkLoadCallback cb);
|
||||
+
|
||||
+ /**
|
||||
/**
|
||||
* Checks if the specified {@link Chunk} is loaded
|
||||
*
|
||||
* @param chunk The chunk to check
|
||||
--
|
||||
2.7.4
|
||||
2.16.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From edd66133aa37abe0e3387c2dd2b0e22e7bfb4f00 Mon Sep 17 00:00:00 2001
|
||||
From 132974ff5e4f0932c730ed93725812e52c234bd7 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)
|
||||
@ -6,13 +6,14 @@ Subject: [PATCH] Add MetadataStoreBase.removeAll(Plugin)
|
||||
So that on reload, metadata will be cleared
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
|
||||
index 64c0f0a..6da6abd 100644
|
||||
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 64c0f0a..6da6abd 100644
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
/**
|
||||
* Creates a unique name for the object receiving metadata by combining
|
||||
* unique data from the subject with a metadataKey.
|
||||
* <p>
|
||||
--
|
||||
2.7.4
|
||||
2.16.2
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 902e1a01df0798407c4cae98a52b05e83bffd1a7 Mon Sep 17 00:00:00 2001
|
||||
From 94fda1a0b58189116a33dfb887a88e141fb5cad6 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
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java b/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
|
||||
index f37491d..3088255 100644
|
||||
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 f37491d..3088255 100644
|
||||
exp = expAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
+ /**
|
||||
+ * Get the source that provided the experience.
|
||||
+ *
|
||||
+ * @return The source of the experience
|
||||
@ -48,10 +48,9 @@ index f37491d..3088255 100644
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
+ /**
|
||||
/**
|
||||
* Get the amount of experience the player will receive
|
||||
*
|
||||
* @return The amount of experience
|
||||
--
|
||||
2.7.4
|
||||
2.16.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1bd0e17cc58aee667b5a133db0cac4576de6769d Mon Sep 17 00:00:00 2001
|
||||
From 4505cd99ae7f9f55a1129e1a4ef8924aa27713b1 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
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
|
||||
|
||||
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 0000000..1b33390
|
||||
index 000000000..1b33390de
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||
@@ -0,0 +1,125 @@
|
||||
@ -137,7 +137,7 @@ index 0000000..1b33390
|
||||
+}
|
||||
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 0000000..089154f
|
||||
index 000000000..089154f62
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
|
||||
@@ -0,0 +1,131 @@
|
||||
@ -274,7 +274,7 @@ index 0000000..089154f
|
||||
+}
|
||||
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 0000000..e0ad559
|
||||
index 000000000..e0ad559b7
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
@@ -0,0 +1,99 @@
|
||||
@ -378,7 +378,7 @@ index 0000000..e0ad559
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 5ab2cf6..b5795b6 100644
|
||||
index 5ab2cf6ee..b5795b6d3 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;
|
||||
@ -422,7 +422,7 @@ index 5ab2cf6..b5795b6 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index 2dca6db..3523109 100644
|
||||
index 2dca6dbcb..352310960 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 {
|
||||
@ -442,7 +442,7 @@ index 2dca6db..3523109 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 c4d9344..350e099 100644
|
||||
index c4d9344a7..350e0991d 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 {
|
||||
@ -490,7 +490,7 @@ index c4d9344..350e099 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 ac478fb..69ded6a 100644
|
||||
index ac478fb27..69ded6aa4 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -204,7 +204,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
@ -503,7 +503,7 @@ index ac478fb..69ded6a 100644
|
||||
this.chunkLoader.saveChunk(this.world, chunk, unloaded); // Spigot
|
||||
} catch (IOException ioexception) {
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 50ec3ad..a401dec 100644
|
||||
index 50ec3adb8..a401dec60 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -423,7 +423,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
@ -543,7 +543,7 @@ index 50ec3ad..a401dec 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 e1cb96a..8f2afcc 100644
|
||||
index e1cb96a88..8f2afcc32 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -24,7 +24,7 @@ import java.io.PrintStream;
|
||||
@ -596,7 +596,7 @@ index e1cb96a..8f2afcc 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 ed39b12..e09ced1 100644
|
||||
index ed39b122e..e09ced1a2 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;
|
||||
@ -635,7 +635,7 @@ index ed39b12..e09ced1 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 ecff5fc..756590a 100644
|
||||
index ecff5fce3..756590ac0 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;
|
||||
@ -706,7 +706,7 @@ index ecff5fc..756590a 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||
index ce01240..a60f946 100644
|
||||
index ce0124020..a60f94608 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 {
|
||||
@ -737,7 +737,7 @@ index ce01240..a60f946 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c1a8816..8d08b53 100644
|
||||
index c1a8816b4..8d08b536a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -48,8 +48,8 @@ import org.bukkit.Bukkit;
|
||||
@ -884,7 +884,7 @@ index c1a8816..8d08b53 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 eeac349..e4ed2e9 100644
|
||||
index eeac34998..e4ed2e991 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -984,7 +984,7 @@ index eeac349..e4ed2e9 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index cd2d58b..da25a8b 100644
|
||||
index cd2d58bfb..da25a8bea 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;
|
||||
@ -1032,7 +1032,7 @@ index cd2d58b..da25a8b 100644
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||
index f74b067..1fc632e 100644
|
||||
index f74b06794..1fc632e0c 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||
@@ -1,15 +1,21 @@
|
||||
@ -1062,7 +1062,7 @@ index f74b067..1fc632e 100644
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 0a0b8a4..e098a7a 100644
|
||||
index 0a0b8a426..e098a7a1f 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -1086,7 +1086,7 @@ index 0a0b8a4..e098a7a 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 74e3f42..66a80a7 100644
|
||||
index 74e3f42cd..66a80a776 100644
|
||||
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
@@ -1,5 +1,7 @@
|
||||
@ -1128,7 +1128,7 @@ index 74e3f42..66a80a7 100644
|
||||
return flag;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 5a5a588..d2d4ff6 100644
|
||||
index 5a5a588e7..d2d4ff6fb 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;
|
||||
@ -1148,7 +1148,7 @@ index 5a5a588..d2d4ff6 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 843320f..d902e26 100644
|
||||
index 843320ffb..d902e2630 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -19,11 +19,11 @@ import com.google.common.collect.Maps;
|
||||
@ -1254,7 +1254,7 @@ index 843320f..d902e26 100644
|
||||
|
||||
public boolean b(AxisAlignedBB axisalignedbb) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index d4f25cb..e492913 100644
|
||||
index d4f25cbf2..e492913a2 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -305,13 +305,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@ -1388,10 +1388,10 @@ index d4f25cb..e492913 100644
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 14851a3..9042dee 100644
|
||||
index 14851a3a5..9042deed6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1756,6 +1756,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1756,12 +1756,31 @@ public final class CraftServer implements Server {
|
||||
private final Spigot spigot = new Spigot()
|
||||
{
|
||||
|
||||
@ -1399,10 +1399,10 @@ index 14851a3..9042dee 100644
|
||||
@Override
|
||||
public YamlConfiguration getConfig()
|
||||
{
|
||||
@@ -1763,6 +1764,24 @@ public final class CraftServer implements Server {
|
||||
return org.spigotmc.SpigotConfig.config;
|
||||
}
|
||||
|
||||
@Override
|
||||
+ @Override
|
||||
+ public YamlConfiguration getBukkitConfig()
|
||||
+ {
|
||||
+ return configuration;
|
||||
@ -1420,13 +1420,12 @@ index 14851a3..9042dee 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 4c8ab2b..0000000
|
||||
index 4c8ab2bc9..000000000
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
||||
+++ /dev/null
|
||||
@@ -1,174 +0,0 @@
|
||||
@ -1605,7 +1604,7 @@ index 4c8ab2b..0000000
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
||||
index 3a95b44..b5efb9c 100644
|
||||
index 3a95b4465..b5efb9c3f 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 @@
|
||||
@ -1649,7 +1648,7 @@ index 3a95b44..b5efb9c 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 2d5dc21..9167814 100644
|
||||
index 2d5dc2179..916781403 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -41,7 +41,7 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||
@ -1675,7 +1674,7 @@ index 2d5dc21..9167814 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 23d7ce2..d50bbd2 100644
|
||||
index 23d7ce26f..d50bbd2a6 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;
|
||||
@ -1751,7 +1750,7 @@ index 23d7ce2..d50bbd2 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 c37275f..a03f933 100644
|
||||
index c37275f2a..a03f933af 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 @@
|
||||
@ -1833,7 +1832,7 @@ index c37275f..a03f933 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 e52ef47..3d90b34 100644
|
||||
index e52ef47b7..3d90b3426 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;
|
||||
@ -1845,7 +1844,7 @@ index e52ef47..3d90b34 100644
|
||||
this.value = value;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 2bd690f..38be7ed 100644
|
||||
index 2bd690fdf..38be7ed71 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;
|
||||
@ -1907,5 +1906,5 @@ index 2bd690f..38be7ed 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
2.16.2
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 2d386d626a9e65f14718881154a9162ea224cea1 Mon Sep 17 00:00:00 2001
|
||||
From c508818bba262f715b0e95376b03d60b497939c2 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 a4b0901..02940d6 100644
|
||||
index a4b0901cf..02940d697 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 a4b0901..02940d6 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 98e9da5..a9186b7 100644
|
||||
index 98e9da59a..a9186b77a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -170,6 +170,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -169,6 +169,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), ChatMessageType.GAME_INFO));
|
||||
@ -80,10 +81,9 @@ index 98e9da5..a9186b7 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.7.4
|
||||
2.16.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d440f79c051cd725d7964f964782a22cc9426b28 Mon Sep 17 00:00:00 2001
|
||||
From 94cf8c9a8de4ab8d0762cdd45f647b38bac61000 Mon Sep 17 00:00:00 2001
|
||||
From: Minecrell <minecrell@minecrell.net>
|
||||
Date: Fri, 9 Jun 2017 19:03:43 +0200
|
||||
Subject: [PATCH] Use TerminalConsoleAppender for console improvements
|
||||
@ -20,22 +20,22 @@ Other changes:
|
||||
configuration
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 5d9f71b..da69bb9 100644
|
||||
index 5d9f71b1d..da69bb93f 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -54,12 +54,6 @@
|
||||
@@ -53,12 +53,6 @@
|
||||
<version>5.0.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
- <dependency>
|
||||
- <groupId>jline</groupId>
|
||||
- <artifactId>jline</artifactId>
|
||||
- <version>2.12.1</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
<dependency>
|
||||
<groupId>org.xerial</groupId>
|
||||
<artifactId>sqlite-jdbc</artifactId>
|
||||
<version>3.21.0.1</version>
|
||||
@@ -77,6 +71,32 @@
|
||||
<version>3.0.3</version>
|
||||
<scope>compile</scope>
|
||||
@ -90,7 +90,7 @@ index 5d9f71b..da69bb9 100644
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
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
|
||||
index 0000000..685deaa
|
||||
index 000000000..685deaa0e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java
|
||||
@@ -0,0 +1,17 @@
|
||||
@ -113,7 +113,7 @@ index 0000000..685deaa
|
||||
+}
|
||||
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 0000000..d5bc614
|
||||
index 000000000..d5bc61490
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java
|
||||
@@ -0,0 +1,60 @@
|
||||
@ -178,7 +178,7 @@ index 0000000..d5bc614
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index 8f2afcc..b3f1aa9 100644
|
||||
index 8f2afcc32..b3f1aa999 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -73,7 +73,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@ -231,7 +231,7 @@ index 8f2afcc..b3f1aa9 100644
|
||||
System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), 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
|
||||
index 908a5d2..e8bddc1 100644
|
||||
index 908a5d273..e8bddc171 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -42,7 +42,6 @@ import org.apache.commons.lang3.Validate;
|
||||
@ -290,7 +290,7 @@ index 908a5d2..e8bddc1 100644
|
||||
|
||||
public boolean a(int i, String s) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 6c34f85..563b0fb 100644
|
||||
index 6c34f858c..563b0fb12 100644
|
||||
--- a/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 {
|
||||
@ -304,7 +304,7 @@ index 6c34f85..563b0fb 100644
|
||||
|
||||
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
|
||||
index 27c6cad..539f492 100644
|
||||
index 27c6caddc..539f492e0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -128,7 +128,6 @@ import io.netty.buffer.ByteBuf;
|
||||
@ -330,7 +330,7 @@ index 27c6cad..539f492 100644
|
||||
@Override
|
||||
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
|
||||
index ec9508e..d3d848f 100644
|
||||
index ec9508e90..d3d848f8c 100644
|
||||
--- a/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;
|
||||
@ -372,7 +372,7 @@ index ec9508e..d3d848f 100644
|
||||
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
|
||||
deleted file mode 100644
|
||||
index 26a2fb8..0000000
|
||||
index 26a2fb894..000000000
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
|
||||
+++ /dev/null
|
||||
@@ -1,74 +0,0 @@
|
||||
@ -451,7 +451,7 @@ index 26a2fb8..0000000
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
|
||||
index 33e8ea0..1e3aae3 100644
|
||||
index 33e8ea02c..1e3aae3b8 100644
|
||||
--- a/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;
|
||||
@ -530,7 +530,7 @@ index 33e8ea0..1e3aae3 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
|
||||
index 984df40..bbb5a84 100644
|
||||
index 984df4083..bbb5a84f3 100644
|
||||
--- a/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 {
|
||||
@ -544,7 +544,7 @@ index 984df40..bbb5a84 100644
|
||||
}
|
||||
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
|
||||
index b640971..0000000
|
||||
index b64097113..000000000
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
|
||||
+++ /dev/null
|
||||
@@ -1,54 +0,0 @@
|
||||
@ -603,7 +603,7 @@ index b640971..0000000
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
|
||||
index 5cee8f0..08b6bb7 100644
|
||||
index 5cee8f00e..08b6bb7f9 100644
|
||||
--- a/src/main/resources/log4j2.xml
|
||||
+++ b/src/main/resources/log4j2.xml
|
||||
@@ -1,12 +1,11 @@
|
||||
@ -633,5 +633,5 @@ index 5cee8f0..08b6bb7 100644
|
||||
<AppenderRef ref="TerminalConsole" level="info"/>
|
||||
</Root>
|
||||
--
|
||||
2.7.4
|
||||
2.16.2
|
||||
|
||||
|
@ -1,26 +1,26 @@
|
||||
From 24feb5237d822d68fabe0bbf8ab1ceda0169eab0 Mon Sep 17 00:00:00 2001
|
||||
From 378ceeb7f03f20c26db6e8a6b0249ad0b6a7e713 Mon Sep 17 00:00:00 2001
|
||||
From: Minecrell <minecrell@minecrell.net>
|
||||
Date: Thu, 21 Sep 2017 16:33:35 +0200
|
||||
Subject: [PATCH] Include Log4J2 SLF4J implementation
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 28976da..ffa9f5a 100644
|
||||
index 28976dae8..ffa9f5a97 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -100,6 +100,12 @@
|
||||
@@ -98,6 +98,12 @@
|
||||
</dependency>
|
||||
|
||||
<!-- Paper - Add additional Log4J dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
+ <dependency>
|
||||
+ <groupId>org.apache.logging.log4j</groupId>
|
||||
+ <artifactId>log4j-slf4j-impl</artifactId>
|
||||
+ <version>2.8.1</version>
|
||||
+ <scope>runtime</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.apache.logging.log4j</groupId>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-iostreams</artifactId>
|
||||
<version>2.8.1</version>
|
||||
</dependency>
|
||||
--
|
||||
2.7.4
|
||||
2.16.2
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
From f8b50e2741cee621d2812279b607ae395fe93e75 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sat, 10 Mar 2018 13:03:49 +0000
|
||||
Subject: [PATCH] Fix NPE when getting location from players EnderChest
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
||||
index cd7de2b53..3bd69bf86 100644
|
||||
--- a/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
||||
+++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
||||
@@ -15,6 +15,7 @@ public class InventoryEnderChest extends InventorySubcontainer {
|
||||
|
||||
@Override
|
||||
public Location getLocation() {
|
||||
+ if (a == null) return owner.getBukkitEntity().getLocation(); // Paper - return Player location if there is no TE
|
||||
return new Location(this.a.getWorld().getWorld(), this.a.getPosition().getX(), this.a.getPosition().getY(), this.a.getPosition().getZ());
|
||||
}
|
||||
|
||||
--
|
||||
2.16.2
|
||||
|
Loading…
Reference in New Issue
Block a user