Fix memory leak in PlayerList

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-07-17 09:55:47 +10:00
parent 0d8abf61e3
commit e2d75dccb4
2 changed files with 139 additions and 35 deletions

View File

@@ -49,6 +49,15 @@
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) {
super(worldserver, gameprofile);
playerinteractmanager.player = this;
@@ -72,7 +102,7 @@
}
this.server = minecraftserver;
- this.bZ = minecraftserver.getPlayerList().a((EntityHuman) this);
+ this.bZ = minecraftserver.getPlayerList().getStatisticManager(this); // CraftBukkit
this.bY = minecraftserver.getPlayerList().h(this);
this.P = 1.0F;
this.setPositionRotation(blockposition, 0.0F, 0.0F);
@@ -81,6 +111,11 @@
this.setPosition(this.locX, this.locY + 1.0D, this.locZ);
}