Coding a Minecraft bot with JDA
See original GitHub issueGetting the following error:
11.07 23:10:55 [Server] INFO [UCBot] Enabling Discord Wrapper, making connection ...
11.07 23:10:55 [Server] WARN java.lang.RuntimeException: java.lang.ExceptionInInitializerError
11.07 23:10:55 [Server] WARN at net.dv8tion.jda.core.requests.RestAction.complete(RestAction.java:335)
11.07 23:10:55 [Server] WARN at net.dv8tion.jda.core.entities.impl.JDAImpl.verifyToken(JDAImpl.java:183)
11.07 23:10:55 [Server] WARN at net.dv8tion.jda.core.entities.impl.JDAImpl.login(JDAImpl.java:130)
11.07 23:10:55 [Server] WARN at net.dv8tion.jda.core.JDABuilder.buildAsync(JDABuilder.java:496)
11.07 23:10:55 [Server] WARN at de.freakyonline.ucbot.UCBot.onEnable(UCBot.java:19)
11.07 23:10:55 [Server] WARN at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264)
11.07 23:10:55 [Server] WARN at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337)
11.07 23:10:55 [Server] WARN at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:402)
11.07 23:10:55 [Server] WARN at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:378)
11.07 23:10:55 [Server] WARN at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:327)
11.07 23:10:55 [Server] WARN at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:421)
11.07 23:10:55 [Server] WARN at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:382)
11.07 23:10:55 [Server] WARN at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:337)
11.07 23:10:55 [Server] WARN at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272)
11.07 23:10:55 [Server] WARN at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:544)
11.07 23:10:55 [Server] WARN at java.lang.Thread.run(Thread.java:748)
11.07 23:10:55 [Server] WARN Caused by: java.lang.ExceptionInInitializerError
11.07 23:10:55 [Server] WARN at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:144)
11.07 23:10:55 [Server] WARN at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.getDefaultRegistry(PoolingHttpClientConnectionManager.java:109)
11.07 23:10:55 [Server] WARN at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:116)
11.07 23:10:55 [Server] WARN at com.mashape.unirest.http.options.Options.refresh(Options.java:72)
11.07 23:10:55 [Server] WARN at com.mashape.unirest.http.options.Options.<clinit>(Options.java:46)
11.07 23:10:55 [Server] WARN at com.mashape.unirest.http.HttpClientHelper.prepareRequest(HttpClientHelper.java:151)
11.07 23:10:55 [Server] WARN at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:131)
Here the code:
try {
JDA jda = new JDABuilder(AccountType.BOT)
.setToken("myToken")
.addEventListener(new UCBotDiscordListener())
.buildAsync();
} catch (Exception ex) {
ex.printStackTrace();
}
Can you help me fix this? Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Discord Bot API - JDA | SpigotMC - High Performance Minecraft
This is an API to use for making discord bots. You can run this alongside your Minecraft server to make making a discord...
Read more >java - How to configure slf4j (for JDA) to work with log4j (for ...
I'm making plugin for Minecraft - 'Paper' exactly. And it uses JDA for Discord bot function. The problem is, Minecraft(Paper) uses log4j as ......
Read more >jda | BuiltByBit (MC-Market)
Custom Bot ✨ Minecraft & Web Integration Cheap · ByteException · Thread · Dec 11, 2021 · cheap discord bot discordjs java javascript...
Read more >Why isn't this Discord bot sending a message? | Hypixel
I have a Discord bot using JDA. Rn i just want it to say E after ... You can also directly put the...
Read more >Why is Java bad for programming a bot? : r/Discord_Bots
Is the JDA Library (Java Discord API) missing functionality? And/or is the Java language itself bad for bots? If yes, why?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey DOOMRise1,
on https://github.com/DV8FromTheWorld/JDA/releases you can download the jar file.
I advice the folloing file:
HOW TO DOWNLOAD JDA.JAR?? ???