Support latest ProtocolLib

- Switched to JitPack for the ProtocolLib repository. See dmulloy2/ProtocolLib#1047.
- Using the new interface of generated classes when checking if a player is a proxy player. See dmulloy2/ProtocolLib#1053.
This commit is contained in:
Pim van der Loos
2021-01-04 11:59:46 +01:00
parent c3d6dd1b43
commit 06ac4f8ffc
2 changed files with 7 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.reflect.StructureModifier;
import com.comphenix.protocol.utility.ByteBuddyGenerated;
import me.libraryaddict.disguise.DisguiseAPI;
import me.libraryaddict.disguise.LibsDisguises;
import me.libraryaddict.disguise.disguisetypes.Disguise;
@@ -44,7 +45,7 @@ public class PacketListenerInventory extends PacketAdapter {
if (player.getName().contains("UNKNOWN[")) // If the player is temporary
return;
if (player instanceof com.comphenix.net.sf.cglib.proxy.Factory || player.getVehicle() != null) {
if (player instanceof ByteBuddyGenerated || player.getVehicle() != null) {
return;
}
@@ -250,7 +251,7 @@ public class PacketListenerInventory extends PacketAdapter {
Player player = event.getPlayer();
// If the inventory is the players inventory
if (player instanceof com.comphenix.net.sf.cglib.proxy.Factory || player.getVehicle() != null ||
if (player instanceof ByteBuddyGenerated || player.getVehicle() != null ||
event.getPacket().getIntegers().read(0) != 0) {
return;
}