Make the packet type check 1.17 only

This commit is contained in:
libraryaddict 2021-06-29 07:02:17 +12:00
parent 5ab0e4a45c
commit 14d6fc7257

View File

@ -24,10 +24,12 @@ public class PacketListenerScoreboardTeam extends PacketAdapter {
public void onPacketSending(PacketEvent event) { public void onPacketSending(PacketEvent event) {
PacketContainer packet = event.getPacket(); PacketContainer packet = event.getPacket();
int type = packet.getIntegers().read(0); if (NmsVersion.v1_17.isSupported()) {
int type = packet.getIntegers().read(0);
if (type != 0 && type != 2) { if (type != 0 && type != 2) {
return; return;
}
} }
String name = packet.getStrings().read(0); String name = packet.getStrings().read(0);