спасибо Россия
This commit is contained in:
parent
5e3306276a
commit
5999e6b3f4
|
@ -231,7 +231,8 @@ export class Server {
|
||||||
player.toWorld(this.worlds.find((e) => e.name == player.world)!);
|
player.toWorld(this.worlds.find((e) => e.name == player.world)!);
|
||||||
this.broadcast(`${player.username} has &ajoined`);
|
this.broadcast(`${player.username} has &ajoined`);
|
||||||
} else if (packetType == 0x08) {
|
} else if (packetType == 0x08) {
|
||||||
const player = this.players.find((e) => e.socket == connection)!;
|
const player = this.players.find((e) => e.socket == connection);
|
||||||
|
if(!player) return;
|
||||||
|
|
||||||
packet.readByte();
|
packet.readByte();
|
||||||
player.position.x = packet.readShort();
|
player.position.x = packet.readShort();
|
||||||
|
@ -248,7 +249,8 @@ export class Server {
|
||||||
} else if (packetType == 0x0d) {
|
} else if (packetType == 0x0d) {
|
||||||
packet.readByte();
|
packet.readByte();
|
||||||
|
|
||||||
const player = this.players.find((e) => e.socket == connection)!;
|
const player = this.players.find((e) => e.socket == connection);
|
||||||
|
if(!player) return;
|
||||||
const message = packet.readString();
|
const message = packet.readString();
|
||||||
let playerColor = "[member] &b";
|
let playerColor = "[member] &b";
|
||||||
|
|
||||||
|
@ -272,7 +274,8 @@ export class Server {
|
||||||
}
|
}
|
||||||
this.broadcast(`${playerColor}${player.username}&f: ${message}`);
|
this.broadcast(`${playerColor}${player.username}&f: ${message}`);
|
||||||
} else if (packetType == 0x05) {
|
} else if (packetType == 0x05) {
|
||||||
const player = this.players.find((e) => e.socket == connection)!;
|
const player = this.players.find((e) => e.socket == connection);
|
||||||
|
if(!player) return;
|
||||||
|
|
||||||
const position = {
|
const position = {
|
||||||
x: packet.readShort(),
|
x: packet.readShort(),
|
||||||
|
@ -284,7 +287,8 @@ export class Server {
|
||||||
|
|
||||||
const id = mode ? block : 0;
|
const id = mode ? block : 0;
|
||||||
|
|
||||||
const world = this.worlds.find((e) => e.name == player.world)!;
|
const world = this.worlds.find((e) => e.name == player.world);
|
||||||
|
if(!world) return;
|
||||||
|
|
||||||
let pluginAnswer: boolean[] = [];
|
let pluginAnswer: boolean[] = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue