Interface GameRuleService
public interface GameRuleService
Typed game-rule resolution and serialized persistence operations. Effective
values follow defaults, then custom globals, then source-arena overrides.
Mutation futures perform persistence asynchronously; successful change
events are fired synchronously on the Bukkit main thread.
- Since:
- 1.3.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull CompletableFuture<GameRuleMutationResult> applyToRuntime(@NotNull ZentrixGame game, @NotNull GameRuleScope scope) @NotNull Optional<GameRuleDefinition> getDefinition(@NotNull String ruleName) @NotNull Collection<ResolvedGameRule> getEffectiveGlobalRules(@NotNull GameRuleScope scope) @NotNull Collection<ResolvedGameRule> getEffectiveRules(@NotNull GameRuleScope scope, @NotNull String sourceArenaName) @NotNull Collection<GameRuleDefinition> parseValue(@NotNull GameRuleDefinition definition, @NotNull String value) @NotNull CompletableFuture<GameRuleMutationResult> removeArenaOverride(@NotNull String sourceArenaName, @NotNull GameRuleScope scope, @NotNull String ruleName) @NotNull CompletableFuture<GameRuleMutationResult> removeGlobal(@NotNull GameRuleScope scope, @NotNull String ruleName) @NotNull CompletableFuture<GameRuleMutationResult> resetArenaOverrides(@NotNull String sourceArenaName, @NotNull GameRuleScope scope) @NotNull CompletableFuture<GameRuleMutationResult> resetGlobal(@NotNull GameRuleScope scope) @NotNull Optional<ResolvedGameRule> resolve(@NotNull GameRuleScope scope, @NotNull String sourceArenaName, @NotNull String ruleName) @NotNull Optional<ResolvedGameRule> resolveGlobal(@NotNull GameRuleScope scope, @NotNull String ruleName) @NotNull CompletableFuture<GameRuleMutationResult> setArenaOverride(@NotNull String sourceArenaName, @NotNull GameRuleScope scope, @NotNull String ruleName, @NotNull Object value) @NotNull CompletableFuture<GameRuleMutationResult> setGlobal(@NotNull GameRuleScope scope, @NotNull String ruleName, @NotNull Object value)
-
Method Details
-
getSupportedDefinitions
-
getDefinition
-
parseValue
@NotNull @NotNull Optional<Object> parseValue(@NotNull @NotNull GameRuleDefinition definition, @NotNull @NotNull String value) -
getEffectiveGlobalRules
@NotNull @NotNull Collection<ResolvedGameRule> getEffectiveGlobalRules(@NotNull @NotNull GameRuleScope scope) -
getEffectiveRules
@NotNull @NotNull Collection<ResolvedGameRule> getEffectiveRules(@NotNull @NotNull GameRuleScope scope, @NotNull @NotNull String sourceArenaName) -
resolveGlobal
@NotNull @NotNull Optional<ResolvedGameRule> resolveGlobal(@NotNull @NotNull GameRuleScope scope, @NotNull @NotNull String ruleName) -
resolve
@NotNull @NotNull Optional<ResolvedGameRule> resolve(@NotNull @NotNull GameRuleScope scope, @NotNull @NotNull String sourceArenaName, @NotNull @NotNull String ruleName) -
setGlobal
@NotNull @NotNull CompletableFuture<GameRuleMutationResult> setGlobal(@NotNull @NotNull GameRuleScope scope, @NotNull @NotNull String ruleName, @NotNull @NotNull Object value) -
removeGlobal
@NotNull @NotNull CompletableFuture<GameRuleMutationResult> removeGlobal(@NotNull @NotNull GameRuleScope scope, @NotNull @NotNull String ruleName) -
resetGlobal
@NotNull @NotNull CompletableFuture<GameRuleMutationResult> resetGlobal(@NotNull @NotNull GameRuleScope scope) -
setArenaOverride
@NotNull @NotNull CompletableFuture<GameRuleMutationResult> setArenaOverride(@NotNull @NotNull String sourceArenaName, @NotNull @NotNull GameRuleScope scope, @NotNull @NotNull String ruleName, @NotNull @NotNull Object value) -
removeArenaOverride
@NotNull @NotNull CompletableFuture<GameRuleMutationResult> removeArenaOverride(@NotNull @NotNull String sourceArenaName, @NotNull @NotNull GameRuleScope scope, @NotNull @NotNull String ruleName) -
resetArenaOverrides
@NotNull @NotNull CompletableFuture<GameRuleMutationResult> resetArenaOverrides(@NotNull @NotNull String sourceArenaName, @NotNull @NotNull GameRuleScope scope) -
applyToRuntime
@NotNull @NotNull CompletableFuture<GameRuleMutationResult> applyToRuntime(@NotNull @NotNull ZentrixGame game, @NotNull @NotNull GameRuleScope scope)
-