package de.teleportsuite.commands;

import de.teleportsuite.TeleportSuite;
import org.bukkit.command.*;
import org.bukkit.entity.Player;

public class TpDenyCommand implements CommandExecutor {
    private final TeleportSuite plugin;
    public TpDenyCommand(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; }
        Player p = (Player) sender;
        if (!plugin.getTeleportManager().denyTpa(p))
            p.sendMessage("§cKeine ausstehende Teleportanfrage.");
        return true;
    }
}
