44 lines
1.1 KiB
Java
44 lines
1.1 KiB
Java
package com.songoda.ultimatemoderation.commands;
|
|
|
|
import com.craftaro.core.commands.AbstractCommand;
|
|
import com.songoda.ultimatemoderation.UltimateModeration;
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import java.util.List;
|
|
|
|
public class CommandReload extends AbstractCommand {
|
|
private final UltimateModeration plugin;
|
|
|
|
public CommandReload(UltimateModeration plugin) {
|
|
super(CommandType.CONSOLE_OK, "reload");
|
|
this.plugin = plugin;
|
|
}
|
|
|
|
@Override
|
|
protected ReturnType runCommand(CommandSender sender, String... args) {
|
|
this.plugin.reloadConfig();
|
|
this.plugin.getLocale().newMessage("&7Configuration and Language files reloaded.").sendPrefixedMessage(sender);
|
|
return ReturnType.SUCCESS;
|
|
}
|
|
|
|
@Override
|
|
protected List<String> onTab(CommandSender sender, String... args) {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public String getPermissionNode() {
|
|
return "um.admin";
|
|
}
|
|
|
|
@Override
|
|
public String getSyntax() {
|
|
return "/um reload";
|
|
}
|
|
|
|
@Override
|
|
public String getDescription() {
|
|
return "Reload the Configuration and Language files.";
|
|
}
|
|
}
|