Skip to content

NPE while trying to get managers #13

@ArnyminerZ

Description

@ArnyminerZ

I'm getting a NPE while trying to work with managers. This is my code (this is using UserManager but it happens with all of the managers):

SpigotSiteCore()
val userManager = SpigotSite.getAPI().userManager
if(userManager == null)
    println("User manager is null!")
val user = userManager.authenticate(auth, pass)

And I get:

java.lang.NullPointerException
	at be.maximvdw.spigotsite.user.SpigotUserManager.authenticate(SpigotUserManager.java:95)
	at be.maximvdw.spigotsite.user.SpigotUserManager.authenticate(SpigotUserManager.java:65)
	at com.arnyminerz.minecraft.app.servercreator.ServerWindow$refreshInstancesView$4$1.invoke(ServerWindow.kt:110)
	at com.arnyminerz.minecraft.app.servercreator.ServerWindow$refreshInstancesView$4$1.invoke(ServerWindow.kt:24)
	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

Also, I am getting this, when the project runs:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sourceforge.htmlunit.corejs.javascript.NativeArray (file:/C:/Users/Arnym/.gradle/caches/modules-2/files-2.1/com.gargoylesoftware/HTMLUnit/2.15/5c86640778d616531e2ba3d61eb9335eae1c61a8/HTMLUnit-2.15-OSGi.jar) to field java.util.Arrays$LegacyMergeSort.userRequested
WARNING: Please consider reporting this to the maintainers of net.sourceforge.htmlunit.corejs.javascript.NativeArray
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions