package net.knarcraft.blacksmith.command; import net.knarcraft.blacksmith.BlacksmithPlugin; import net.knarcraft.blacksmith.formatting.BlacksmithTranslatableMessage; import net.knarcraft.knarlib.formatting.StringFormatter; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabExecutor; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.List; /** * The command for re-loading the plugin */ public class ReloadCommand implements TabExecutor { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { BlacksmithPlugin.getInstance().reload(); StringFormatter.displaySuccessMessage(sender, BlacksmithTranslatableMessage.PLUGIN_RELOADED); return true; } @Nullable @Override public List onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { return new ArrayList<>(); } }