Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch throwables when loading plugins #1098

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

Joo200
Copy link
Contributor

@Joo200 Joo200 commented Oct 11, 2023

While developing a plugin I forgot to use the shaded plugin and found a NoClassDefFoundError.

This error is a Throwable but not an Exception, so the current implementation in Velocity doesn't print the correct warning message.

Before:

[17:13:14 INFO]: Booting up Velocity 3.2.0-SNAPSHOT (git-2bd2c692-b269)...
[17:13:14 INFO]: Loading localizations...
[17:13:14 INFO]: Connections will use epoll channels, libdeflate (Linux x86_64) compression, OpenSSL 3.0.x (Linux x86_64) ciphers
[17:13:14 INFO]: Loading plugins...
[17:13:14 INFO]: Loaded plugin luckperms 5.4.104 by Luck
[17:13:14 ERROR]: Exception in thread "main" java.lang.NoClassDefFoundError: org/bstats/charts/CustomChart
-- stacktrace --
-- no further messages, velocity is stucked in startup --

After:

[17:14:06 INFO]: Booting up Velocity 3.2.0-SNAPSHOT (git-768ecdb0)...
[17:14:06 INFO]: Loading localizations...
[17:14:06 INFO]: Connections will use epoll channels, libdeflate (Linux x86_64) compression, OpenSSL 3.0.x (Linux x86_64) ciphers
[17:14:06 INFO]: Loading plugins...
[17:14:06 INFO]: Loaded plugin luckperms 5.4.104 by Luck
[17:14:06 ERROR]: Can't create plugin myname
java.lang.NoClassDefFoundError: org/bstats/charts/CustomChart
-- stacktrace --
[17:14:06 INFO]: Loaded 1 plugins
[17:14:07 INFO]: Listening on /[0:0:0:0:0:0:0:0%0]:25577
[17:14:07 INFO]: Done (1,24s)!

@electronicboy electronicboy merged commit 9be0bca into PaperMC:dev/3.0.0 Oct 11, 2023
1 check passed
BlackBaroness added a commit to PvPClashnet/Velocity-CommandExecuteEvent that referenced this pull request Oct 24, 2023
* Add version information for 1.20.1 (PaperMC#1021)

* bump adventure to 4.14.0 (PaperMC#1034)

* check if a plugin has a executor service (PaperMC#1038)

* check if a plugin has an executor service

* checkstyle

* feat: add TabList#addEntries (PaperMC#987)

* [ci skip] Replaced weired i with i in javadocs (PaperMC#1057)

In this little patch I replaced an i which caused my build process to crash with an i

* Do not track plugin channels registered per-player on the proxy (PaperMC#591)

We don't need to track this information since Velocity uses the JoinGame packet, which is about as good of a server rejoin mechanism we're likely to get in vanilla Minecraft.

* fix PaperMC#1062

* 1.20.2 Support (PaperMC#1088)

Co-authored-by: RednedEpic <[email protected]>
Co-authored-by: Gero <[email protected]>

* Actually send plugin message registration to backend servers

I don't see where this was ever done, and don't see how plugin messaging
could of ever worked, at least within the confines of CB and co, given
the fact that we never seemed to be sending this to the backend?

* appease checkstyle, move back to older fix placement

* Change packet decode logging prompt

* Catch throwables when loading plugins (PaperMC#1098)

* Several improvements and fixes for 1.20.2 (PaperMC#1097)

* Send LoginAcknowledged immediately

* Resend player list header/footer after backend server switched to config state

* Fix clearHeaderAndFooter not clearing fields in ConnectedPlayer

* Clear boss bars, header/footer, tab list when switching client to config state

* Send client settings in config state

* Fix unsigned commands detected as signed (PaperMC#1082)

* fix: commands flagged as signed without signed arguments

* feat: improve error message for illegal protocol state.

* acknowledge seen messages to server when running proxy commands (PaperMC#1100)

* Implement ComponentLogger (PaperMC#1022)

* Log the protocol phase in case of trying to obtain a packet id not existing in the phase (PaperMC#1107)

* Bump netty to 4.1.100.Final (PaperMC#1067)

---------

Co-authored-by: Pantera (Mad_Daniel) <[email protected]>
Co-authored-by: chris <[email protected]>
Co-authored-by: Aaron <[email protected]>
Co-authored-by: powercas_gamer <[email protected]>
Co-authored-by: Groldi <[email protected]>
Co-authored-by: Andrew Steinborn <[email protected]>
Co-authored-by: Emmanuel Lampe <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: RednedEpic <[email protected]>
Co-authored-by: Gero <[email protected]>
Co-authored-by: Shane Freeder <[email protected]>
Co-authored-by: Joo200 <[email protected]>
Co-authored-by: Adrian <[email protected]>
BlackBaroness added a commit to influct/Velocity that referenced this pull request Oct 24, 2023
* 1.20.2 Support (PaperMC#1088)

Co-authored-by: RednedEpic <[email protected]>
Co-authored-by: Gero <[email protected]>

* Actually send plugin message registration to backend servers

I don't see where this was ever done, and don't see how plugin messaging
could of ever worked, at least within the confines of CB and co, given
the fact that we never seemed to be sending this to the backend?

* appease checkstyle, move back to older fix placement

* Change packet decode logging prompt

* Catch throwables when loading plugins (PaperMC#1098)

* Several improvements and fixes for 1.20.2 (PaperMC#1097)

* Send LoginAcknowledged immediately

* Resend player list header/footer after backend server switched to config state

* Fix clearHeaderAndFooter not clearing fields in ConnectedPlayer

* Clear boss bars, header/footer, tab list when switching client to config state

* Send client settings in config state

* Fix unsigned commands detected as signed (PaperMC#1082)

* fix: commands flagged as signed without signed arguments

* feat: improve error message for illegal protocol state.

* acknowledge seen messages to server when running proxy commands (PaperMC#1100)

* Implement ComponentLogger (PaperMC#1022)

* Log the protocol phase in case of trying to obtain a packet id not existing in the phase (PaperMC#1107)

* Bump netty to 4.1.100.Final (PaperMC#1067)

---------

Co-authored-by: Paul <[email protected]>
Co-authored-by: RednedEpic <[email protected]>
Co-authored-by: Gero <[email protected]>
Co-authored-by: Shane Freeder <[email protected]>
Co-authored-by: Joo200 <[email protected]>
Co-authored-by: Adrian <[email protected]>
Co-authored-by: Pantera (Mad_Daniel) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants