You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error when I'm using this library in a paper plugin:
[11:28:08 WARN]: Exception in thread "DefaultDispatcher-worker-1" java.lang.ClassCastException: class io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader cannot be cast to class org.bukkit.plugin.java.PluginClassLoader (io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader and org.bukkit.plugin.java.PluginClassLoader are in unnamed module of loader java.net.URLClassLoader @421faab1)
[11:28:08 WARN]: at com.noxcrew.interfaces.utilities.ThreadUtilsKt.runSync(ThreadUtils.kt:13)
[11:28:08 WARN]: at com.noxcrew.interfaces.view.AbstractInterfaceView.renderToInventory$suspendImpl(AbstractInterfaceView.kt:397)
[11:28:08 WARN]: at com.noxcrew.interfaces.view.AbstractInterfaceView.renderToInventory(AbstractInterfaceView.kt)
[11:28:08 WARN]: at com.noxcrew.interfaces.view.AbstractInterfaceView$renderAndOpen$2.invokeSuspend(AbstractInterfaceView.kt:209)
[11:28:08 WARN]: at com.noxcrew.interfaces.view.AbstractInterfaceView$renderAndOpen$2.invoke(AbstractInterfaceView.kt)
[11:28:08 WARN]: at com.noxcrew.interfaces.view.AbstractInterfaceView$renderAndOpen$2.invoke(AbstractInterfaceView.kt)
[11:28:08 WARN]: at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturnIgnoreTimeout(Undispatched.kt:53)
[11:28:08 WARN]: at kotlinx.coroutines.TimeoutKt.setupTimeout(Timeout.kt:148)
[11:28:08 WARN]: at kotlinx.coroutines.TimeoutKt.withTimeout(Timeout.kt:43)
[11:28:08 WARN]: at kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(Timeout.kt:71)
[11:28:08 WARN]: at com.noxcrew.interfaces.view.AbstractInterfaceView.renderAndOpen(AbstractInterfaceView.kt:207)
[11:28:08 WARN]: at com.noxcrew.interfaces.view.AbstractInterfaceView.access$renderAndOpen(AbstractInterfaceView.kt:38)
[11:28:08 WARN]: at com.noxcrew.interfaces.view.AbstractInterfaceView$applyTransforms$1$1.invokeSuspend(AbstractInterfaceView.kt:261)
[11:28:08 WARN]: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
[11:28:08 WARN]: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:102)
[11:28:08 WARN]: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
[11:28:08 WARN]: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:816)
[11:28:08 WARN]: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
[11:28:08 WARN]: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
[11:28:08 WARN]: Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(interfaces), StandaloneCoroutine{Cancelling}@79af45cc, Dispatchers.Default]
I think this can be resolved by changing the following line in ThreadUtils and adding a check for the PaperPluginClassLoader. If you want, I can create a pull request to fix this, but I would like to discuss it here before 😄
The text was updated successfully, but these errors were encountered:
Sounds like a good fix to me. I think a proper fix might be to bring the runSync method inside InterfaceListeners and using the plugin instance that we have stored there. That way we don't need to touch any class loaders.
Sounds like a good fix to me. I think a proper fix might be to bring the runSync method inside InterfaceListeners and using the plugin instance that we have stored there. That way we don't need to touch any class loaders.
I'm getting this error when I'm using this library in a paper plugin:
I think this can be resolved by changing the following line in ThreadUtils and adding a check for the PaperPluginClassLoader. If you want, I can create a pull request to fix this, but I would like to discuss it here before 😄
The text was updated successfully, but these errors were encountered: