Remove null values in TileEntity tick list

Because who wouldn't want to tick a null tile entity right?
Fixes GH-851
This commit is contained in:
Zach Brown 2017-08-11 17:59:44 -05:00
parent 912ee23e25
commit a8508dc5df
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
9 changed files with 102 additions and 100 deletions

View File

@ -1,4 +1,4 @@
From c61566569311803c43acb48153d515d4d9871c53 Mon Sep 17 00:00:00 2001
From 62d1a2a49930c3e5caf983081fbfa8262d5eb6dd Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 00:16:08 +0100
Subject: [PATCH] POM changes
@ -105,10 +105,11 @@ index 31b8f93e..360d2f08 100644
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -119,26 +138,6 @@
@@ -118,26 +137,6 @@
</dependency>
</dependencies>
</plugin>
<plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.15</version>
@ -128,10 +129,9 @@ index 31b8f93e..360d2f08 100644
- </signature>
- </configuration>
- </plugin>
- <plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
@@ -151,6 +150,7 @@
</execution>
</executions>
@ -141,5 +141,5 @@ index 31b8f93e..360d2f08 100644
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
--
2.13.0
2.14.1

View File

@ -1,17 +1,18 @@
From 5043bec2a991e4d8c55b934538518a5c112772f1 Mon Sep 17 00:00:00 2001
From 60ec55b1acbc4d95723b25e6c6209e541f1c8c0f 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 07143b46..1e57d386 100644
index 360d2f08..c6bdf44e 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 07143b46..1e57d386 100644
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
--
2.13.3.windows.1
2.14.1

View File

@ -1,17 +1,18 @@
From 8793e6a8cbd642c7d5c8e0572888eea9df36e247 Mon Sep 17 00:00:00 2001
From 0cbfecff228b4248ddff45b9774891905cf2bf4a 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 67b0d516..21b2733f 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.14.1

View File

@ -1,4 +1,4 @@
From 1a59075c01dbe0d53bd6fbfd94ccb1ef6a047a6a Mon Sep 17 00:00:00 2001
From deead5d94a52ef9bf9f10ca6bb8771cdcabb587f 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.14.1

View File

@ -1,4 +1,4 @@
From 6b4ec223ad07f5f8c5392bf724acfa4b6765c1de Mon Sep 17 00:00:00 2001
From 3447c9fafd0cc6672197a3fc7c9d16de45269ef7 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.14.1

View File

