mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 13:15:30 +01:00
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
@ -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);
|
||||
|
@ -453,7 +453,8 @@ DynMap.prototype = {
|
||||
var player = me.players[update.name] = {
|
||||
name: update.name,
|
||||
location: new Location(me.worlds[update.world], parseFloat(update.x), parseFloat(update.y), parseFloat(update.z)),
|
||||
health: update.health
|
||||
health: update.health,
|
||||
account: update.account
|
||||
};
|
||||
|
||||
$(me).trigger('playeradded', [ player ]);
|
||||
@ -486,7 +487,7 @@ DynMap.prototype = {
|
||||
})
|
||||
.appendTo(me.playerlist);
|
||||
if (me.options.showplayerfacesinmenu) {
|
||||
getMinecraftHead(player.name, 16, function(head) {
|
||||
getMinecraftHead(player.account, 16, function(head) {
|
||||
$('img', playerIconContainer).remove();
|
||||
$(head).appendTo(playerIconContainer);
|
||||
});
|
||||
|
@ -15,7 +15,7 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) {
|
||||
.text(player.name));
|
||||
|
||||
if (configuration.showplayerfaces) {
|
||||
getMinecraftHead(player.name, 32, function(head) {
|
||||
getMinecraftHead(player.account, 32, function(head) {
|
||||
$(head)
|
||||
.addClass('playericon')
|
||||
.prependTo(div);
|
||||
|
Loading…
Reference in New Issue
Block a user