use pattern variables

This commit is contained in:
dfsek committed 2021-11-27 08:34:03 -07:00
1 parent 2d316fa042
commit 2307897b31
16 files changed
+33 -58

No files matched your search

@@ -62,8 +62,7 @@ public class ChunkCoordinate implements Serializable {
@Override
public boolean equals(Object obj) {
if(!(obj instanceof ChunkCoordinate)) return false;
ChunkCoordinate other = (ChunkCoordinate) obj;
if(!(obj instanceof ChunkCoordinate other)) return false;
return other.getX() == x && other.getZ() == z;
}
}
@@ -127,8 +127,7 @@ public class BukkitWorld implements World {
@Override
public boolean equals(Object obj) {
if(!(obj instanceof BukkitWorld)) return false;
BukkitWorld other = (BukkitWorld) obj;
if(!(obj instanceof BukkitWorld other)) return false;
return other.getHandle().equals(delegate);
}