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 4bf6691021
commit e70452db81
9 changed files with 75 additions and 73 deletions

View File

@@ -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
@@ -0,0 +0,0 @@ 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,8 +81,7 @@ 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;
--