Create stub implementation for ServerDeclareCommandsPacket

This commit is contained in:
Jonas Herzig 2018-07-19 11:13:16 +02:00
parent 267b9baca3
commit 3340e5f5e3
2 changed files with 37 additions and 1 deletions

View file

@ -43,6 +43,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.server.ServerAdvancements
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerBossBarPacket;
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerChatPacket;
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerCombatPacket;
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerDeclareCommandsPacket;
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerDifficultyPacket;
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerDisconnectPacket;
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
@ -357,7 +358,7 @@ public class MinecraftProtocol extends PacketProtocol {
this.registerIncoming(0x0E, ServerChatPacket.class);
this.registerIncoming(0x0F, ServerMultiBlockChangePacket.class);
this.registerIncoming(0x10, ServerTabCompletePacket.class);
// FIXME: 0x11
this.registerIncoming(0x11, ServerDeclareCommandsPacket.class);
this.registerIncoming(0x12, ServerConfirmTransactionPacket.class);
this.registerIncoming(0x13, ServerCloseWindowPacket.class);
this.registerIncoming(0x14, ServerOpenWindowPacket.class);

View file

@ -0,0 +1,35 @@
package com.github.steveice10.mc.protocol.packet.ingame.server;
import com.github.steveice10.mc.protocol.packet.MinecraftPacket;
import com.github.steveice10.packetlib.io.NetInput;
import com.github.steveice10.packetlib.io.NetOutput;
import java.io.IOException;
public class ServerDeclareCommandsPacket extends MinecraftPacket {
private byte[] data;
@SuppressWarnings("unused")
private ServerDeclareCommandsPacket() {
}
@Deprecated // This packet isn't fully implemented, please send a PR if you need to use it
public ServerDeclareCommandsPacket(byte[] data) {
this.data = data;
}
@Deprecated // This packet isn't fully implemented, please send a PR if you need to use it
public byte[] getData() {
return data;
}
@Override
public void read(NetInput in) throws IOException {
this.data = in.readBytes(in.available());
}
@Override
public void write(NetOutput out) throws IOException {
out.writeBytes(this.data);
}
}