Fix for skins on players with nicknames - send up account name as well
as display name.
This commit is contained in:
parent
325f069b46
commit
4fb1ddf49a
5 changed files with 11 additions and 6 deletions
|
|
@ -18,14 +18,16 @@ public class Client {
|
|||
public String world;
|
||||
public double x, y, z;
|
||||
public int health;
|
||||
public String account;
|
||||
|
||||
public Player(String name, String world, double x, double y, double z, int health) {
|
||||
public Player(String name, String world, double x, double y, double z, int health, String account) {
|
||||
this.name = ChatColor.stripColor(name);
|
||||
this.world = world;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.health = health;
|
||||
this.account = account;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ class JsonTimerTask extends TimerTask {
|
|||
for (int i = 0; i < players.length; i++) {
|
||||
Player p = players[i];
|
||||
Location pl = p.getLocation();
|
||||
update.players[i] = new Client.Player(p.getDisplayName(), pl.getWorld().getName(), pl.getX(), pl.getY(), pl.getZ(), showHealth?p.getHealth():-1);
|
||||
update.players[i] = new Client.Player(p.getDisplayName(), pl.getWorld().getName(), pl.getX(), pl.getY(), pl.getZ(), showHealth?p.getHealth():-1,
|
||||
p.getName());
|
||||
}
|
||||
|
||||
update.updates = mapManager.getWorldUpdates(world.getName(), current - (jsonInterval + 10000));
|
||||
|
|
|
|||
|
|
@ -76,7 +76,8 @@ public class ClientUpdateHandler implements HttpHandler {
|
|||
for(int i=0;i<players.length;i++) {
|
||||
Player p = players[i];
|
||||
Location pl = p.getLocation();
|
||||
update.players[i] = new Client.Player(p.getDisplayName(), pl.getWorld().getName(), pl.getX(), pl.getY(), pl.getZ(), showHealth?p.getHealth():-1);
|
||||
update.players[i] = new Client.Player(p.getDisplayName(), pl.getWorld().getName(), pl.getX(), pl.getY(), pl.getZ(), showHealth?p.getHealth():-1,
|
||||
p.getName());
|
||||
}
|
||||
|
||||
update.updates = mapManager.getWorldUpdates(worldName, since);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue