This commit is contained in:
Norbi Peti 2016-09-17 22:20:43 +02:00
parent ef5aab8a92
commit 842f8a63b7
2 changed files with 135 additions and 135 deletions

View file

@ -52,9 +52,9 @@
</goals>
<configuration>
<artifactSet>
<includes>
<include>com.github.austinv11:Discord4J</include>
</includes>
<excludes>
<exclude>org.spigotmc:spigot-api</exclude>
</excludes>
</artifactSet>
<pluginExecution>
<action>

View file

@ -5,7 +5,7 @@ import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import com.google.common.base.Charsets;
import sx.blah.discord.api.ClientBuilder;
import sx.blah.discord.api.*;
/**
* Hello world!
@ -17,8 +17,8 @@ public class DiscordPlugin extends JavaPlugin {
try {
Bukkit.getLogger().info("Initializing DiscordPlugin...");
ClientBuilder cb = new ClientBuilder();
cb.withToken(IOUtils.toString(getClass().getResourceAsStream("Token.txt"), Charsets.UTF_8));
cb.login();
cb.withToken(IOUtils.toString(getClass().getResourceAsStream("/Token.txt"), Charsets.UTF_8));
IDiscordClient dc = cb.login();
} catch (Exception e) {
e.printStackTrace();
Bukkit.getPluginManager().disablePlugin(this);