Catch throwables not just normal exceptions

This commit is contained in:
libraryaddict 2020-03-30 09:11:26 +13:00
parent b5f3edc3a1
commit c77c490324
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ public class PacketListenerMain extends PacketAdapter {
packets = PacketsManager.getPacketsHandler() packets = PacketsManager.getPacketsHandler()
.transformPacket(event.getPacket(), disguise, observer, disguise.getEntity()); .transformPacket(event.getPacket(), disguise, observer, disguise.getEntity());
} }
catch (Exception ex) { catch (Throwable ex) {
ex.printStackTrace(); ex.printStackTrace();
event.setCancelled(true); event.setCancelled(true);
return; return;

View File

@ -183,7 +183,7 @@ public class PacketListenerViewSelfDisguise extends PacketAdapter {
DisguiseUtilities.setPlayerVelocity(null); DisguiseUtilities.setPlayerVelocity(null);
} }
} }
catch (Exception ex) { catch (Throwable ex) {
event.setCancelled(true); event.setCancelled(true);
ex.printStackTrace(); ex.printStackTrace();
} }