Skip to content

Commit acdd2da

Browse files
committed
- Changed old methods to new worldguard methods
1 parent 7de452a commit acdd2da

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

eternalcombat-plugin/src/main/java/com/eternalcode/combat/region/worldguard/WorldGuardRegion.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,28 @@
88
import org.bukkit.World;
99

1010
record WorldGuardRegion(World world, ProtectedRegion region) implements Region {
11+
1112
@Override
1213
public Point getCenter() {
1314
BlockVector3 min = this.region.getMinimumPoint();
1415
BlockVector3 max = this.region.getMaximumPoint();
1516

16-
double x = (double) (min.getX() + max.getX()) / 2;
17-
double z = (double) (min.getZ() + max.getZ()) / 2;
17+
double x = (min.x() + max.x()) / 2.0;
18+
double z = (min.z() + max.z()) / 2.0;
1819

1920
return new Point(this.world, x, z);
2021
}
2122

2223
@Override
2324
public Location getMin() {
2425
BlockVector3 min = this.region.getMinimumPoint();
25-
return new Location(this.world, min.getX(), min.getY(), min.getZ());
26+
return new Location(this.world, min.x(), min.y(), min.z());
2627
}
2728

2829
@Override
2930
public Location getMax() {
3031
BlockVector3 max = this.region.getMaximumPoint();
31-
return new Location(this.world, max.getX(), max.getY(), max.getZ());
32+
return new Location(this.world, max.x(), max.y(), max.z());
3233
}
34+
3335
}

0 commit comments

Comments
 (0)