mirror of
https://github.com/ViaVersion/ViaRewind-Legacy-Support.git
synced 2025-01-08 19:07:35 +01:00
Fix NMSUtil#sendPacket
Closes https://github.com/ViaVersion/ViaRewind-Legacy-Support/issues/77
This commit is contained in:
parent
1c6be03d58
commit
e580177856
@ -87,9 +87,9 @@ public class NMSUtil {
|
||||
}
|
||||
|
||||
public static void sendPacket(final Player player, final Object packet) {
|
||||
Object nmsPlayer = null;
|
||||
Object nmsPlayer;
|
||||
try {
|
||||
player.getClass().getMethod("getHandle").invoke(player);
|
||||
nmsPlayer = player.getClass().getMethod("getHandle").invoke(player);
|
||||
} catch (InvocationTargetException | IllegalAccessException | NoSuchMethodException e) {
|
||||
BukkitPlugin.getInstance().getLogger().log(Level.SEVERE, "Failed to get EntityPlayer from player", e);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user