Closed quiquelhappy closed 2 years ago
its the plugin issue i seen the pom of the project and you forgot to add provided scope. https://github.com/BenCodez/VotingPlugin/blob/master/VotingPlugin/pom.xml#L225
<dependency>
<groupId>com.github.limework</groupId>
<artifactId>redisbungee</artifactId>
<version>0.6.5</version>
<scope>provided</scope>
</dependency>
issue here when you include the redis bungee in your project it shades it into the final jar,
redis bungee will load fine but when you load your jar your plugin class loader will load redis-bungee again where api variable will return null or nullpointer since the api class was not initiated.
alright the readme has no provided sorry about that xd
Seems to fix the issue
Describe the bug When trying to hook to the API: java.lang.NullPointerException: Cannot invoke "com.imaginarycode.minecraft.redisbungee.RedisBungeeAPI.isPlayerOnline(java.util.UUID)" because the return value of "com.imaginarycode.minecraft.redisbungee.RedisBungeeAPI.getRedisBungeeApi()" is null
To Reproduce https://github.com/BenCodez/VotingPlugin/commit/29dad6ca255398f956b6c575f72ad81cc2f9dfe1
Expected behavior com.imaginarycode.minecraft.redisbungee.RedisBungeeAPI.getRedisBungeeApi() shouldn't be null, redis is in fact installed
Screenshots
Redis version? it should be at least 6 and above. 0.6.5
Bungeecord version or (the bungee fork name eg: waterfall) and your plugins latest.
console logs?