From 63029f4ff3745380bedc1d6557b81c1a183d45ec Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 5 Aug 2017 09:15:52 +1000 Subject: [PATCH] SPIGOT-3492: Ensure player functionality uses their specific scoreboard --- nms-patches/EntityPlayer.patch | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/nms-patches/EntityPlayer.patch b/nms-patches/EntityPlayer.patch index f68760f361..20d242d6cc 100644 --- a/nms-patches/EntityPlayer.patch +++ b/nms-patches/EntityPlayer.patch @@ -506,23 +506,24 @@ } public void b(List list) { -@@ -839,7 +1028,16 @@ +@@ -839,8 +1028,17 @@ public void triggerHealthUpdate() { this.lastHealthSent = -1.0E8F; + this.lastSentExp = -1; // CraftBukkit - Added to reset -+ } -+ + } + + // CraftBukkit start - Support multi-line messages + public void sendMessage(IChatBaseComponent[] ichatbasecomponent) { + for (IChatBaseComponent component : ichatbasecomponent) { + this.sendMessage(component); + } - } ++ } + // CraftBukkit end - ++ public void a(IChatBaseComponent ichatbasecomponent, boolean flag) { this.playerConnection.sendPacket(new PacketPlayOutChat(ichatbasecomponent, flag ? ChatMessageType.GAME_INFO : ChatMessageType.CHAT)); + } @@ -879,7 +1077,7 @@ this.lastSentExp = -1; this.lastHealthSent = -1.0F; @@ -628,7 +629,7 @@ } public AdvancementDataPlayer getAdvancementData() { -@@ -1113,4 +1348,139 @@ +@@ -1113,4 +1348,144 @@ public Vec3D Q() { return this.cv; } @@ -728,6 +729,11 @@ + return super.isFrozen() || !getBukkitEntity().isOnline(); + } + ++ @Override ++ public Scoreboard getScoreboard() { ++ return getBukkitEntity().getScoreboard().getHandle(); ++ } ++ + public void reset() { + float exp = 0; + boolean keepInventory = this.world.getGameRules().getBoolean("keepInventory");