Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.

Play‐Time‐Tracker

Ayushman Bhattacharya edited this page Aug 19, 2024 · 1 revision

Playtime Tracker Mod Wiki

Overview

Playtime Tracker is a Minecraft mod that tracks and saves the playtime of players on your server. Each player's playtime is stored in a JSON file, which allows for easy access and modification.

Features

  • Automatically tracks the total playtime of each player.
  • Supports commands to view playtime.
  • Playtime is stored in seconds for precise tracking.
  • Data is saved in a playtime.json file within the server's root directory.

Installation

Requirements

  • Minecraft 1.21
  • Fabric API
  • Java 21 or later
  • Fabric Loader 0.15.11 or later

Steps to Install

  1. Download the mod JAR file from the Modrinth page.
  2. Place the JAR file in the mods folder of your Minecraft server directory.
  3. Start the server. The mod will automatically create the necessary playtime.json file in the root directory if it doesn't already exist.

Usage

Tracking Playtime

  • The mod automatically tracks playtime for each player who joins the server.
  • Playtime is recorded in seconds and saved in the playtime.json file.

Commands

/playtrack

  • Description: Displays the total playtime of the player who runs the command.
  • Usage: Simply type /playtrack in the chat.
  • Output: The player's total playtime in hours, minutes, and seconds.
  • Error Handling: If no playtime data is found for the player, an error message will be displayed.

Configuration

File Location

  • The playtime data is stored in a playtime.json file located in the server's root directory.

File Structure

  • The JSON file follows this structure:
{
  "PlayerName1": playtime_in_seconds,
  "PlayerName2": playtime_in_seconds
}