Class GameTestConfig
-
- All Implemented Interfaces:
-
net.kyori.adventure.key.Keyed
,org.bukkit.Keyed
public final class GameTestConfig implements Keyed
Represents the configuration for a game test. Prefer using the Builder to create instances of this class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
GameTestConfig.Builder
-
Field Summary
Fields Modifier and Type Field Description private final Integer
size
private final Consumer<GameTest>
setUp
private final Integer
delayTicks
private final Integer
timeoutTicks
private final BlockPosition
positionOverride
-
Constructor Summary
Constructors Constructor Description GameTestConfig(NamespacedKey key, Integer size, Consumer<GameTest> setUp, Integer delayTicks, Integer timeoutTicks, BlockPosition positionOverride)
-
Method Summary
Modifier and Type Method Description final Integer
getSize()
final Consumer<GameTest>
getSetUp()
final Integer
getDelayTicks()
final Integer
getTimeoutTicks()
final BlockPosition
getPositionOverride()
NamespacedKey
getKey()
final CompletableFuture<GameTestFailException>
launch(BlockPosition position)
Launches the game test at the given position. final Unit
register()
-
-
Constructor Detail
-
GameTestConfig
GameTestConfig(NamespacedKey key, Integer size, Consumer<GameTest> setUp, Integer delayTicks, Integer timeoutTicks, BlockPosition positionOverride)
-
-
Method Detail
-
getDelayTicks
final Integer getDelayTicks()
-
getTimeoutTicks
final Integer getTimeoutTicks()
-
getPositionOverride
final BlockPosition getPositionOverride()
-
getKey
NamespacedKey getKey()
-
launch
final CompletableFuture<GameTestFailException> launch(BlockPosition position)
Launches the game test at the given position. If positionOverride is set, it will be used instead of the given position. Returns a future that completes with a GameTestFailException if the test fails, or null if it succeeds.
-
-
-
-