createIntRule

static GameRules.Type<GameRules.IntRulecreateIntRule(int defaultValue)

Creates an integer rule type.

Return

an integer rule type

Parameters

defaultValue

the default value of the game rule

static GameRules.Type<GameRules.IntRulecreateIntRule(int defaultValue, int minimumValue)

Creates an integer rule type.

Return

an integer rule type

Parameters

defaultValue

the default value of the game rule

minimumValue

the minimum value the game rule may accept

static GameRules.Type<GameRules.IntRulecreateIntRule(int defaultValue, int minimumValue, BiConsumer<MinecraftServer, GameRules.IntRule> changedCallback)

Creates an integer rule type.

Return

an integer rule type

Parameters

defaultValue

the default value of the game rule

minimumValue

the minimum value the game rule may accept

changedCallback

a callback that is invoked when the value of a game rule has changed

static GameRules.Type<GameRules.IntRulecreateIntRule(int defaultValue, int minimumValue, int maximumValue)

Creates an integer rule type.

Return

an integer rule type

Parameters

defaultValue

the default value of the game rule

minimumValue

the minimum value the game rule may accept

maximumValue

the maximum value the game rule may accept

static GameRules.Type<GameRules.IntRulecreateIntRule(int defaultValue, BiConsumer<MinecraftServer, GameRules.IntRule> changedCallback)

Creates an integer rule type.

Return

an integer rule type

Parameters

defaultValue

the default value of the game rule

changedCallback

a callback that is invoked when the value of a game rule has changed

static GameRules.Type<GameRules.IntRulecreateIntRule(int defaultValue, int minimumValue, int maximumValue, @Nullable() BiConsumer<MinecraftServer, GameRules.IntRule> changedCallback)

Creates an integer rule type.

Return

an integer rule type

Parameters

defaultValue

the default value of the game rule

minimumValue

the minimum value the game rule may accept

maximumValue

the maximum value the game rule may accept

changedCallback

a callback that is invoked when the value of a game rule has changed