Make the packet type check 1.17 only
This commit is contained in:
parent
5ab0e4a45c
commit
14d6fc7257
@ -24,11 +24,13 @@ public class PacketListenerScoreboardTeam extends PacketAdapter {
|
|||||||
public void onPacketSending(PacketEvent event) {
|
public void onPacketSending(PacketEvent event) {
|
||||||
PacketContainer packet = event.getPacket();
|
PacketContainer packet = event.getPacket();
|
||||||
|
|
||||||
|
if (NmsVersion.v1_17.isSupported()) {
|
||||||
int type = packet.getIntegers().read(0);
|
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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user