public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr) {
    if (par2ArrayOfStr.length > 0 && par2ArrayOfStr[0].length() > 1) {
      EntityPlayerMP entityplayermp =
          MinecraftServer.getServer()
              .getConfigurationManager()
              .getPlayerForUsername(par2ArrayOfStr[0]);
      String s = "Kicked by an operator.";
      boolean flag = false;

      if (entityplayermp == null) {
        throw new PlayerNotFoundException();
      } else {
        if (par2ArrayOfStr.length >= 2) {
          s = func_82360_a(par1ICommandSender, par2ArrayOfStr, 1);
          flag = true;
        }

        entityplayermp.playerNetServerHandler.kickPlayerFromServer(s);

        if (flag) {
          notifyAdmins(
              par1ICommandSender,
              "commands.kick.success.reason",
              new Object[] {entityplayermp.getEntityName(), s});
        } else {
          notifyAdmins(
              par1ICommandSender,
              "commands.kick.success",
              new Object[] {entityplayermp.getEntityName()});
        }
      }
    } else {
      throw new WrongUsageException("commands.kick.usage", new Object[0]);
    }
  }
  /** Actually does the banning work. */
  protected void banIP(ICommandSender par1ICommandSender, String par2Str, String par3Str) {
    BanEntry banentry = new BanEntry(par2Str);
    banentry.setBannedBy(par1ICommandSender.getCommandSenderName());

    if (par3Str != null) {
      banentry.setBanReason(par3Str);
    }

    MinecraftServer.getServer().getConfigurationManager().getBannedIPs().put(banentry);
    List list = MinecraftServer.getServer().getConfigurationManager().getPlayerList(par2Str);
    String[] astring = new String[list.size()];
    int i = 0;
    EntityPlayerMP entityplayermp;

    for (Iterator iterator = list.iterator();
        iterator.hasNext();
        astring[i++] = entityplayermp.getEntityName()) {
      entityplayermp = (EntityPlayerMP) iterator.next();
      entityplayermp.playerNetServerHandler.kickPlayerFromServer("You have been IP banned.");
    }

    if (list.isEmpty()) {
      notifyAdmins(par1ICommandSender, "commands.banip.success", new Object[] {par2Str});
    } else {
      notifyAdmins(
          par1ICommandSender,
          "commands.banip.success.players",
          new Object[] {par2Str, joinNiceString(astring)});
    }
  }
  public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr) {
    if (par2ArrayOfStr.length < 2) {
      throw new WrongUsageException(this.getCommandUsage(par1ICommandSender), new Object[0]);
    } else {
      byte b0 = 0;
      int i = b0 + 1;
      String s = par2ArrayOfStr[b0];
      EntityPlayerMP entityplayermp = getPlayer(par1ICommandSender, par2ArrayOfStr[i++]);
      double d0 = (double) entityplayermp.getPlayerCoordinates().posX;
      double d1 = (double) entityplayermp.getPlayerCoordinates().posY;
      double d2 = (double) entityplayermp.getPlayerCoordinates().posZ;
      double d3 = 1.0D;
      double d4 = 1.0D;
      double d5 = 0.0D;

      if (par2ArrayOfStr.length > i) {
        d0 = func_110666_a(par1ICommandSender, d0, par2ArrayOfStr[i++]);
      }

      if (par2ArrayOfStr.length > i) {
        d1 = func_110665_a(par1ICommandSender, d1, par2ArrayOfStr[i++], 0, 0);
      }

      if (par2ArrayOfStr.length > i) {
        d2 = func_110666_a(par1ICommandSender, d2, par2ArrayOfStr[i++]);
      }

      if (par2ArrayOfStr.length > i) {
        d3 = func_110661_a(par1ICommandSender, par2ArrayOfStr[i++], 0.0D, 3.4028234663852886E38D);
      }

      if (par2ArrayOfStr.length > i) {
        d4 = func_110661_a(par1ICommandSender, par2ArrayOfStr[i++], 0.0D, 2.0D);
      }

      if (par2ArrayOfStr.length > i) {
        d5 = func_110661_a(par1ICommandSender, par2ArrayOfStr[i++], 0.0D, 1.0D);
      }

      double d6 = d3 > 1.0D ? d3 * 16.0D : 16.0D;
      double d7 = entityplayermp.getDistance(d0, d1, d2);

      if (d7 > d6) {
        if (d5 <= 0.0D) {
          throw new CommandException(
              "commands.playsound.playerTooFar", new Object[] {entityplayermp.getEntityName()});
        }

        double d8 = d0 - entityplayermp.posX;
        double d9 = d1 - entityplayermp.posY;
        double d10 = d2 - entityplayermp.posZ;
        double d11 = Math.sqrt(d8 * d8 + d9 * d9 + d10 * d10);
        double d12 = entityplayermp.posX;
        double d13 = entityplayermp.posY;
        double d14 = entityplayermp.posZ;

        if (d11 > 0.0D) {
          d12 += d8 / d11 * 2.0D;
          d13 += d9 / d11 * 2.0D;
          d14 += d10 / d11 * 2.0D;
        }

        entityplayermp.playerNetServerHandler.sendPacketToPlayer(
            new Packet62LevelSound(s, d12, d13, d14, (float) d5, (float) d4));
      } else {
        entityplayermp.playerNetServerHandler.sendPacketToPlayer(
            new Packet62LevelSound(s, d0, d1, d2, (float) d3, (float) d4));
      }

      notifyAdmins(
          par1ICommandSender,
          "commands.playsound.success",
          new Object[] {s, entityplayermp.getEntityName()});
    }
  }
  @Override
  public int executeCommand(ICommandSender par1ICommandSender, String par2Str) {
    par2Str = par2Str.trim();

    if (par2Str.startsWith("/")) {
      par2Str = par2Str.substring(1);
    }

    String[] astring = par2Str.split(" ");
    String s1 = astring[0];

    // astring = dropFirstString(astring);
    String[] var1 = new String[astring.length - 1];
    for (int var2 = 1; var2 < astring.length; ++var2) {
      var1[var2 - 1] = astring[var2];
    }

    astring = var1;
    /////////////////////////////////////

    ICommand icommand = (ICommand) super.getCommands().get(s1);

    // int i = this.getUsernameIndex(icommand, astring);
    int i;
    if (icommand == null) {
      i = -1;
    } else {
      for (int temp = 0; temp < astring.length; ++temp) {
        if (icommand.isUsernameIndex(astring, temp)
            && PlayerSelector.matchesMultiplePlayers(astring[temp])) {
          i = temp;
        }
      }

      i = -1;
    }
    //////////////////////////////////////////////////

    int j = 0;

    try {
      if (icommand == null) {
        throw new CommandNotFoundException();
      }

      if (!MinecraftForge.EVENT_BUS.post(new TryCommandEvent(par1ICommandSender, par2Str))
          && (icommand.canCommandSenderUseCommand(par1ICommandSender)
              || FML.isModLoaded("fihgu's Permission Mod"))) {
        CommandEvent event = new CommandEvent(icommand, par1ICommandSender, astring);
        if (MinecraftForge.EVENT_BUS.post(event)) {
          if (event.exception != null) {
            throw event.exception;
          }
          return 1;
        }

        if (i > -1) {
          EntityPlayerMP[] aentityplayermp =
              PlayerSelector.matchPlayers(par1ICommandSender, astring[i]);
          String s2 = astring[i];
          EntityPlayerMP[] aentityplayermp1 = aentityplayermp;
          int k = aentityplayermp.length;

          for (int l = 0; l < k; ++l) {
            EntityPlayerMP entityplayermp = aentityplayermp1[l];
            astring[i] = entityplayermp.getEntityName();

            try {
              icommand.processCommand(par1ICommandSender, astring);
              ++j;
            } catch (CommandException commandexception) {
              par1ICommandSender.sendChatToPlayer(
                  EnumChatFormatting.RED
                      + par1ICommandSender.translateString(
                          commandexception.getMessage(), commandexception.getErrorOjbects()));
            }
          }

          astring[i] = s2;
        } else {
          icommand.processCommand(par1ICommandSender, astring);
          ++j;
        }
      } else {
        if (!FML.isModLoaded("fihgu's Permission Mod"))
          par1ICommandSender.sendChatToPlayer(
              "" + EnumChatFormatting.RED + "You do not have permission to use this command.");
      }
    } catch (WrongUsageException wrongusageexception) {
      par1ICommandSender.sendChatToPlayer(
          EnumChatFormatting.RED
              + par1ICommandSender.translateString(
                  "commands.generic.usage",
                  new Object[] {
                    par1ICommandSender.translateString(
                        wrongusageexception.getMessage(), wrongusageexception.getErrorOjbects())
                  }));
    } catch (CommandException commandexception1) {
      par1ICommandSender.sendChatToPlayer(
          EnumChatFormatting.RED
              + par1ICommandSender.translateString(
                  commandexception1.getMessage(), commandexception1.getErrorOjbects()));
    } catch (Throwable throwable) {
      par1ICommandSender.sendChatToPlayer(
          EnumChatFormatting.RED
              + par1ICommandSender.translateString("commands.generic.exception", new Object[0]));
      throwable.printStackTrace();
    }

    return j;
  }