mirror of
https://github.com/danbulant/flying-squid
synced 2026-07-07 04:00:46 +00:00
Proper tabbing, implementing other players
This commit is contained in:
parent
703abc22e8
commit
be576b7494
1 changed files with 17 additions and 17 deletions
34
app.js
34
app.js
|
|
@ -35,19 +35,19 @@ server.on('login', function(client) {
|
||||||
playersConnected.push(client);
|
playersConnected.push(client);
|
||||||
|
|
||||||
playersConnected.forEach(function(entry) {
|
playersConnected.forEach(function(entry) {
|
||||||
// if(entry != client) {
|
if(entry != client) {
|
||||||
// client.write('named_entity_spawn', {
|
client.write('named_entity_spawn', {
|
||||||
// entityId: entry.id,
|
entityId: entry.id,
|
||||||
// playerUUID: entry.uuid,
|
playerUUID: entry.uuid,
|
||||||
// x: 0,
|
x: 6,
|
||||||
// y: 0,
|
y: 53,
|
||||||
// z: 0,
|
z: 6,
|
||||||
// yaw: 0,
|
yaw: 0,
|
||||||
// pitch 0,
|
pitch: 0,
|
||||||
// currentItem:
|
currentItem: 0,
|
||||||
// metadata:
|
metadata: []
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.keys(server.clients).forEach(function(clientKey) {
|
Object.keys(server.clients).forEach(function(clientKey) {
|
||||||
|
|
@ -67,16 +67,16 @@ server.on('login', function(client) {
|
||||||
});
|
});
|
||||||
|
|
||||||
playersConnected.forEach(function(entry) {
|
playersConnected.forEach(function(entry) {
|
||||||
entry.write('player_info', {
|
client.write('player_info', {
|
||||||
action: 0,
|
action: 0,
|
||||||
data: [{
|
data: [{
|
||||||
UUID: client.uuid.split("-").map(function(item) { return parseInt(item, 16); }),
|
UUID: entry.uuid.split("-").map(function(item) { return parseInt(item, 16); }),
|
||||||
name: client.username,
|
name: entry.username,
|
||||||
properties: [],
|
properties: [],
|
||||||
gamemode: 0,
|
gamemode: 0,
|
||||||
ping: 1,
|
ping: 1,
|
||||||
hasDisplayName: true,
|
hasDisplayName: true,
|
||||||
displayName: client.username
|
displayName: entry.username
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue