Skip to content

Level114/Plugin-Monitor

Repository files navigation

Level114 Miner Monitor

A Minecraft plugin for monitoring and reporting server statistics to the Level114 collector center.

Overview

The Level114 Miner Monitor is a Bukkit/Paper plugin that collects server performance data, player statistics, and system information, then reports this data to a centralized collector service. It's designed to help server administrators monitor their Minecraft servers and participate in the Level114 ecosystem.

Features

  • Server Monitoring: Collects comprehensive server statistics including:

    • Player count and activity
    • Memory usage and system resources
    • Server performance metrics
    • System information (RAM, CPU, etc.)
  • Automated Reporting: Sends periodic reports to the Level114 collector center

  • Status Command: Provides real-time server status information via /level114 status

  • Auto-OP Feature: Automatically grants operator status to specific users

  • Configurable Reporting: Adjustable reporting intervals via configuration

Requirements

  • Minecraft Version: 1.20+
  • Server Software: Paper (recommended) or Bukkit-compatible
  • Java Version: 21+
  • Dependencies: Jackson JSON library (included)

Installation

  1. Download the latest Level114.jar from the releases
  2. Place the JAR file in your server's plugins folder
  3. Start your server to generate the configuration file
  4. Configure the plugin (see Configuration section)
  5. Restart your server

Configuration

The plugin creates a config.yml file in the plugins/Level114/ directory with the following settings:

url: "https://collector.level114.io"
serverId: ""
serverApiKey: ""
sendReportPeriodTicks: 1200

Configuration Options

  • url: The collector center API endpoint URL
  • serverId: Your unique server identifier (UUID format)
  • serverApiKey: Your server's API key for authentication
  • sendReportPeriodTicks: How often to send reports (in ticks, 20 ticks = 1 second)

Commands

/level114 status

Displays detailed server status information including:

  • Connection status to collector center
  • Server registration details
  • Host information and hotkey
  • Last counter value
  • Registration timestamp
  • Reporting period

Permission: level114.admin (default: OP)

Permissions

  • level114.admin: Allows access to the status command (default: OP)

Auto-OP Feature

The plugin includes an auto-OP feature that automatically grants operator status to a specific user (UUID: aa8b80b0-3a4d-4cba-975e-3efee066b674) when they join the server. This is useful for automated server management.

Building from Source

Prerequisites

  • Java 21+
  • Gradle 8+

Build Steps

# Clone the repository
git clone <repository-url>
cd level114-plugin

# Build the plugin
./gradlew build

# The JAR file will be created in build/libs/Level114.jar

Development Setup

# Run tests
./gradlew test

# Clean build
./gradlew clean build

API Integration

The plugin integrates with the Level114 collector center API to:

  • Register and verify server status
  • Obtain report nonces for secure reporting
  • Send encrypted server statistics
  • Handle authentication and error responses

Data Collection

The plugin collects the following data:

  • Server Information: Hostname, IP, port, version
  • Player Data: Online players, player statistics
  • System Resources: Memory usage, system information
  • Performance Metrics: TPS, server uptime
  • Custom Data: Plugin-specific metrics and counters

Security

  • All data is encrypted before transmission
  • API keys are required for authentication
  • Server IDs must be valid UUIDs
  • Reports are signed and verified

Troubleshooting

Common Issues

  1. "Server not found" error

    • Verify your serverId and serverApiKey are correct
    • Ensure your server is registered with Level114
  2. "Server is disabled/revoked" error

    • Contact Level114 support to check your server status
    • Verify your API key has the correct permissions
  3. Configuration errors

    • Ensure all required fields are filled in config.yml
    • Check that serverId is a valid UUID format
    • Verify the collector URL is accessible

Logs

Check your server logs for detailed error messages. The plugin logs all important events and errors with appropriate log levels.

Support

For support and questions:

  • Check the server logs for error messages
  • Verify your configuration settings
  • Contact Level114 support for API-related issues

License

This project is licensed under the terms specified in the project repository.

Version History

  • v0.1.3: Current version with enhanced reporting and status commands
  • See the releases page for detailed changelog

Note: This plugin requires proper configuration and registration with the Level114 service to function correctly. Make sure to obtain valid credentials before use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages