Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
1 result

README.md

Blame
  • Minecraft Statistics Server (demo)

    This project is a demonstration of a RESTful API backend for managing player statistics and shops in a Minecraft server. The API allows you to retrieve information about players and shops, manage shop inventories, and simulate player transactions.

    Features

    • Player Management

      • Retrieve all players
      • Retrieve online and offline players
      • Get detailed information about a specific player
    • Shop Management

      • Retrieve all shops
      • Get details of a specific shop
      • Buy items from a shop
      • Set prices and stock for items in a shop

    Technologies Used

    • Java 17
    • Spring Boot
    • Spring Web
    • JUnit & Mockito for testing

    Getting Started

    Prerequisites

    • Java 17 or higher
    • Maven

    Installation

    1. Clone the repository:

      git clone https://gitlab.sl-projects.com/SofianeLasri/demo-culture-concepts-info.git
    2. Navigate to the project directory:

      cd demo-culture-concepts-info
    3. Build the project using Maven:

      mvn clean install
    4. Run the application:

      mvn spring-boot:run

    The server will start and listen on http://localhost:8080.

    API Endpoints

    Player Endpoints

    • GET /players: Retrieve a list of all players.
    • GET /online-players: Retrieve a list of online players.
    • GET /offline-players: Retrieve a list of offline players.
    • GET /player: Retrieve information about a specific player by UUID.

    Shop Endpoints

    • GET /shops: Retrieve a list of all shops.
    • GET /shop: Retrieve information about a specific shop by item name.
    • GET /buy: Simulate buying an item from a shop.
    • GET /set-price: Set the price of an item in a shop.
    • GET /set-stock: Set the stock of an item in a shop.

    Testing

    Run the tests using Maven:

    mvn test