コード例 #1
0
ファイル: TownBlock.java プロジェクト: nugzalore/Towny
  @Override
  public boolean equals(Object obj) {
    if (obj == this) return true;
    if (!(obj instanceof TownBlock)) return false;

    TownBlock o = (TownBlock) obj;
    return this.getX() == o.getX() && this.getZ() == o.getZ() && this.getWorld() == o.getWorld();
  }
コード例 #2
0
ファイル: TownyWorld.java プロジェクト: ryansinn/Towny
 public List<TownBlock> getTownBlocks(Town town) {
   List<TownBlock> out = new ArrayList<TownBlock>();
   for (TownBlock townBlock : town.getTownBlocks())
     if (townBlock.getWorld() == this) out.add(townBlock);
   return out;
 }