Exemplo n.º 1
0
  protected void func_147210_a(ICommandSender p_147210_1_, String p_147210_2_, String p_147210_3_) {
    BanEntry var4 = new BanEntry(p_147210_2_);
    var4.func_73687_a(p_147210_1_.func_70005_c_());
    if (p_147210_3_ != null) {
      var4.func_73689_b(p_147210_3_);
    }

    MinecraftServer.func_71276_C().func_71203_ab().func_72363_f().func_73706_a(var4);
    List var5 = MinecraftServer.func_71276_C().func_71203_ab().func_72382_j(p_147210_2_);
    String[] var6 = new String[var5.size()];
    int var7 = 0;

    EntityPlayerMP var9;
    for (Iterator var8 = var5.iterator(); var8.hasNext(); var6[var7++] = var9.func_70005_c_()) {
      var9 = (EntityPlayerMP) var8.next();
      var9.field_71135_a.func_147360_c("You have been IP banned.");
    }

    if (var5.isEmpty()) {
      func_71522_a(p_147210_1_, "commands.banip.success", new Object[] {p_147210_2_});
    } else {
      func_71522_a(
          p_147210_1_,
          "commands.banip.success.players",
          new Object[] {p_147210_2_, func_71527_a(var6)});
    }
  }
Exemplo n.º 2
0
 public boolean isOnline() {
   for (Object obj : server.getHandle().field_72404_b) {
     net.minecraft.entity.player.EntityPlayerMP player =
         (net.minecraft.entity.player.EntityPlayerMP) obj;
     if (player.func_70005_c_().equalsIgnoreCase(getName())) {
       return true;
     }
   }
   return false;
 }