DiscordSRV

DiscordSRV

86.8k Downloads

DiscordSRV is not supported on Java 9

PenguinNexus opened this issue ยท 3 comments

commented

Hello there.

I've found that the plugin is not compatible when running Java 9.

When running /discord debug I get the following:

>discord debug
[15:12:47 WARN]: java.lang.reflect.InvocationTargetException
[15:12:47 WARN]:        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[15:12:47 WARN]:        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[15:12:47 WARN]:        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[15:12:47 WARN]:        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[15:12:47 WARN]:        at github.scarsz.discordsrv.objects.managers.CommandManager.handle(CommandManager.java:104)
[15:12:47 WARN]:        at github.scarsz.discordsrv.DiscordSRV.onCommand(DiscordSRV.java:576)
[15:12:47 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
[15:12:47 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
[15:12:47 WARN]:        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:648)
[15:12:47 WARN]:        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:634)
[15:12:47 WARN]:        at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:444)
[15:12:47 WARN]:        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:407)
[15:12:47 WARN]:        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
[15:12:47 WARN]:        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
[15:12:47 WARN]:        at java.base/java.lang.Thread.run(Thread.java:844)
[15:12:47 WARN]: Caused by: java.lang.ExceptionInInitializerError
[15:12:47 WARN]:        at github.scarsz.discordsrv.util.DebugUtil.run(DebugUtil.java:57)
[15:12:47 WARN]:        at github.scarsz.discordsrv.commands.CommandDebug.execute(CommandDebug.java:33)
[15:12:47 WARN]:        ... 15 more
[15:12:47 WARN]: Caused by: java.lang.NullPointerException
[15:12:47 WARN]:        at github.scarsz.discordsrv.util.DiscordUtil.<clinit>(DiscordUtil.java:106)
[15:12:47 WARN]:        ... 17 more
[15:12:57 INFO]: Stopping server

And when stopping the server:

[15:03:46 INFO]: [DiscordSRV] Disabling DiscordSRV v16.0
[15:03:46 ERROR]: Error occurred while disabling DiscordSRV v16.0 (Is it up to date?)
java.lang.ExceptionInInitializerError: null
        at github.scarsz.discordsrv.DiscordSRV.onDisable(DiscordSRV.java:538) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[spigot-1.12.2.jar:git-Spigot-7862817-bd30843]
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:361) [spigot-1.12.2.jar:git-Spigot-7862817-bd30843]
        at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:422) [spigot-1.12.2.jar:git-Spigot-7862817-bd30843]
        at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:415) [spigot-1.12.2.jar:git-Spigot-7862817-bd30843]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.disablePlugins(CraftServer.java:349) [spigot-1.12.2.jar:git-Spigot-7862817-bd30843]
        at net.minecraft.server.v1_12_R1.MinecraftServer.stop(MinecraftServer.java:465) [spigot-1.12.2.jar:git-Spigot-7862817-bd30843]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:613) [spigot-1.12.2.jar:git-Spigot-7862817-bd30843]
        at java.lang.Thread.run(Thread.java:844) [?:?]
Caused by: java.lang.NullPointerException
        at github.scarsz.discordsrv.util.DiscordUtil.<clinit>(DiscordUtil.java:106) ~[?:?]
        ... 9 more
commented

This isn't really urgent, but would be good if it could be fixed for DiscordSRV 2

commented

Closing this as Java 9 is past it's end of life, use J8/11/12

commented

Please resolve this. The plugin just does not work on Java 9, so you can't use it, because some hosts have already switched to Java 9.
Click on this to see the error