mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-02-02 21:11:45 +01:00
Added default equals method to MapTile.
This commit is contained in:
parent
9fea1eafdb
commit
1755411545
@ -25,4 +25,13 @@ public abstract class MapTile {
|
||||
public int hashCode() {
|
||||
return getFilename().hashCode() ^ getWorld().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof MapTile) {
|
||||
MapTile t = (MapTile)obj;
|
||||
return getFilename().equals(t.getFilename()) && getWorld().equals(t.getWorld());
|
||||
}
|
||||
return super.equals(obj);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user