mirror of
https://github.com/ViaVersion/ViaRewind-Legacy-Support.git
synced 2025-01-24 21:21:50 +01:00
Use correct class to get method in NMSUtil#sendPacket
Closes https://github.com/ViaVersion/ViaRewind-Legacy-Support/issues/80
This commit is contained in:
parent
8db6375a8e
commit
b95e03512e
@ -126,7 +126,7 @@ public class NMSUtil {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
final Method sendPacket = ReflectionUtil.findMethod(player.getClass(), new String[] {"sendPacket", "a"}, getPacketClass());
|
||||
final Method sendPacket = ReflectionUtil.findMethod(playerConnection.getClass(), new String[] {"sendPacket", "a"}, getPacketClass());
|
||||
sendPacket.invoke(playerConnection, packet);
|
||||
} catch (IllegalAccessException | InvocationTargetException | NullPointerException e) {
|
||||
BukkitPlugin.getInstance().getLogger().log(Level.SEVERE, "Failed to send packet to player", e);
|
||||
|
Loading…
Reference in New Issue
Block a user