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

NullPointerException at .registerAllEvents() #410

Open
SaftigeOrange opened this issue May 14, 2022 · 1 comment
Open

NullPointerException at .registerAllEvents() #410

SaftigeOrange opened this issue May 14, 2022 · 1 comment

Comments

@SaftigeOrange
Copy link

SaftigeOrange commented May 14, 2022

Hello, when i load allEvents(".registerAllEvents()") i become a NullPointerException in my events class.
This the error:
Error
Why is it so?

Thanks for helping

@SaftigeOrange SaftigeOrange changed the title TS3CommandFailedException at .setNickname(String) NullPointerException at .registerAllEvents() May 15, 2022
@rogermb
Copy link
Collaborator

rogermb commented May 15, 2022

Hi @SaftigeOrange

Could you please share the stack trace of the exception you're getting with us?

Also, it seems very suspicious that you're creating two instances of your TeamSpeakService. Are you sure you didn't mean to re-use the first TeamSpeakService?

That would explain why you, judging from the initial title, were getting an exception while trying to set your nickname. Nicknames on a TS3 server must be unique, so if you use a nickname that's already in use - as you would if you had 2 queries connecting to the same server and trying to use the same nickname - the command will fail and you'll get an exception.

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

No branches or pull requests

2 participants