package plugin.objects.flourmill import com.rs2.game.players.Player internal object FlourMillPluginState { private const val PLUGIN_ID = "objects.flourmill" private const val GRAIN_KEY = "grain" private const val FLOUR_KEY = "flour" fun grain(player: Player): Int = player.pluginData.getInt(PLUGIN_ID, GRAIN_KEY, 0) fun setGrain(player: Player, amount: Int) { player.pluginData.putInt(PLUGIN_ID, GRAIN_KEY, amount.coerceAtLeast(0)) } fun flour(player: Player): Int = player.pluginData.getInt(PLUGIN_ID, FLOUR_KEY, 0) fun setFlour(player: Player, amount: Int) { player.pluginData.putInt(PLUGIN_ID, FLOUR_KEY, amount.coerceAtLeast(0)) } }