Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
added config
Browse files Browse the repository at this point in the history
  • Loading branch information
PolarianDev committed Jan 11, 2022
1 parent f73a186 commit 2a79e65
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.gradle
.idea
.idea
build
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'com.github.craftTogether'
version = '1.0-SNAPSHOT-2'
version = '1.0-SNAPSHOT-4'

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/crafttogether/kelp/Kelp.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static Kelp getInstance() {
}

public void connect() throws LoginException, InterruptedException {
jda = JDABuilder.createLight(Plugin.get("token"))
jda = JDABuilder.createLight(Plugin.getPlugin().getConfig().getString("token"))
.addEventListeners(INSTANCE)
.build()
.awaitReady();
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/github/crafttogether/kelp/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public void onDisable() {
Kelp.getInstance().disconnect();
}

public static String get(String key) {
return plugin.getConfig().getString(key);
public static JavaPlugin getPlugin() {
return plugin;
}

}
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
token: discord_token # Discord token

0 comments on commit 2a79e65

Please sign in to comment.