mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-24 17:21:43 +00:00
implement skins (player properties)
This commit is contained in:
parent
d7aa0bca83
commit
591a4ed8df
1 changed files with 13 additions and 2 deletions
|
|
@ -92,12 +92,23 @@ function inject(serv,player)
|
||||||
|
|
||||||
function fillTabList()
|
function fillTabList()
|
||||||
{
|
{
|
||||||
|
if(player._client.profile)
|
||||||
|
player.profileProperties=player._client.profile.properties
|
||||||
|
.map(property => ({
|
||||||
|
name:property.name,
|
||||||
|
value:property.value,
|
||||||
|
isSigned:true,
|
||||||
|
signature:property.signature
|
||||||
|
}));
|
||||||
|
else
|
||||||
|
player.profileProperties=[];
|
||||||
|
|
||||||
player._writeOthers('player_info',{
|
player._writeOthers('player_info',{
|
||||||
action: 0,
|
action: 0,
|
||||||
data: [{
|
data: [{
|
||||||
UUID: player._client.uuid,
|
UUID: player._client.uuid,
|
||||||
name: player.username,
|
name: player.username,
|
||||||
properties: [],
|
properties: player.profileProperties,
|
||||||
gamemode: player.gameMode,
|
gamemode: player.gameMode,
|
||||||
ping: 1
|
ping: 1
|
||||||
}]
|
}]
|
||||||
|
|
@ -108,7 +119,7 @@ function inject(serv,player)
|
||||||
data: serv.players.map((otherPlayer) => ({
|
data: serv.players.map((otherPlayer) => ({
|
||||||
UUID: otherPlayer._client.uuid,
|
UUID: otherPlayer._client.uuid,
|
||||||
name: otherPlayer.username,
|
name: otherPlayer.username,
|
||||||
properties: [],
|
properties: otherPlayer.profileProperties,
|
||||||
gamemode: otherPlayer.gameMode,
|
gamemode: otherPlayer.gameMode,
|
||||||
ping: 1
|
ping: 1
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue