26 lines
937 B
Java
26 lines
937 B
Java
package de.polyfish0.survivalGames.commands;
|
|
|
|
import de.polyfish0.survivalGames.annotations.Command;
|
|
import de.polyfish0.survivalGames.annotations.Permission;
|
|
import de.polyfish0.survivalGames.gui.GuiManager;
|
|
import de.polyfish0.survivalGames.gui.menus.MainMenu;
|
|
import org.bukkit.command.CommandExecutor;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.entity.Player;
|
|
|
|
@Command(command = "sg")
|
|
@Permission(permission = "survivalgames.admin")
|
|
public class SurvivalGamesCommand implements CommandExecutor {
|
|
@Override
|
|
public boolean onCommand(CommandSender sender, org.bukkit.command.Command command, String label, String[] args) {
|
|
if(!(sender instanceof Player)) {
|
|
sender.sendMessage("[Survival Games] You has to be a player to use this command!");
|
|
return true;
|
|
}
|
|
|
|
GuiManager.getInstance().openNewInventory((Player) sender, MainMenu.class);
|
|
|
|
return true;
|
|
}
|
|
}
|