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> </goals>
<configuration> <configuration>
<artifactSet> <artifactSet>
<includes> <excludes>
<include>com.github.austinv11:Discord4J</include> <exclude>org.spigotmc:spigot-api</exclude>
</includes> </excludes>
</artifactSet> </artifactSet>
<pluginExecution> <pluginExecution>
<action> <action>

View file

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