@Override
	public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
		if(label.equalsIgnoreCase("TR") || label.equalsIgnoreCase("Tntrun")){
			if(sender instanceof Player){
				if(sender.isOp() || sender.hasPermission("TR.*")){
					if(args.length == 2){
						if(args[0].equalsIgnoreCase("create")){
							if(args[1].equalsIgnoreCase("arena")){
								if(plugin.l.getSpawn() == null){
									sender.sendMessage("You need to create a spawn point for lobby before creating an arena");
								} else {
									if(plugin.l.getSpawn().getWorld().equals(((Player) sender).getLocation().getWorld()))
										sender.sendMessage("You can't create an arena in lobby world");
									else {
										int i = ArenaManager.getManager().createArena();
										sender.sendMessage("The arena with id " + i + " has been created");
									}
									
								}
								return true;
							}else if(args[1].equalsIgnoreCase("lobby")){
								plugin.l.setSpawn(((Player) sender).getLocation());
								sender.sendMessage("The lobby has been created at your location");
								return true;
							}
						}
						if(args[0].equalsIgnoreCase("setspawn") 
								&& Util.isNumeric(args[1]) 
								&& ArenaManager.getManager().getArena(Integer.parseInt(args[1])) != null){
							Arena a = ArenaManager.getManager().getArena(Integer.parseInt(args[1]));
							a.setSpawn(((Player) sender).getLocation());
							sender.sendMessage("Created spawn for Arena " + args[1]);
							return true;
						} else {
							sender.sendMessage("Incorrect format. Use /tr setspawn <Arena id> <spawn id>");
						}
					}
				}
			}
		}
		return false;
	}