set

abstract fun set(player: Player, resourceId: Key, amount: Double): Boolean(source)

Sets the current amount of the resourceId. The amount is kept between 0 and ResourceState.max.

Return

true if the change was requested, false if it is unsupported or the player's data isn't loaded. true doesn't guarantee the change: another plugin may cancel it, and Mimic can't detect that.

Throws