{"id":19952448,"url":"https://github.com/dosmike/toomuchstock","last_synced_at":"2026-06-15T09:31:28.432Z","repository":{"id":133520883,"uuid":"225423376","full_name":"DosMike/TooMuchStock","owner":"DosMike","description":"Limit the economy on your server","archived":false,"fork":false,"pushed_at":"2020-08-07T18:14:35.000Z","size":727,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T15:16:10.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DosMike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-02T16:45:44.000Z","updated_at":"2020-08-07T18:14:37.000Z","dependencies_parsed_at":"2023-07-10T00:16:17.861Z","dependency_job_id":null,"html_url":"https://github.com/DosMike/TooMuchStock","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/DosMike/TooMuchStock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FTooMuchStock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FTooMuchStock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FTooMuchStock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FTooMuchStock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DosMike","download_url":"https://codeload.github.com/DosMike/TooMuchStock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FTooMuchStock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34357281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T01:13:10.837Z","updated_at":"2026-06-15T09:31:28.372Z","avatar_url":"https://github.com/DosMike.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Too Much Stock\n\nThis plugin aims to provide an API for dynamic pricing based on trade volume and\npopularity of items. \nIn order to keep the Server economy within limits the following factors are put\nin place:\n* Trade volume per player; per item globally; per item and shop; per item and player in \n  * Limit of total sold items (disperseAmount)\n  * Limit of total items purchased (purchaseAmount)\n  * Limit of total income through trade per currency (incomeLimit)\n  * Limit of total spedings through trande per currency (spendingLimit)\n* Price modifications per item globally; per item and shop; per item and player with\n  * Price multiplier for any sold item (dispersionDevaluation)\n  * Price decay rate per item sold by a player\n  * Price growth rate per item bought by a plaer\n  * Discrapency returns over time with half life in minutes\n  * Reset periods to prevent permanent damage to prices\n\nEvery aspect can be tuned and disabled through a config file. Most \nconfigurations can be done per item through item type / meta or nbt filters.\n\n**Keep in mind that this plugin primarily tracks price increase**, this means\nyou can still make shops that sell items for more or less money (e.g. black markets)\nbut the prices still scale with demand and supply!\n\n**Additional features:**\n* Create Item aliases through a command, for use in per item configurations\n* Visuall display global price history and player specific price history per item\n\n## Commands \u0026 Permissions\n\n* `/toomuchstock reload [--hard]` (Permission: toomuchstock.command.reload)  \n  Reload the config. If --hard is specified, will also reset cooldowns.\n* `/toomuchstock define \u003cfilter\u003e \u003cname\u003e` (Permission: toomuchstock.command.define)  \n  Hold an item to add it to the config under the specified name for per item configuration\n* `/toomuchstock history [item]` (Permission: toomuchstock.command.stonks)  \n  Hold an item or type the item name in the command to get a visual history of the item\n  price (as multiplier to a base price) over the last 30 minutes.\n\n## Example config\n\nAn example configuration with comments can be found [here](https://github.com/DosMike/TooMuchStock/blob/master/example.conf).\n\n## Pricing API\n\nThe interface can be obtained as Service using PriceCalculationService:\n```Java\n@Listener public void onChangeServiceProvider(ChangeServiceProviderEvent event) {\n\tif (event.getService().equals(PriceCalculationService.class)) {\n\t\tpricingService = (PriceCalculationService) event.getNewProvider();\n\t}\n}\n```\n\nThe API provides current prices with   \n`pricingService.getCurrentPurchasePrice(ItemStackSnapshot item, int amount, BigDecimal staticPrice, @Nullable UUID shopID, @Nullable UUID playerID)`\n\nAs soon as a player shows interest in items and due to the exponential nature\nof dynamic prices the next step would be to call   \n`TransactionPreview preview = pricingService.getPurchaseInformation(ItemStackSnapshot item, int amount, BigDecimal staticPrice, Currency currency, @Nullable UUID shopID, @Nullable UUID playerID)`   \nwith the preview holding all price steps up to amount, and the amount of items \nthe player can afford (to buy OR sell until they hit account limits).  \nThe Transaction should be finished with a call to preview.confirm like   \n`preview.confirm(preview.getAffordableAmount())`   \nto actually update the prices within the trackers.\n\nOnce a price changes through a transaction, discrapency decay or reset a \nPriceChangeEvent will be emitted for plugins to update their dispalys.\n\n### Example Implementation\n\nAn example implementation of TooMuchStock as optional dependency is available in my plugin [VillagerShops](https://github.com/DosMike/VillagerShops).\n\nThe abstraction is located in this package:    https://github.com/DosMike/VillagerShops/tree/master/src/main/java/de/dosmike/sponge/vshop/integrations/toomuchstock\n\nThe dependency is initialized in `GameInitializationEvent` with `PriceCalculator.get()`\n\nAnd it's used in the buy and sell methods here:   \nhttps://github.com/DosMike/VillagerShops/blob/master/src/main/java/de/dosmike/sponge/vshop/shops/Purchase.java#L90\n\n*Please Note:* You will have write / copy the abstraction package in your plugin.\n\n### As Dependency\n\n```\nrepositories {\n\t...\n\tmaven { url 'https://jitpack.io' }\n}\n\ndependencies {\n\timplementation 'com.github.DosMike:TooMuchStock:master-SNAPSHOT'\n}\n```\n\n### I'm always open for suggestions:\n#### [Join my Discord](https://discord.gg/E592Gdu)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdosmike%2Ftoomuchstock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdosmike%2Ftoomuchstock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdosmike%2Ftoomuchstock/lists"}