mirror of
https://github.com/songoda/EpicHeads.git
synced 2025-01-25 00:31:20 +01:00
83a77b3578
Replaced localization system with mine.
39 lines
979 B
Java
39 lines
979 B
Java
package com.songoda.epicheads.command.commands;
|
|
|
|
import com.songoda.epicheads.EpicHeads;
|
|
import com.songoda.epicheads.command.AbstractCommand;
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
public class CommandReload extends AbstractCommand {
|
|
|
|
public CommandReload(AbstractCommand parent) {
|
|
super("reload", parent, false);
|
|
}
|
|
|
|
@Override
|
|
protected ReturnType runCommand(EpicHeads instance, CommandSender sender, String... args) {
|
|
if (args.length != 1) return ReturnType.SYNTAX_ERROR;
|
|
|
|
EpicHeads.getInstance().reloadConfigs();
|
|
|
|
sender.sendMessage(instance.getLocale().getMessage("command.reload.success"));
|
|
return ReturnType.SUCCESS;
|
|
}
|
|
|
|
|
|
@Override
|
|
public String getPermissionNode() {
|
|
return "epicheads.reload";
|
|
}
|
|
|
|
@Override
|
|
public String getSyntax() {
|
|
return "/heads reload";
|
|
}
|
|
|
|
@Override
|
|
public String getDescription() {
|
|
return "Reload the Heads config files.";
|
|
}
|
|
}
|