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

Interfaces #14

Open
drzey opened this issue Aug 24, 2023 · 2 comments
Open

Interfaces #14

drzey opened this issue Aug 24, 2023 · 2 comments

Comments

@drzey
Copy link

drzey commented Aug 24, 2023

When you have an inferface in your code, neptune breaks
@exclude does not change anything

This is the error

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.lang.Class.getName()" because the return value of "java.lang.Class.getSuperclass()" is null
at gg.flyte.neptune.command.CommandDispatcher.isListener(CommandDispatcher.java:207)
at gg.flyte.neptune.command.CommandDispatcher.(CommandDispatcher.java:56)
at gg.flyte.neptune.Neptune.(Neptune.java:30)
at gg.flyte.neptune.Neptune$Builder.create(Neptune.java:77)

@drzey
Copy link
Author

drzey commented Aug 24, 2023

Simple fix would be just adding

if (foundClass.isInterface()) continue;

In the CommandDispacher where you loop thru classes, I've tested the solution and it works :D

@stephendotgg
Copy link
Member

Really appreciate it

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