createDoubleRule

static GameRules.Type<DoubleRulecreateDoubleRule(double defaultValue)

Creates a double rule type.

Return

a double rule type

Parameters

defaultValue

the default value of the game rule

static GameRules.Type<DoubleRulecreateDoubleRule(double defaultValue, double minimumValue)

Creates a double rule type.

Return

a double rule type

Parameters

defaultValue

the default value of the game rule

minimumValue

the minimum value the game rule may accept

static GameRules.Type<DoubleRulecreateDoubleRule(double defaultValue, double minimumValue, BiConsumer<MinecraftServer, DoubleRule> changedCallback)

Creates a double rule type.

Return

a double 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<DoubleRulecreateDoubleRule(double defaultValue, double minimumValue, double maximumValue)

Creates a double rule type.

Return

a double 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<DoubleRulecreateDoubleRule(double defaultValue, BiConsumer<MinecraftServer, DoubleRule> changedCallback)

Creates a double rule type.

Return

a double 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<DoubleRulecreateDoubleRule(double defaultValue, double minimumValue, double maximumValue, BiConsumer<MinecraftServer, DoubleRule> changedCallback)

Creates a double rule type.

Return

a double 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