From f849d8c05a571bf727cc8e5b97a835639f9d46b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20H=C3=BCbner?= Date: Sun, 12 May 2024 22:39:56 +0200 Subject: [PATCH] protolib api changes --- .../queueplugin/packetwrapper/AbstractPacket.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/cloudanarchy/queueplugin/packetwrapper/AbstractPacket.java b/src/main/java/org/cloudanarchy/queueplugin/packetwrapper/AbstractPacket.java index 2533265..5bf36c6 100644 --- a/src/main/java/org/cloudanarchy/queueplugin/packetwrapper/AbstractPacket.java +++ b/src/main/java/org/cloudanarchy/queueplugin/packetwrapper/AbstractPacket.java @@ -64,12 +64,7 @@ public PacketContainer getHandle() { * @throws RuntimeException If the packet cannot be sent. */ public void sendPacket(Player receiver) { - try { - ProtocolLibrary.getProtocolManager().sendServerPacket(receiver, - getHandle()); - } catch (InvocationTargetException e) { - throw new RuntimeException("Cannot send packet.", e); - } + ProtocolLibrary.getProtocolManager().sendServerPacket(receiver, getHandle()); } /** @@ -90,8 +85,7 @@ public void broadcastPacket() { @Deprecated public void recievePacket(Player sender) { try { - ProtocolLibrary.getProtocolManager().recieveClientPacket(sender, - getHandle()); + ProtocolLibrary.getProtocolManager().receiveClientPacket(sender, getHandle()); } catch (Exception e) { throw new RuntimeException("Cannot recieve packet.", e); } @@ -105,8 +99,7 @@ public void recievePacket(Player sender) { */ public void receivePacket(Player sender) { try { - ProtocolLibrary.getProtocolManager().recieveClientPacket(sender, - getHandle()); + ProtocolLibrary.getProtocolManager().receiveClientPacket(sender, getHandle()); } catch (Exception e) { throw new RuntimeException("Cannot receive packet.", e); }