@Override
	public boolean onCommand(CommandSender sender, Command cmd, String string,
			String[] args) {
		if (string.equalsIgnoreCase("leap")) {
			if(!(sender instanceof Player)){
				MainClass.getLogger().info("That is a player only command!");
				return false;
			}
		else if(sender instanceof Player){
			Player player = (Player) sender;
			theplayer = player;
			Location pLocation = player.getLocation();
			double pX = pLocation.getX();
			double pY = pLocation.getY();
			double pZ = pLocation.getZ();
			World world = player.getWorld();
			if(player.hasPermission("explosionman.leap")){
			if (args.length == 0) {
				god = true;
				if(MainClass.getConfig().getBoolean("leapmsg")){
					String explodemsg = MainClass.getConfig().getString("leaptxt").replaceAll("(&([a-f0-9]))", "\u00A7$2");
					player.sendMessage(explodemsg);
				}
				if (MainClass.getConfig().getBoolean("leapexlpode")) {
					world.createExplosion(pX, pY, pZ, MainClass.getConfig().getInt("fexplodepower"),MainClass.getConfig().getBoolean("fexplodefire"), MainClass.getConfig().getBoolean("fexplodeblocks") );
				}
				player.setVelocity(player.getEyeLocation().getDirection()
						.multiply(MainClass.getConfig().getInt("leapdefault")));
				god = false;
				damagecount = 0;
				BukkitScheduler scheduler = Bukkit.getServer()
						.getScheduler();
				id = scheduler.scheduleSyncRepeatingTask(MainClass,
						new Runnable() {
							@Override
							public void run() {
								damagecount++;
								doDamage = true;
								if (damagecount == 10) {
									damagecount = 0;
									doDamage = false;
									Bukkit.getScheduler()
											.cancelTask(id);
								}

							}

						}, 0, 20L);

			} else if (args.length == 1) {
				try {
					Integer.parseInt(args[0]);
				} catch (NumberFormatException c) {
					player.sendMessage(ChatColor.RED + "The proper use is "
							+ ChatColor.AQUA + "/leap [number]");
					return false;
				}
				
				if(Integer.parseInt(args[0]) > 10){
					player.sendMessage(ChatColor.RED + "Maximum number is 10");
					return false;
				}
				if(MainClass.getConfig().getBoolean("leapmsg")){
					String explodemsg = MainClass.getConfig().getString("leaptxt").replaceAll("(&([a-f0-9]))", "\u00A7$2");
					player.sendMessage(explodemsg);
				}
				if (MainClass.getConfig().getBoolean("leapexlpode")) {
					god = true;
					world.createExplosion(pX, pY, pZ, MainClass.getConfig().getInt("leapstartpower"),MainClass.getConfig().getBoolean("leapfire"), MainClass.getConfig().getBoolean("leapblocks") );
					god = false;
					damagecount = 0;
					BukkitScheduler scheduler = Bukkit.getServer()
							.getScheduler();
					id2 = scheduler.scheduleSyncRepeatingTask(MainClass,
							new Runnable() {
								@Override
								public void run() {
									damagecount++;
									doDamage = true;
									if (damagecount == 10) {
										damagecount = 0;
										doDamage = false;
										Bukkit.getScheduler()
												.cancelTask(id2);
									}

								}

							}, 0, 20L);
				}
				player.setVelocity(player.getEyeLocation().getDirection()
						.multiply(Integer.parseInt(args[0])));
				
			}
		}
			else{
				player.sendMessage(ChatColor.RED + "You cannot leap!");}
		}
			}
return false;
}