Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Fixed a few player-respawn issues. This should resolve BUKKIT-28 (Dupe bug), BUKKIT-29 (Poisons lasting), and BUKKIT-46 (XP resetting)
Dieser Commit ist enthalten in:
Ursprung
55a532c251
Commit
98e062f0cf
@ -630,5 +630,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public String toString() {
|
||||
return super.toString() + "(" + this.name + " at " + this.locX + "," + this.locY + "," + this.locZ + ")";
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
this.health = 20;
|
||||
this.fireTicks = 0;
|
||||
this.fallDistance = 0;
|
||||
this.foodData = new FoodMetaData();
|
||||
this.expLevel = 0;
|
||||
this.expTotal = 0;
|
||||
this.exp = 0;
|
||||
this.deathTicks = 0;
|
||||
effects.clear();
|
||||
this.activeContainer = this.defaultContainer;
|
||||
this.cf = -1; // lastSentExp. Find line: "if (this.expTotal != this.XXXX) {"
|
||||
this.giveExp(this.newExp);
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
@ -262,15 +262,7 @@ public class ServerConfigurationManager {
|
||||
this.cserver.getPluginManager().callEvent(respawnEvent);
|
||||
|
||||
location = respawnEvent.getRespawnLocation();
|
||||
entityplayer.health = 20;
|
||||
entityplayer.fireTicks = 0;
|
||||
entityplayer.fallDistance = 0;
|
||||
entityplayer.foodData = new FoodMetaData();
|
||||
entityplayer.expLevel = 0;
|
||||
entityplayer.expTotal = 0;
|
||||
entityplayer.exp = 0;
|
||||
entityplayer.deathTicks = 0;
|
||||
entityplayer.d(entityplayer.newExp);
|
||||
entityplayer.reset();
|
||||
} else {
|
||||
location.setWorld(this.server.getWorldServer(i).getWorld());
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren