Skip to content

Commit

Permalink
protolib api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nothub committed May 12, 2024
1 parent a15cc56 commit f849d8c
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

/**
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit f849d8c

Please sign in to comment.