Fixing some issues with reloading

This commit is contained in:
nossr50
2019-06-16 05:57:52 -07:00
parent 2d1472b913
commit 726369077e
5 changed files with 94 additions and 41 deletions

View File

@@ -11,6 +11,13 @@ import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
public class ReloadCommand implements CommandExecutor {
private mcMMO plugin;
public ReloadCommand(mcMMO plugin) {
this.plugin = plugin;
}
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (sender instanceof Player) {
@@ -19,8 +26,9 @@ public class ReloadCommand implements CommandExecutor {
}
Bukkit.broadcastMessage(LocaleLoader.getString("Commands.Reload.Start"));
mcMMO.getConfigManager().reloadConfigs();
plugin.reload();
Bukkit.broadcastMessage(LocaleLoader.getString("Commands.Reload.Finished"));
return true;
}
}