Skip to content

Commit

Permalink
Catch exceptions not throwables for events
Browse files Browse the repository at this point in the history
  • Loading branch information
AoElite committed Aug 17, 2023
1 parent 800ffaf commit 756add0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void callEvent(PacketEvent event, @Nullable Runnable postCallListenerActi
for (PacketListenerCommon listener : listeners) {
try {
event.call(listener);
} catch (Throwable t) {
} catch (Exception t) {
// ignore handshake exceptions
if (t.getClass() != InvalidHandshakeException.class) {
PacketEvents.getAPI().getLogger().log(Level.WARNING, "PacketEvents caught an unhandled exception while calling your listener.", t);
Expand Down

0 comments on commit 756add0

Please sign in to comment.