예제 #1
0
  public void load() {
    if (this.b.isFile()) {
      BufferedReader bufferedreader;

      try {
        bufferedreader = new BufferedReader(new FileReader(this.b));
      } catch (FileNotFoundException filenotfoundexception) {
        throw new Error();
      }

      String s;

      try {
        while ((s = bufferedreader.readLine()) != null) {
          if (!s.startsWith("#")) {
            BanEntry banentry = BanEntry.c(s);

            if (banentry != null) {
              this.a.put(banentry.getName(), banentry);
            }
          }
        }
      } catch (IOException ioexception) {
        MinecraftServer.getServer().getLogger().severe("Could not load ban list", ioexception);
      }
    }
  }
예제 #2
0
 public void add(BanEntry banentry) {
   this.a.put(banentry.getName(), banentry);
   this.save();
 }