Hub / src / main / java / com / lifeknight / relaymchub / commands / queue / ReQueueCommand.java
ReQueueCommand.java
Raw
package com.lifeknight.relaymchub.commands.queue;

import com.lifeknight.relaymchub.player.HubPlayer;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class ReQueueCommand implements CommandExecutor {
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player) || !command.getName().equalsIgnoreCase("requeue")) {
            return true;
        }

        HubPlayer.getHubPlayer((Player) sender).reQueue();
        return true;
    }
}