EpicAnchors/EpicAnchors-Plugin/src/main/java/com/songoda/epicanchors/commands/sub/ReloadCommand.java

46 lines
1.2 KiB
Java
Raw Normal View History

2021-06-12 15:16:07 +02:00
package com.songoda.epicanchors.commands.sub;
2018-08-31 17:02:51 +02:00
import com.craftaro.core.commands.AbstractCommand;
2019-06-08 22:54:58 +02:00
import com.songoda.epicanchors.EpicAnchors;
2018-08-31 17:02:51 +02:00
import org.bukkit.command.CommandSender;
2021-06-12 15:16:07 +02:00
import java.util.Collections;
2019-09-08 23:12:28 +02:00
import java.util.List;
2021-06-12 15:16:07 +02:00
public class ReloadCommand extends AbstractCommand {
private final EpicAnchors plugin;
2018-08-31 17:02:51 +02:00
2021-06-12 15:16:07 +02:00
public ReloadCommand(EpicAnchors plugin) {
super(CommandType.CONSOLE_OK, false, "reload");
this.plugin = plugin;
2018-08-31 17:02:51 +02:00
}
@Override
2019-09-08 23:12:28 +02:00
protected ReturnType runCommand(CommandSender sender, String... args) {
this.plugin.reloadConfig();
this.plugin.getLocale().getMessage("&7Configuration and Language files reloaded.").sendPrefixedMessage(sender);
2021-06-12 15:16:07 +02:00
2018-10-08 06:42:30 +02:00
return ReturnType.SUCCESS;
}
2019-09-08 23:12:28 +02:00
@Override
protected List<String> onTab(CommandSender sender, String... args) {
2021-06-12 15:16:07 +02:00
return Collections.emptyList();
2019-09-08 23:12:28 +02:00
}
2018-10-08 06:42:30 +02:00
@Override
public String getPermissionNode() {
2021-06-12 15:16:07 +02:00
return "EpicAnchors.cmd.reload";
2018-10-08 06:42:30 +02:00
}
@Override
public String getSyntax() {
return "/ea reload";
}
@Override
public String getDescription() {
return "Reload the Configuration and Language files.";
2018-08-31 17:02:51 +02:00
}
2019-09-08 23:12:28 +02:00
}