package com.lifeknight.relaymchub.commands; import com.lifeknight.relaymchub.player.HubPlayer; import com.lifeknight.relaymcutils.player.commands.CommandUtilities; import com.lifeknight.relayutils.RelayUtils; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public class CosmeticsCommand implements CommandExecutor { @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if (!(sender instanceof Player) || !command.getName().equalsIgnoreCase("cosmetics")) { return true; } HubPlayer hubPlayer = HubPlayer.getHubPlayer((Player) sender); if (true || hubPlayer.isStaff() || RelayUtils.testing) { if (!(hubPlayer.inArena() || hubPlayer.hasParkour())) { hubPlayer.openCosmeticsGui(); } else { hubPlayer.sendErrorMessage("You cannot use this command at the time!"); } } else { CommandUtilities.sendInsufficientPermissionsMessage(sender); } return true; } }