3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

Update the correct Scoreboard Criteria when a health change comes in. This fixes SPIGOT-20

Dieser Commit ist enthalten in:
Fabian Faßbender 2014-11-30 13:34:38 +01:00
Ursprung 6eb0c79271
Commit cc0d8bb327

Datei anzeigen

@ -1,5 +1,5 @@
--- ../work/decompile-8eb82bde//net/minecraft/server/EntityPlayer.java 2014-11-28 17:43:43.149707434 +0000 --- ../work/decompile-8eb82bde//net/minecraft/server/EntityPlayer.java Sun Nov 30 12:33:51 2014
+++ src/main/java/net/minecraft/server/EntityPlayer.java 2014-11-28 17:38:18.000000000 +0000 +++ src/main/java/net/minecraft/server/EntityPlayer.java Sun Nov 30 12:31:53 2014
@@ -13,6 +13,17 @@ @@ -13,6 +13,17 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -136,7 +136,7 @@
- this.getScoreboard().getPlayerScoreForObjective(this.getName(), scoreboardobjective).updateForList(Arrays.asList(new EntityHuman[] { this})); - this.getScoreboard().getPlayerScoreForObjective(this.getName(), scoreboardobjective).updateForList(Arrays.asList(new EntityHuman[] { this}));
- } - }
+ // CraftBukkit - Update ALL the scores! + // CraftBukkit - Update ALL the scores!
+ this.world.getServer().getScoreboardManager().updateAllScoresForList(IScoreboardCriteria.f, this.getName(), com.google.common.collect.ImmutableList.of(this)); + this.world.getServer().getScoreboardManager().updateAllScoresForList(IScoreboardCriteria.g, this.getName(), com.google.common.collect.ImmutableList.of(this));
+ } + }
+ // CraftBukkit start - Force max health updates + // CraftBukkit start - Force max health updates
+ if (this.maxHealthCache != this.getMaxHealth()) { + if (this.maxHealthCache != this.getMaxHealth()) {