Shimell / DiscordWhitelisterSpigot

Spigot plugin that allows whitelisting users through a discord text channel.
MIT License
41 stars 23 forks source link

doesnt work on 1.17 #54

Closed mondmann3101 closed 2 years ago

mondmann3101 commented 3 years ago

it would be great if this plugin would work on 1.17

mentaldaveuk commented 3 years ago

Have you tried installing it and see if it works for 1.17 if so what errors are you getting?

SoraFL commented 3 years ago

Pls... update to 1.17 Is there a plan if and when an update could come?

On PaperMC 1.17: 22.06 22:38:25 [Server] ERROR Error occurred while enabling DiscordWhitelister v1.4.7 (Is it up to date?) 22.06 22:38:25 [Server] INFO java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "java.util.List.get(int)" is null 22.06 22:38:25 [Server] INFO at uk.co.angrybee.joe.DiscordWhitelister.InitBot(DiscordWhitelister.java:211) ~[?:?]

Hoping that a 1.17 update is on the way; very keen to use this plugin but current version doesn't work on this update

AD-Wright commented 3 years ago

Is this just a Java 16 issue? I say "just", but I guess that could mean a rewrite...

Shimell commented 3 years ago

Can anyone else here reproduce the error @SoraFL is getting? I updated my dev server to 1.17 (PaperMC) and also updated my java to version 16 and it still seems to be working correctly. @SoraFL I'm not sure why/how you are getting this error but it seems to be related with trying to read add-remove-roles in the config, could you double check that it is correct?

@mondmann3101, did you test the plugin on 1.17? If you got any errors post them here and I can take a look.

SoraFL commented 3 years ago

Here is a complete excerpt from the log from my server start from 4 a.m. this morning:

`[04:00:31] [Server thread/INFO]: [DiscordWhitelister] Enabling DiscordWhitelister v1.4.7*

[04:00:31] [Server thread/INFO]: [DiscordWhitelister] Initializing Discord client...

[04:00:31] [Server thread/ERROR]: Error occurred while enabling DiscordWhitelister v1.4.7 (Is it up to date?) java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "java.util.List.get(int)" is null at uk.co.angrybee.joe.DiscordWhitelister.InitBot(DiscordWhitelister.java:211) ~[?:?] at uk.co.angrybee.joe.DiscordWhitelister.onEnable(DiscordWhitelister.java:60) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.17.jar:git-Paper-53] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.jar:git-Paper-53] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.jar:git-Paper-53] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:518) ~[patched_1.17.jar:git-Paper-53] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:432) ~[patched_1.17.jar:git-Paper-53] at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:643) ~[patched_1.17.jar:git-Paper-53] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:304) ~[patched_1.17.jar:git-Paper-53] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1118) ~[patched_1.17.jar:git-Paper-53] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[patched_1.17.jar:git-Paper-53] at java.lang.Thread.run(Thread.java:831) [?:?]

[04:00:31] [Server thread/INFO]: [DiscordWhitelister] Disabling DiscordWhitelister v1.4.7

[04:00:31] [Server thread/ERROR]: Error occurred while disabling DiscordWhitelister v1.4.7 (Is it up to date?) java.lang.NullPointerException: Cannot invoke "uk.co.angrybee.joe.shaded.net.dv8tion.jda.api.JDA.shutdownNow()" because "uk.co.angrybee.joe.DiscordClient.javaDiscordAPI" is null at uk.co.angrybee.joe.DiscordWhitelister.onDisable(DiscordWhitelister.java:92) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:265) ~[patched_1.17.jar:git-Paper-53] at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:405) ~[patched_1.17.jar:git-Paper-53] at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:533) ~[patched_1.17.jar:git-Paper-53] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:374) ~[patched_1.17.jar:git-Paper-53] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.jar:git-Paper-53] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:518) ~[patched_1.17.jar:git-Paper-53] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:432) ~[patched_1.17.jar:git-Paper-53] at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:643) ~[patched_1.17.jar:git-Paper-53] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:304) ~[patched_1.17.jar:git-Paper-53] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1118) ~[patched_1.17.jar:git-Paper-53] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[patched_1.17.jar:git-Paper-53] at java.lang.Thread.run(Thread.java:831) [?:?] `

When I started the server, I used PaperMC version 1.17-53. If the problem is not so easy to understand, then it does not seem to be due to the plugin itself but to me? Maybe some kind of incompatibility with another plugin? I added the "DiscordSRV" as a plugin, which I use to couple with the ingame chat in a Discordchannel. This works by the way. But can it be that the two plugins together lead to the problem? I will try to start the whitelister together with the same PaperMC on another server and see if I get the error as well and then, if necessary, pull the other plug-in and see from what point in time the error occurs. Then I will report here again. however, it may take a day or two to complete the test. But I will try to do this as soon as possible.

Xyntexx commented 2 years ago

Probably fixed in the next release.