Skip to content

Commit

Permalink
Bump supported ProtocolLib to 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
WizardCM committed Oct 20, 2023
1 parent 99c0da8 commit 851ddc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions modules/RoyalCommands/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>4.8.0</version>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
Expand Down Expand Up @@ -299,7 +299,7 @@
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.20.2-R0.1-SNAPSHOT</version>
<scope>compile</scope>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.events.PacketContainer;
import com.google.common.base.Objects;
import java.lang.reflect.InvocationTargetException;
import org.bukkit.entity.Player;

public abstract class AbstractPacket {
Expand Down Expand Up @@ -64,7 +63,7 @@ public void sendPacket(Player receiver) {
try {
ProtocolLibrary.getProtocolManager().sendServerPacket(receiver,
getHandle());
} catch (InvocationTargetException e) {
} catch (Exception e) {
throw new RuntimeException("Cannot send packet.", e);
}
}
Expand All @@ -80,7 +79,7 @@ public void sendPacket(Player receiver) {
@Deprecated
public void recievePacket(Player sender) {
try {
ProtocolLibrary.getProtocolManager().recieveClientPacket(sender,
ProtocolLibrary.getProtocolManager().receiveClientPacket(sender,
getHandle());
} catch (Exception e) {
throw new RuntimeException("Cannot recieve packet.", e);
Expand All @@ -95,7 +94,7 @@ public void recievePacket(Player sender) {
*/
public void receivePacket(Player sender) {
try {
ProtocolLibrary.getProtocolManager().recieveClientPacket(sender,
ProtocolLibrary.getProtocolManager().receiveClientPacket(sender,
getHandle());
} catch (Exception e) {
throw new RuntimeException("Cannot recieve packet.", e);
Expand Down

0 comments on commit 851ddc2

Please sign in to comment.