mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-18 14:01:13 +00:00
Move _writeAll
This commit is contained in:
parent
4219435bb7
commit
e00d3e294c
3 changed files with 10 additions and 8 deletions
|
|
@ -7,7 +7,6 @@ function inject(serv, player)
|
|||
player._client.on('block_place', function (packet) {
|
||||
var referencePosition=new vec3(packet.location.x,packet.location.y,packet.location.z);
|
||||
var id = serv.world.getBlock(referencePosition).type;
|
||||
player.system(player.entity.id);
|
||||
if(id==54)
|
||||
player._client.write("open_window",{
|
||||
windowId:165,
|
||||
|
|
@ -17,5 +16,4 @@ function inject(serv, player)
|
|||
});
|
||||
|
||||
});
|
||||
//player.emit("chat",packet.message);
|
||||
}
|
||||
10
lib/serverPlugins/communication.js
Normal file
10
lib/serverPlugins/communication.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
module.exports=inject;
|
||||
|
||||
function inject(serv,settings)
|
||||
{
|
||||
server._writeAll=function(packetName, packetFields) {
|
||||
serv.players.forEach(function (player) {
|
||||
player._client.write(packetName, packetFields);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
@ -13,10 +13,4 @@ function inject(serv,player)
|
|||
return otherPlayer != player;
|
||||
});
|
||||
};
|
||||
|
||||
player._writeAll=function(packetName, packetFields) {
|
||||
serv.players.forEach(function (player) {
|
||||
player._client.write(packetName, packetFields);
|
||||
});
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue