Skip to content

A Minecraft Plugin that saves player stats as you play, on a mongoDB database, awarding you with medals and more

License

Notifications You must be signed in to change notification settings

AfonsoBatista7/MineStats

Repository files navigation

Contributors Forks Stargazers Issues License


Logo

MineStats Plugin

A Minecraft plugin for tracking player stats and rewarding medals based on in-game performance.
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

Java Spigot MongoDB Maven


🧩 About The Project

MineStats is a custom Minecraft Java Edition plugin that tracks detailed player statistics and stores them in a MongoDB database. It features a medal system that awards in-game tags to players based on their performance, creating a competitive and rewarding experience.

Key Features:

  • Tracks key player stats (e.g. blocks mined, time played, mobs killed).
  • Stores data in MongoDB for persistence and extensibility.
  • Medals and tags reward high-performing players.
  • Designed to be extensible and server-admin friendly.

(back to top)


🚀 Getting Started

Follow these steps to compile and run the MineStats plugin on your own Minecraft server.

✅ Prerequisites

  • Java 8 or higher
  • Maven (for building the plugin)
  • A MongoDB instance (local or remote)
  • A Minecraft Java server (e.g. Spigot or Paper)

💾 Compile

  1. Clone the repository:

    git clone https://github.com/AfonsoBatista7/MineStats.git
    cd MineStats
  2. Build the plugin

    • On Windows: Run build.bat by double-clicking it.

    • On macOS/Linux:

    ./build.sh
  3. Find the built .jar file in the target/ folder.

  4. Move it to your server’s plugins folder.

  5. Configure and restart the server.

⚙️ Configuration

After the plugin runs once, a config.yml file is generated. Update it to point to your MongoDB instance:

  mongodb:
    host: localhost
    port: 27017
    database: minestats
    username: your_username
    password: your_password

🛠️ Usage

  • The plugin automatically tracks player actions and stores data in MongoDB.

  • Based on performance, players earn medals.

  • Each medal gives the player a special in-game tag they can use or show off.

📋 Commands

Command Description
/upload Uploads all the player stats to the database.
/uploadall Uploads all the stats from all players.
/download <player> Downloads all the stats for a player from the database.
/merge <player1> <player2> Merges two player documents from the database.
/givemedal <player> <medal> <level> Gives a medal to a player.
/updateall Updates all documents in the database.
/medal <medal> Shows information about a specific medal.
/medals Displays all available medals.
/playermedals <player> Shows all the medals a specified player has.
/stats <player> Displays current stats for the player.
/tag set <tag> Set a tag on your name
/tag del Delete your current tag
/tag list List all of your tags.
/link Links your Minecraft account with your Discord account.
/unlink Unlinks your Minecraft account from your Discord account.

(back to top)


🤝 Contributing

Any contributions are welcomed from the community!

  1. Fork this repo

  2. Create a branch:

git checkout -b feature/my-feature
  1. Make changes and commit:
git commit -m 'Add some feature'
  1. Push to your branch:
git push origin feature/my-feature
  1. Open a pull request

Please follow good coding practices and include a clear description of your changes.

📄 License

Distributed under the MIT License. See LICENSE.txt for more information.

📬 Contact


Made with ❤️ for Minecraft server admins and their communities.

(back to top)

About

A Minecraft Plugin that saves player stats as you play, on a mongoDB database, awarding you with medals and more

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published