#BufferedReader returning empty array in spigot server, but not in maven test (junit)

1 messages · Page 1 of 1 (latest)

mossy oar
#

does anyone know why this wont work on a spigot server? what it's supposed to do is return a list of classes in the defined package route which it does in a maven test, correctly, but when it comes to using it in the plugin, it returns an empty list. I've tried replacing the system classloader with spigots, no difference. I've tried debugging it a bit, the null check for stream is not the culprit, it appears that reader.lines() is returning an empty array, but I don't know why https://sourceb.in/FTuwAuovAi

#

called like this getClassesOfPackage("com.boats.common.jedis.commands")

hot kettle
#

Plugins have their own classloader

mossy oar
#

thats what I meant with 'I've tried replacing the system classloader with spigots', sorry, it does the same thing

hot kettle
#

Each plugin has its own classloader afaik

#

So you need to get the one from your plugin

mossy oar
#

plugin.getPluginClassLoader()?

#

thats the one I tried to use, same issue

hot kettle
#

Hmm