File tree Expand file tree Collapse file tree 5 files changed +18
-6
lines changed
java/me/joshb/discordbotapi Expand file tree Collapse file tree 5 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 66
77 <groupId >me.Joshb</groupId >
88 <artifactId >DiscordBotAPI</artifactId >
9- <version >1.1.0 </version >
9+ <version >1.1.1 </version >
1010
1111 <build >
1212 <sourceDirectory >src/main/java</sourceDirectory >
Original file line number Diff line number Diff line change 33import me .joshb .discordbotapi .Permission ;
44import me .joshb .discordbotapi .bungee .DiscordBotAPI ;
55import me .joshb .discordbotapi .bungee .assets .Assets ;
6+ import me .joshb .discordbotapi .bungee .config .Config ;
67import net .dv8tion .jda .api .entities .User ;
78import net .md_5 .bungee .api .CommandSender ;
89import net .md_5 .bungee .api .connection .ProxiedPlayer ;
@@ -19,8 +20,10 @@ public class CommandManager extends Command {
1920 private List <DiscordCommand > commands = new ArrayList <>();
2021
2122 public void initializeSubCommands (){
22- commands .add (new CommandLink ());
23- commands .add (new CommandUnlink ());
23+ if (Config .getInstance ().getConfig ().getBoolean ("Account-Manager" )) {
24+ commands .add (new CommandLink ());
25+ commands .add (new CommandUnlink ());
26+ }
2427 }
2528
2629 public void execute (CommandSender sender , String [] args ) {
Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ public void initialize(){
4949 } catch (IOException e ){
5050 e .printStackTrace ();
5151 }
52+ if (!config .contains ("Account-Manager" )){
53+ config .set ("Account-Manager" , true );
54+ save ();
55+ }
5256 }
5357 public void save () {
5458 try {
Original file line number Diff line number Diff line change 33import me .joshb .discordbotapi .server .DiscordBotAPI ;
44import me .joshb .discordbotapi .server .assets .Assets ;
55import me .joshb .discordbotapi .Permission ;
6+ import me .joshb .discordbotapi .server .config .Config ;
67import net .dv8tion .jda .api .entities .User ;
78import org .bukkit .command .Command ;
89import org .bukkit .command .CommandExecutor ;
@@ -18,8 +19,10 @@ public class CommandManager implements CommandExecutor {
1819 private List <DiscordCommand > commands = new ArrayList <>();
1920
2021 public void initializeSubCommands (){
21- commands .add (new CommandLink ());
22- commands .add (new CommandUnlink ());
22+ if (Config .getInstance ().getConfig ().getBoolean ("Account-Manager" )){
23+ commands .add (new CommandLink ());
24+ commands .add (new CommandUnlink ());
25+ }
2326 }
2427
2528 @ Override
Original file line number Diff line number Diff line change 11Bot :
22 Token : " token_here"
3- Command-Prefix : " !ticketgui"
3+ Command-Prefix : " !ticketgui"
4+ # Enabling/Disabling this setting will determine if /dm link and /dm unlink commands will be registered.
5+ Account-Manager : true
You can’t perform that action at this time.
0 commit comments