java.lang.NullPointerException
I'm running a Semi-Vanilla SMP, and I'm working on setting up MCDiscordChat. I thought I had it all set up right, however I keep running into this error (java.lang.NullPointerException) followed by-
at java.base/java.util.Objects.requireNonNull(Objects.java:209)
at top.xujiayao.mcdiscordchat.Main.onInitializeServer(Main.java:107)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63)
at net.minecraft.server.Main.main(Main.java:112)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23)
at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69)
Any help would be greatly appreciated!
19 Replies
Thanks for asking your question!
Once you have finished, please close your thread.
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
command to close
/close
!close
!solved
Requested by stel1q#0
Can u post the full logs to mclogs?
!logs
Please check your server log for errors from your plugins.
If you need further help understanding the errors, please send us the whole log file.
Where can I find the server log?
Logs are stored in
<server_directory>/logs/
. Search for a file explorer in your server's management interface and navigate to that directory. Once you've opened that up, search for the latest.log
file. Some providers have a separate page for logs and may hide the "logs" folder.
On Aternos:
• Go to https://aternos.org/log/.
On Minehut and server.pro:
• Go to the "files" tab in the left menu.
• Navigate to the root directory of your server.
• From there navigate to /logs/latest.log
.
What should I do with the log?
• First of all, read it! I mean, that's what you do all the time when you run a server, isn't it? Try to locate any errors that have anything to do with the issue you are facing.
• If you got the latest.log
file or created a .txt
file with the necessary errors you can upload these directly to the channel, but we prefer if you upload them to https://mclo.gs/.
• If you have trouble downloading the log file, copy/paste the text to a paste service (like mclogs). Copy the link that it gives you and send it to us. (Don't worry, McLogs hides your users' IPs.)Admincraft Canned Responses
did i do this right
https://mclo.gs/lbMYkz0
maybe you misconfigured something in MCDC? seems like it can't find some value
according to chatgpt, which i also sent my config file to, it says theres something wrong with the code
but i highly doubt that
line 107 is
Objects.requireNonNull(CHANNEL).getGuild().retrieveWebhooks().complete()
so likely your webhook is invalidi have webhook set to false :(
it probably needs a valid webhook
and not false
which is why it cant find it
^^
idk i think the documentation said it was optional but ill try that
it might be that your discord token is invalid or the channel id you set is wrong?
it might need the manage webhook permission?
it has administrator i believe
it seems like it would not need the webhook... checked docs too
im trying the webhook thoo
then most likely the channel is incorrect
mmm ok
gasp i think its working!!
prays
IT WORKED