13
0
geforkt von Mirrors/Paper

SPIGOT-3492: Ensure player functionality uses their specific scoreboard

Dieser Commit ist enthalten in:
md_5 2017-08-05 09:15:52 +10:00
Ursprung 20ab5d3d10
Commit 63029f4ff3

Datei anzeigen

@ -506,23 +506,24 @@
} }
public void b(List<IRecipe> list) { public void b(List<IRecipe> list) {
@@ -839,7 +1028,16 @@ @@ -839,8 +1028,17 @@
public void triggerHealthUpdate() { public void triggerHealthUpdate() {
this.lastHealthSent = -1.0E8F; this.lastHealthSent = -1.0E8F;
+ this.lastSentExp = -1; // CraftBukkit - Added to reset + this.lastSentExp = -1; // CraftBukkit - Added to reset
+ } }
+
+ // CraftBukkit start - Support multi-line messages + // CraftBukkit start - Support multi-line messages
+ public void sendMessage(IChatBaseComponent[] ichatbasecomponent) { + public void sendMessage(IChatBaseComponent[] ichatbasecomponent) {
+ for (IChatBaseComponent component : ichatbasecomponent) { + for (IChatBaseComponent component : ichatbasecomponent) {
+ this.sendMessage(component); + this.sendMessage(component);
+ } + }
} + }
+ // CraftBukkit end + // CraftBukkit end
+
public void a(IChatBaseComponent ichatbasecomponent, boolean flag) { public void a(IChatBaseComponent ichatbasecomponent, boolean flag) {
this.playerConnection.sendPacket(new PacketPlayOutChat(ichatbasecomponent, flag ? ChatMessageType.GAME_INFO : ChatMessageType.CHAT)); this.playerConnection.sendPacket(new PacketPlayOutChat(ichatbasecomponent, flag ? ChatMessageType.GAME_INFO : ChatMessageType.CHAT));
}
@@ -879,7 +1077,7 @@ @@ -879,7 +1077,7 @@
this.lastSentExp = -1; this.lastSentExp = -1;
this.lastHealthSent = -1.0F; this.lastHealthSent = -1.0F;
@ -628,7 +629,7 @@
} }
public AdvancementDataPlayer getAdvancementData() { public AdvancementDataPlayer getAdvancementData() {
@@ -1113,4 +1348,139 @@ @@ -1113,4 +1348,144 @@
public Vec3D Q() { public Vec3D Q() {
return this.cv; return this.cv;
} }
@ -728,6 +729,11 @@
+ return super.isFrozen() || !getBukkitEntity().isOnline(); + return super.isFrozen() || !getBukkitEntity().isOnline();
+ } + }
+ +
+ @Override
+ public Scoreboard getScoreboard() {
+ return getBukkitEntity().getScoreboard().getHandle();
+ }
+
+ public void reset() { + public void reset() {
+ float exp = 0; + float exp = 0;
+ boolean keepInventory = this.world.getGameRules().getBoolean("keepInventory"); + boolean keepInventory = this.world.getGameRules().getBoolean("keepInventory");