diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d3f2bc7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing to ShopMC + +Thank you for your interest in contributing! + +## Getting Started + +1. Fork the repository and clone your fork. +2. Create a branch for your changes. +3. Install dependencies with Maven. +4. Run `mvn test` to ensure all tests pass. + +## Coding Guidelines + +- Follow existing code style and structure. +- Include tests for new features when possible. +- Keep commits focused; one feature or fix per commit. + +## Submitting Changes + +1. Push your branch and open a pull request. +2. Describe your changes and any additional context. +3. Ensure CI and tests pass before requesting review. + +By contributing, you agree that your contributions will be licensed under the MIT License. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b07b75c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 ShopMC contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 7b0c3a8..af29daa 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,73 @@ # ShopMC -MC Shop + +Dynamic server shop plugin for Minecraft with GUIs, weekly deals and per-item dynamic pricing. + +## Requirements +- Vault-compatible economy plugin + +## Permissions + +| Permission | Description | Default | +|-------------------|-----------------------------------------|---------| +| `servershop.use` | Access `/shop`, `/sell`, `/sellall`, and `/weeklyshop` commands. | `true` | +| `servershop.admin`| Access administrative commands like `/shoplog`. | `op` | + +## Configuration + +Key settings from `config.yml`: + +### Weekly Shop +- `weekly.count` – number of rotating items each week. +- `weekly.discount` – multiplier applied to weekly items. +- `weekly.firstDayOfWeek` – day that starts the cycle. + +### Price Model +- `priceModel.minFactor` / `priceModel.maxFactor` – bounds for base prices. +- `priceModel.sellStep` – amount price changes per sale. + +### Logging & Database +- `logging.storage` – `YAML` or `MYSQL`. +- `logging.maxEntries` – maximum entries kept in YAML logs. +- `mysql.*` – connection settings when using MySQL. + +### Dynamic Pricing +- `dynamicPricing.enabled` – toggle dynamic price adjustments. +- `dynamicPricing.storage` – `YAML` or `MYSQL` storage. +- `dynamicPricing.initialMultiplier` / `minMultiplier` / `maxMultiplier` – price multiplier settings. +- `dynamicPricing.decay.enabled` – enable periodic decay towards 1.0. +- `dynamicPricing.decay.perHourTowards1` – rate of decay. +- `dynamicPricing.decay.saveEveryMinutes` – persistence interval. + +### GUI +- `gui.titles.*` – titles for category, item, weekly, and sell menus. +- `gui.rows.*` – number of rows for each menu screen. + +## Example Flows + +### Buying Items +1. Run `/shop` to open the main categories menu. +2. Choose a category, then select an item and confirm the purchase. + +### Selling Items +1. Run `/sell ` to sell a specific item. +2. Run `/sellall` to sell all sellable items in your inventory. + +### Viewing Logs +1. Administrators run `/shoplog [player] [limit]` to view recent transactions. + +### Weekly Deals +1. Run `/weeklyshop` to open the weekly shop menu and purchase discounted items. + +## Building from Source + +This project uses Maven: + +```bash +mvn package +``` + +The built plugin will be located in the `target` directory. + +## License + +[MIT](LICENSE)