mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-11 18:41:31 +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()
|
||||
{
|
||||
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',{
|
||||
action: 0,
|
||||
data: [{
|
||||
UUID: player._client.uuid,
|
||||
name: player.username,
|
||||
properties: [],
|
||||
properties: player.profileProperties,
|
||||
gamemode: player.gameMode,
|
||||
ping: 1
|
||||
}]
|
||||
|
|
@ -108,7 +119,7 @@ function inject(serv,player)
|
|||
data: serv.players.map((otherPlayer) => ({
|
||||
UUID: otherPlayer._client.uuid,
|
||||
name: otherPlayer.username,
|
||||
properties: [],
|
||||
properties: otherPlayer.profileProperties,
|
||||
gamemode: otherPlayer.gameMode,
|
||||
ping: 1
|
||||
}))
|
||||
|
|
|
|||
Loading…
Reference in a new issue