fix: BlockAndSeekMap LazyLocation did not initialize when creating a new config

This commit is contained in:
2025-12-09 16:52:34 +03:00
parent 45e99ddbc3
commit 3e274a03ff
2 changed files with 2 additions and 60 deletions

View File

@@ -1,58 +0,0 @@
package hdvtdev.blockandseek;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
public class CommandBuilder {
private final List<Node> forest = new ArrayList<>();
public Node addNode(String name) {
Node node = new Node(name);
forest.add(node);
return node;
}
@Nullable
public String tryGet(String fullPath) {
return null;
}
public static void printTree(Node node, String indent) {
System.out.println(indent + "- " + node.getName());
for (Node child : node.getChildren()) {
printTree(child, indent + " ");
}
}
public static class Node {
private final String name;
private final List<Node> children;
public Node(String name) {
this.name = name;
this.children = new ArrayList<>();
}
public void addChild(Node child) {
this.children.add(child);
}
public List<Node> getChildren() {
return children;
}
public String getName() {
return name;
}
@Override
public String toString() {
return name;
}
}
}

View File

@@ -20,10 +20,10 @@ import java.util.List;
public class BlockAndSeekMap extends OkaeriConfig { public class BlockAndSeekMap extends OkaeriConfig {
@Comment("The main spawn point inside the arena") @Comment("The main spawn point inside the arena")
private LazyLocation spawn; private LazyLocation spawn = new LazyLocation();
@Comment("The waiting lobby location where players join before the match") @Comment("The waiting lobby location where players join before the match")
private LazyLocation lobby; private LazyLocation lobby = new LazyLocation();
@Comment("Minimum number of players required to start the game") @Comment("Minimum number of players required to start the game")
@Min(2) @Min(2)