Skip to content

Commit f8ae779

Browse files
committed
Make it possible to get the version even though the plugin is not enabled.
1 parent 3d3be6c commit f8ae779

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/main/java/de/themoep/BungeeResourcepacks/bungee/BungeeResouecepacksCommand.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ public BungeeResouecepacksCommand(BungeeResourcepacks plugin, String name, Strin
1515

1616
@Override
1717
public void execute(CommandSender sender, String[] args) {
18-
if(!BungeeResourcepacks.getInstance().enabled) {
19-
sender.sendMessage(ChatColor.RED + "BungeeResourcepacks is not enabled!");
20-
return;
21-
}
22-
2318
if (args.length == 1) {
2419
if(args[0].equalsIgnoreCase("reload")) {
20+
if(!BungeeResourcepacks.getInstance().enabled) {
21+
sender.sendMessage(ChatColor.RED + "BungeeResourcepacks is not enabled!");
22+
return;
23+
}
2524
BungeeResourcepacks.getInstance().reloadConfig();
2625
sender.sendMessage(ChatColor.GREEN + "Reloaded BungeeResourcepacks' config!");
2726
return;
@@ -30,7 +29,6 @@ public void execute(CommandSender sender, String[] args) {
3029
return;
3130
}
3231
}
33-
3432
sender.sendMessage("Usage: /brp [reload|version]");
3533
}
3634
}

0 commit comments

Comments
 (0)