avocado-old/packages/entity/packets/entity.packet.js

23 lines
367 B
JavaScript
Raw Normal View History

2019-05-13 21:07:51 -05:00
import {Packet} from '@avocado/net';
export class EntityPacket extends Packet {
constructor(data, entity) {
if ('undefined' !== typeof entity) {
data.uuid = entity.instanceUuid;
}
super(data);
this.entity = entity;
}
static get schema() {
return {
...super.schema,
data: {
uuid: 'string',
},
};
}
}