summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-08-05 09:15:52 +1000
committermd_5 <git@md-5.net>2017-08-05 09:15:52 +1000
commit63029f4ff3745380bedc1d6557b81c1a183d45ec (patch)
tree750c6548eadcaffa27ad95394e5098d712a66ff6
parent20ab5d3d10652636d2b7093618178084378db893 (diff)
downloadcraftbukkit-63029f4ff3745380bedc1d6557b81c1a183d45ec.tar
craftbukkit-63029f4ff3745380bedc1d6557b81c1a183d45ec.tar.gz
craftbukkit-63029f4ff3745380bedc1d6557b81c1a183d45ec.tar.lz
craftbukkit-63029f4ff3745380bedc1d6557b81c1a183d45ec.tar.xz
craftbukkit-63029f4ff3745380bedc1d6557b81c1a183d45ec.zip
SPIGOT-3492: Ensure player functionality uses their specific scoreboard
-rw-r--r--nms-patches/EntityPlayer.patch18
1 files changed, 12 insertions, 6 deletions
diff --git a/nms-patches/EntityPlayer.patch b/nms-patches/EntityPlayer.patch
index f68760f3..20d242d6 100644
--- a/nms-patches/EntityPlayer.patch
+++ b/nms-patches/EntityPlayer.patch
@@ -506,23 +506,24 @@
}
public void b(List<IRecipe> 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");