mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-18 14:01:13 +00:00
16 lines
No EOL
408 B
JavaScript
16 lines
No EOL
408 B
JavaScript
module.exports=inject;
|
|
|
|
function inject(serv,player)
|
|
{
|
|
// doesn't check whether the player actually wait the correct time
|
|
player._client.on("block_dig",function(packet){
|
|
if(packet.status==2)
|
|
{
|
|
player._writeOthers("block_change",{
|
|
location:packet.location,
|
|
type:0
|
|
});
|
|
serv.world.setBlockType(packet.location.x,packet.location.y,packet.location.z,0);
|
|
}
|
|
});
|
|
} |