mirror of
https://github.com/SunNetservers/MiniGames.git
synced 2025-04-07 04:06:25 +02:00
35 lines
1.1 KiB
Java
35 lines
1.1 KiB
Java
package net.knarcraft.minigames.command;
|
|
|
|
import net.knarcraft.minigames.MiniGames;
|
|
import net.knarcraft.minigames.config.Message;
|
|
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 reloading the plugin
|
|
*/
|
|
public class ReloadCommand implements TabExecutor {
|
|
|
|
@Override
|
|
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s,
|
|
@NotNull String[] arguments) {
|
|
MiniGames.getInstance().reload();
|
|
commandSender.sendMessage(Message.SUCCESS_PLUGIN_RELOADED.getMessage());
|
|
return true;
|
|
}
|
|
|
|
@Nullable
|
|
@Override
|
|
public List<String> onTabComplete(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s,
|
|
@NotNull String[] arguments) {
|
|
return new ArrayList<>();
|
|
}
|
|
|
|
}
|