package de.teleportsuite.commands;
import de.teleportsuite.TeleportSuite;
import org.bukkit.command.*;
import org.bukkit.entity.Player;
public class SetSpawnCommand implements CommandExecutor {
    private final TeleportSuite plugin;
    public SetSpawnCommand(TeleportSuite p) { this.plugin = p; }
    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (!(sender instanceof Player)) { sender.sendMessage("§cNur für Spieler!"); return true; }
        if (!sender.hasPermission("teleportsuite.setspawn")) { sender.sendMessage(plugin.getConfigManager().getMessage("no-permission")); return true; }
        plugin.getSpawnManager().setSpawn((Player) sender);
        return true;
    }
}
