public void sendPacket(Packet packet) { // CraftBukkit start if (packet instanceof Packet6SpawnPosition) { Packet6SpawnPosition packet6 = (Packet6SpawnPosition) packet; this.player.compassTarget = new Location(getPlayer().getWorld(), packet6.x, packet6.y, packet6.z); } else if (packet instanceof Packet3Chat) { String message = ((Packet3Chat) packet).a; for (final String line : TextWrapper.wrapText(message)) { this.networkManager.a(new Packet3Chat(line)); } packet = null; } if (packet != null) this.networkManager.a(packet); // CraftBukkit end this.g = this.f; }
public void sendMessage(String message) { for (final String line : TextWrapper.wrapText(message)) { getHandle().a.b(new Packet3Chat(line)); } }