discord client
This commit is contained in:
parent
1c053d819d
commit
ccebf56b67
3 changed files with 33 additions and 1 deletions
5
pom.xml
5
pom.xml
|
@ -114,5 +114,10 @@
|
|||
<!-- <classifier>remapped-mojang</classifier>-->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.dv8tion</groupId>
|
||||
<artifactId>JDA</artifactId>
|
||||
<version>5.0.0-alpha.13</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package com.night.nullvalkyrie.Discord;
|
||||
import net.dv8tion.jda.api.JDA;
|
||||
import net.dv8tion.jda.api.JDABuilder;
|
||||
import net.dv8tion.jda.api.entities.Activity;
|
||||
|
||||
import javax.security.auth.login.LoginException;
|
||||
|
||||
|
||||
public class DiscordClientManager {
|
||||
private JDA jda;
|
||||
public DiscordClientManager() {
|
||||
register();
|
||||
}
|
||||
public void register() {
|
||||
JDABuilder builder = JDABuilder.createDefault("OTk3ODczMzgyNjM0ODM2MDQ5.GTalga.2uMZE-S0t2yL-3jsglrpG9lMbIHHBMAedVZA4U");
|
||||
builder.setActivity(Activity.streaming("cath.exe", "https://www.youtube.com/watch?v=YSKDu1gKntY"));
|
||||
try {
|
||||
jda = builder.build();
|
||||
} catch (LoginException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package com.night.nullvalkyrie;
|
||||
|
||||
import com.night.nullvalkyrie.Chests.MenuListener;
|
||||
import com.night.nullvalkyrie.Discord.DiscordClientManager;
|
||||
import com.night.nullvalkyrie.Enchantments.EnchantmentManager;
|
||||
import com.night.nullvalkyrie.Events.CustomItemEvents;
|
||||
import com.night.nullvalkyrie.Items.CustomItemManager;
|
||||
|
@ -24,7 +25,6 @@ import java.io.File;
|
|||
public final class Main extends JavaPlugin implements Listener {
|
||||
private BossBar bossbar;
|
||||
private CustomItemManager customItemManager;
|
||||
|
||||
public CustomItemManager getCustomItemManager() {
|
||||
return customItemManager;
|
||||
}
|
||||
|
@ -52,6 +52,8 @@ public final class Main extends JavaPlugin implements Listener {
|
|||
Bukkit.getPluginManager().registerEvents(new CustomItemEvents(this), this);
|
||||
Bukkit.getPluginManager().registerEvents(new SpawnCommand(this), this);
|
||||
new EnchantmentManager();
|
||||
new DiscordClientManager();
|
||||
|
||||
customItemManager = new CustomItemManager(this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue