Class GameTestConfig
-
- All Implemented Interfaces:
-
net.kyori.adventure.key.Keyed,org.bukkit.Keyed
public final class GameTestConfig implements Keyed
Represents the configuration for a GameTest. Prefer using the Builder to create instances of this class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classGameTestConfig.BuilderBuilds a io.github.pylonmc.pylon.core.gametest.GameTestConfig.
-
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 IntegergetSize()final Consumer<GameTest>getSetUp()final IntegergetDelayTicks()final IntegergetTimeoutTicks()final BlockPositiongetPositionOverride()NamespacedKeygetKey()final CompletableFuture<GameTestFailException>launch(BlockPosition position)Launches the game test at the given position. final voidregister()-
-
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.
-
register
final void register()
-
-
-
-