mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 19:25:15 +01:00
Fix player faces when aliases being used, and strip color from player
display names sent to web UI
This commit is contained in:
parent
2866eaa905
commit
fe25cb6a0f
@ -3,6 +3,7 @@ package org.dynmap;
|
||||
import static org.dynmap.JSONUtils.a;
|
||||
import static org.dynmap.JSONUtils.s;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -37,7 +38,7 @@ public class ClientUpdateComponent extends Component {
|
||||
Location pl = p.getLocation();
|
||||
JSONObject jp = new JSONObject();
|
||||
s(jp, "type", "player");
|
||||
s(jp, "name", p.getDisplayName());
|
||||
s(jp, "name", ChatColor.stripColor(p.getDisplayName()));
|
||||
s(jp, "account", p.getName());
|
||||
s(jp, "world", p.getWorld().getName());
|
||||
s(jp, "x", pl.getX());
|
||||
|
@ -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