Update method name in Countingwand

This commit is contained in:
2025-11-07 15:30:18 +01:00
parent cc3b93a8f6
commit 14045a3366
@@ -41,7 +41,7 @@ public class Countingwand {
private Point pos1;
private Point pos2;
public boolean set(boolean pos1, Point point) {
public boolean setPosition(boolean pos1, Point point) {
if (this.pos1 == null || this.pos2 == null) {
this.pos1 = point;
this.pos2 = point;
@@ -74,7 +74,7 @@ public class Countingwand {
public void checkSelection(final Point point, final boolean pos1, final Player p) {
SWPlayer player = SWPlayer.of(p);
CountingWandComponent countingWandComponent = player.getComponentOrDefault(CountingWandComponent.class, CountingWandComponent::new);
if (countingWandComponent.set(pos1, point)) {
if (countingWandComponent.setPosition(pos1, point)) {
Point point1 = countingWandComponent.pos1;
Point point2 = countingWandComponent.pos2;
int amount = (Math.abs(point1.getX() - point2.getX()) + 1) * (Math.abs(point1.getY() - point2.getY()) + 1) * (Math.abs(point1.getZ() - point2.getZ()) + 1);