@ -1,4 +1,4 @@
From 080cc0be500cf818045396a0a8f36994d387f032 Mon Sep 17 00:00:00 2001
From 8bbceedf9186c29258b12c1ab8c8d628edd46203 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 000000000..1b33390de
index 00000000..1b33390d
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,125 @@
@ -137,7 +137,7 @@ index 000000000..1b33390de
+}
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..089154f62
index 00000000..089154f6
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
@@ -0,0 +1,131 @@
@ -274,7 +274,7 @@ index 000000000..089154f62
+}
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 @@
@ -380,7 +380,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 5ab2cf6ee..b5795b6d3 100644
index 5ab2cf6e..b5795b6d 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;
@ -424,7 +424,7 @@ index 5ab2cf6ee..b5795b6d3 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 2dca6dbcb..352310960 100644
index 2dca6dbc..35231096 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 {
@ -444,7 +444,7 @@ index 2dca6dbcb..352310960 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 d268fec39..52f6242d7 100644
index d268fec3..52f6242d 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 {
@ -492,7 +492,7 @@ index d268fec39..52f6242d7 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 9dcab42de..c1b0d6cea 100644
index 9dcab42d..c1b0d6ce 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 {
@ -514,7 +514,7 @@ index 9dcab42de..c1b0d6cea 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 9655a3ceb..cdb0b1342 100644
index 9655a3ce..cdb0b134 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -397,7 +397,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -554,7 +554,7 @@ index 9655a3ceb..cdb0b1342 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 6f63a5a1d..3b8425915 100644
index 6f63a5a1..3b842591 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;
@ -607,7 +607,7 @@ index 6f63a5a1d..3b8425915 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 c2da96eaf..6d47f384a 100644
index c2da96ea..6d47f384 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;
@ -646,7 +646,7 @@ index c2da96eaf..6d47f384a 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 27580a938..35812d561 100644
index 27580a93..35812d56 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;
@ -717,7 +717,7 @@ index 27580a938..35812d561 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
index 284d1204d..3aab54206 100644
index 284d1204..3aab5420 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 {
@ -748,7 +748,7 @@ index 284d1204d..3aab54206 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index da9ad6037..5b5c143b0 100644
index da9ad603..5b5c143b 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;
@ -895,7 +895,7 @@ index da9ad6037..5b5c143b0 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 eeac34998..e4ed2e991 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 @@
@ -995,7 +995,7 @@ index eeac34998..e4ed2e991 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b679b1363..03bbac737 100644
index b679b136..03bbac73 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;
@ -1043,7 +1043,7 @@ index b679b1363..03bbac737 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 @@
@ -1073,7 +1073,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 c00aee885..b3356b40f 100644
index c00aee88..b3356b40 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -1097,7 +1097,7 @@ index c00aee885..b3356b40f 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 74e3f42cd..2580a4cf6 100644
index 74e3f42c..2580a4cf 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -1,5 +1,7 @@
@ -1139,7 +1139,7 @@ index 74e3f42cd..2580a4cf6 100644
return flag;
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 5a5a588e7..d2d4ff6fb 100644
index 5a5a588e..d2d4ff6f 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;
@ -1159,7 +1159,7 @@ index 5a5a588e7..d2d4ff6fb 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 1096c6c66..f06b82ec5 100644
index 1096c6c6..f06b82ec 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;
@ -1265,7 +1265,7 @@ index 1096c6c66..f06b82ec5 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 8afe1d3d3..00b093976 100644
index 8afe1d3d..00b09397 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -304,13 +304,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -1399,10 +1399,10 @@ index 8afe1d3d3..00b093976 100644
// CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ec98b3a02..63bbcf0b1 100644
index ec98b3a0..63bbcf0b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1755,6 +1755,7 @@ public final class CraftServer implements Server {
@@ -1755,12 +1755,31 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot()
{
@ -1410,10 +1410,10 @@ index ec98b3a02..63bbcf0b1 100644
@Override
public YamlConfiguration getConfig()
{
@@ -1762,6 +1763,24 @@ public final class CraftServer implements Server {
return org.spigotmc.SpigotConfig.config;
}
@Override
+ @Override
+ public YamlConfiguration getBukkitConfig()
+ {
+ return configuration;
@ -1431,13 +1431,12 @@ index ec98b3a02..63bbcf0b1 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 311a2c3f6..000000000
index 311a2c3f..00000000
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ /dev/null
@@ -1,174 +0,0 @@
@ -1616,7 +1615,7 @@ index 311a2c3f6..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 @@
@ -1660,7 +1659,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 ca138fa65..d38900887 100644
index ca138fa6..d3890088 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -38,7 +38,7 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
@ -1686,7 +1685,7 @@ index ca138fa65..d38900887 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 27725b20e..19adb77b5 100644
index 27725b20..19adb77b 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;
@ -1762,7 +1761,7 @@ index 27725b20e..19adb77b5 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 @@
@ -1844,7 +1843,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;
@ -1856,7 +1855,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 2bd690fdf..38be7ed71 100644
index 2bd690fd..38be7ed7 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;
@ -1918,5 +1917,5 @@ index 2bd690fdf..38be7ed71 100644
}
}
--
2.13.4
2.14.1

View File

@ -1,4 +1,4 @@
From a11dd5b2bf084b3497007431eb7359db479f5d0b Mon Sep 17 00:00:00 2001
From d5090572a893a013cb7485d6ca040cc46d66eff6 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
@ -62,13 +62,14 @@ index 1159eea1..38359517 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2569f0b7..28e00da3 100644
index b65ac0c7..005c8a00 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -172,6 +172,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -171,6 +171,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 2569f0b7..28e00da3 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.13.1.windows.2
2.14.1

View File

@ -1,4 +1,4 @@
From 017a4e3009fcef926398be53f8c39f4f2c11bf4e Mon Sep 17 00:00:00 2001
From 63fe9d56abcc775909d9bd3bc8d11039aafd825a Mon Sep 17 00:00:00 2001
From: Minecrell <dev@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 7f6f7fe84..d36611644 100644
index 7f6f7fe8..d3661164 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.19.3</version>
@@ -77,6 +71,38 @@
<version>3.0.3</version>
<scope>compile</scope>
@ -96,7 +96,7 @@ index 7f6f7fe84..d36611644 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 000000000..685deaa0e
index 00000000..685deaa0
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java
@@ -0,0 +1,17 @@
@ -119,7 +119,7 @@ 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..d5bc61490
index 00000000..d5bc6149
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java
@@ -0,0 +1,60 @@
@ -184,7 +184,7 @@ index 000000000..d5bc61490
+
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 3b8425915..059f6b6b5 100644
index 3b842591..059f6b6b 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
@ -237,7 +237,7 @@ index 3b8425915..059f6b6b5 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 a4f44b39b..ea2c57137 100644
index a4f44b39..ea2c5713 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;
@ -296,7 +296,7 @@ index a4f44b39b..ea2c57137 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 b8a0b67a9..ebca377e5 100644
index b8a0b67a..ebca377e 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 {
@ -310,7 +310,7 @@ index b8a0b67a9..ebca377e5 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 444f28019..9c0b3c60e 100644
index 444f2801..9c0b3c60 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;
@ -336,7 +336,7 @@ index 444f28019..9c0b3c60e 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 ec9508e90..d3d848f8c 100644
index ec9508e9..d3d848f8 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;
@ -378,7 +378,7 @@ index ec9508e90..d3d848f8c 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 26a2fb894..000000000
index 26a2fb89..00000000
--- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
+++ /dev/null
@@ -1,74 +0,0 @@
@ -457,7 +457,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
index 33e8ea02c..1e3aae3b8 100644
index 33e8ea02..1e3aae3b 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;
@ -536,7 +536,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
index a0cdd2317..0a1812883 100644
index a0cdd231..0a181288 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -19,7 +19,7 @@ public class ServerShutdownThread extends Thread {
@ -550,7 +550,7 @@ index a0cdd2317..0a1812883 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 b64097113..000000000
index b6409711..00000000
--- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
+++ /dev/null
@@ -1,54 +0,0 @@
@ -609,7 +609,7 @@ index b64097113..000000000
- }
-}
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 5cee8f00e..08b6bb7f9 100644
index 5cee8f00..08b6bb7f 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -1,12 +1,11 @@
@ -639,5 +639,5 @@ index 5cee8f00e..08b6bb7f9 100644
<AppenderRef ref="TerminalConsole" level="info"/>
</Root>
--
2.13.0
2.14.1

View File

@ -1,4 +1,4 @@
From 3ce3d501a6fc62dc396aaec8eaff30c4a469b405 Mon Sep 17 00:00:00 2001
From f2bcb786e5eed44c74b3ebc8573f5735e589cd6d Mon Sep 17 00:00:00 2001
From: mezz <tehgeek@gmail.com>
Date: Wed, 9 Aug 2017 17:51:22 -0500
Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike
@ -40,7 +40,7 @@ index 23944088..e8d1a1c6 100644
return (long) i & 4294967295L | ((long) j & 4294967295L) << 32;
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 12938b9f..7e0ba4b2 100644
index 12938b9f..e4fd7fa7 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -147,6 +147,7 @@ public abstract class World implements IBlockAccess {
@ -59,7 +59,7 @@ index 12938b9f..7e0ba4b2 100644
// Spigot start
// Iterator iterator = this.tileEntityListTick.iterator();
@@ -3261,4 +3263,36 @@ public abstract class World implements IBlockAccess {
@@ -3261,4 +3263,40 @@ public abstract class World implements IBlockAccess {
public BlockPosition a(String s, BlockPosition blockposition, boolean flag) {
return null;
}
@ -74,7 +74,11 @@ index 12938b9f..7e0ba4b2 100644
+
+ private void removeTileEntitiesForRemovedChunks() {
+ if (!this.tileEntitiesChunkToBeRemoved.isEmpty()) {
+ java.util.function.Predicate<TileEntity> isInChunk = (tileEntity) -> {
+ java.util.function.Predicate<TileEntity> isInChunkOrNull = (tileEntity) -> {
+ if (tileEntity == null) {
+ return true;
+ }
+
+ BlockPosition tilePos = tileEntity.getPosition();
+ long tileChunkPos = net.minecraft.server.ChunkCoordIntPair.asLong(tilePos.getX() >> 4, tilePos.getZ() >> 4);
+ final boolean willRemove = this.tileEntitiesChunkToBeRemoved.contains(tileChunkPos);
@ -90,12 +94,12 @@ index 12938b9f..7e0ba4b2 100644
+ return willRemove;
+ };
+
+ this.tileEntityListTick.removeIf(isInChunk);
+ this.tileEntityListTick.removeIf(isInChunkOrNull);
+ this.tileEntitiesChunkToBeRemoved.clear();
+ }
+ }
+ // Paper end
}
--
2.13.4
2.14.1