@Override
	public boolean onCommand(CommandSender sender, Command label,
			String string, String[] args) {
		if (string.equalsIgnoreCase("explode")) {
			if (!(sender instanceof Player)) {
				MainClass.getLogger().info("That is a player only command!");
				return false;
			} else if (sender instanceof Player) {
				blockdrop = MainClass.getConfig().getBoolean("dropblocks");
				Player player = (Player) sender;
				theplayer = player;
				if (player.hasPermission("explosionman.explode")
						|| player.isOp()) {
					Location pLocation = player.getLocation();
					double pX = pLocation.getX();
					double pY = pLocation.getY();
					double pZ = pLocation.getZ();
					World w = player.getWorld();
					if (blockdrop) {
						if (args.length == 0) {
							doDrop = true;
							if (MainClass.getConfig().getBoolean("explodemsg")) {
								String explodemsg = MainClass
										.getConfig()
										.getString("explodetext")
										.replaceAll("(&([a-f0-9]))", "\u00A7$2");
								player.sendMessage(explodemsg);
							}
							god = true;
							w.createExplosion(
									pX,
									pY,
									pZ,
									MainClass.getConfig()
											.getInt("explodepower"),
									MainClass.getConfig().getBoolean(
											"explodefire"),
									MainClass.getConfig().getBoolean(
											"explodeblocks"));
							if (player
									.hasPermission("explosionman.explodelightning")) {
								w.strikeLightningEffect(pLocation);
							}
							doDrop = false;
							god = false;
						} else if (args.length == 1) {
							try {
								@SuppressWarnings("unused")
								float explosionPower = Float
										.parseFloat(args[0]);
							} catch (NumberFormatException e) {
								player.sendMessage(ChatColor.RED
										+ "The proper use is " + ChatColor.AQUA
										+ "/explode [number]");
								return false;
							}
							float explosionPower = Float.parseFloat(args[0]);
							if (explosionPower > MainClass.getConfig().getInt(
									"explodebigpower")) {
								if (player
										.hasPermission("explosionman.explodebig")
										|| player.isOp()) {
								} else {
									player.sendMessage(ChatColor.RED
											+ "You don't have permission to create such a large explosion!");
									return false;
								}
							}
							if (MainClass.getConfig().getBoolean("explodemsg")) {
								String explodemsg = MainClass
										.getConfig()
										.getString("explodetext")
										.replaceAll("(&([a-f0-9]))", "\u00A7$2");
								player.sendMessage(explodemsg);
							}
							god = true;
							doDrop = true;
							w.createExplosion(
									pX,
									pY,
									pZ,
									explosionPower,
									MainClass.getConfig().getBoolean(
											"explodefire"),
									MainClass.getConfig().getBoolean(
											"explodeblocks"));
							doDrop = false;
							god = false;
							if (player
									.hasPermission("explosionman.explodelightning")) {
								w.strikeLightningEffect(pLocation);
							}
						} else if (args.length > 1) {
							player.sendMessage(ChatColor.RED
									+ "The proper use is " + ChatColor.AQUA
									+ "/explode [number]");
						}
						else if(!blockdrop){
							if (args.length == 0) {
								if(MainClass.getConfig().getBoolean("explodemsg")){
									String explodemsg = MainClass.getConfig().getString("explodetext").replaceAll("(&([a-f0-9]))", "\u00A7$2");
									player.sendMessage(explodemsg);
								}
								god = true;
								w.createExplosion(pX, pY, pZ, MainClass.getConfig().getInt("explodepower"),MainClass.getConfig().getBoolean("explodefire"), MainClass.getConfig().getBoolean("explodeblocks") );
								if(player.hasPermission("explosionman.explodelightning")){
									w.strikeLightningEffect(pLocation);
								}
								god = false;
							} else if (args.length == 1) {
								try {
									@SuppressWarnings("unused")
									float explosionPower = Float.parseFloat(args[0]);
								} catch (NumberFormatException e) {
									player.sendMessage(ChatColor.RED + "The proper use is "
											+ ChatColor.AQUA + "/explode [number]");
									return false;
								}
								float explosionPower = Float.parseFloat(args[0]);
								if (explosionPower > MainClass.getConfig().getInt("explodebigpower")) {
									if (player.hasPermission("explosionman.explodebig") || player.isOp()) {
									} else {
										player.sendMessage(ChatColor.RED
												+ "You don't have permission to create such a large explosion!");
										return false;
									}
								}
								if(MainClass.getConfig().getBoolean("explodemsg")){
									String explodemsg = MainClass.getConfig().getString("explodetext").replaceAll("(&([a-f0-9]))", "\u00A7$2");
									player.sendMessage(explodemsg);
								}
								god = true;
								w.createExplosion(pX, pY, pZ,explosionPower ,MainClass.getConfig().getBoolean("explodefire"), MainClass.getConfig().getBoolean("explodeblocks") );
								god = false;
								if(player.hasPermission("explosionman.explodelightning")){
									w.strikeLightningEffect(pLocation);
								}
							}
							else if(args.length > 1){
								player.sendMessage(ChatColor.RED + "The proper use is "
										+ ChatColor.AQUA + "/explode [number]");
							}

						} else {
							player.sendMessage(ChatColor.RED + "You cannot explode!");
						}
					} else {
						player.sendMessage(ChatColor.RED
								+ "You cannot explode!");
					}
					
					return false;
				}
			}
			return false;

		}
		return false;

	}