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
Admincraft Meta
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
QarthO
QarthO2y ago
Can u post the full logs to mclogs? !logs
Carl-bot
Carl-bot2y ago
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
stella
stellaOP2y ago
did i do this right https://mclo.gs/lbMYkz0
mclo.gs
Fabric 1.20.1 Server Log [#lbMYkz0]
123 lines | 1 error
Auster
Auster2y ago
maybe you misconfigured something in MCDC? seems like it can't find some value
stella
stellaOP2y ago
according to chatgpt, which i also sent my config file to, it says theres something wrong with the code but i highly doubt that
Snow Kit
Snow Kit2y ago
line 107 is Objects.requireNonNull(CHANNEL).getGuild().retrieveWebhooks().complete() so likely your webhook is invalid
stella
stellaOP2y ago
i have webhook set to false :(
Auster
Auster2y ago
it probably needs a valid webhook and not false which is why it cant find it
Snow Kit
Snow Kit2y ago
^^
stella
stellaOP2y ago
idk i think the documentation said it was optional but ill try that
Snow Kit
Snow Kit2y ago
it might be that your discord token is invalid or the channel id you set is wrong? it might need the manage webhook permission?
stella
stellaOP2y ago
it has administrator i believe
Auster
Auster2y ago
it seems like it would not need the webhook... checked docs too
stella
stellaOP2y ago
im trying the webhook thoo
Snow Kit
Snow Kit2y ago
then most likely the channel is incorrect
stella
stellaOP2y ago
mmm ok gasp i think its working!!
Auster
Auster2y ago
prays
stella
stellaOP2y ago
IT WORKED

Did you find this page helpful?