mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2025-02-21 14:31:23 +01:00
Fix error with ProtocolLib's temporary players
This commit is contained in:
parent
ab0bd61999
commit
7a122a7231
@ -123,8 +123,8 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>com.comphenix.protocol</groupId>
|
||||
<artifactId>ProtocolLib-API</artifactId>
|
||||
<version>4.3.0-SNAPSHOT</version>
|
||||
<artifactId>ProtocolLib</artifactId>
|
||||
<version>4.2.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -23,6 +23,7 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.comphenix.net.sf.cglib.proxy.Factory;
|
||||
import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.ProtocolLibrary;
|
||||
import com.comphenix.protocol.events.ListenerPriority;
|
||||
@ -122,7 +123,7 @@ public class ProtocolLibHookImpl implements ProtocolLibHook {
|
||||
PacketContainer packet = event.getPacket();
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (player.getClass().getName().equals("com.comphenix.net.sf.cglib.proxy.Factory")) {
|
||||
if (player instanceof Factory) {
|
||||
return; // Ignore temporary players (reference: https://github.com/dmulloy2/ProtocolLib/issues/349)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user