promotional bannermobile promotional banner
premium banner
Simple key-value player data storage API with JSON persistence for server plugins.

Description

PlayerData Core

A lightweight library for storing and retrieving player data in Hytale server plugins.

Features

  • Simple key-value API for any data type
  • Automatic JSON persistence to disk
  • Thread-safe operations
  • Per-player data isolation
  • Zero configuration required
  • Enforced namespaced keys to prevent plugin conflicts

For Plugin Developers

Keys must be namespaced using the format pluginname:keyname to avoid conflicts between plugins.

  // Store data
  PlayerData.set(playerId, "myplugin:coins", 100)
  PlayerData.set(playerId, "myplugin:rank", "VIP")

  // Retrieve data
  val coins = PlayerData.get<Int>(playerId, "myplugin:coins") ?: 0
  val rank = PlayerData.get<String>(playerId, "myplugin:rank")

  // Increment numeric values
  PlayerData.increment(playerId, "myplugin:coins", 50)

  // Remove data
  PlayerData.remove(playerId, "myplugin:temp_data")

  Invalid keys will throw an error:
  "nonamespace"  → Error: Key must be namespaced
  ":keyonly"     → Error: Empty namespace
  "plugin:"      → Error: Empty key name

  Supported Data Types

  - String
  - Int / Long / Double / Float
  - Boolean
  - List<*> (of primitives)
  - Map<String, *> (of primitives)

Installation

  1. Download the JAR file
  2. Place in your server's plugins folder
  3. Restart the server

For Server Owners

This is a library plugin - it does nothing on its own. Install it if another plugin (like AFKManager) requires it as a dependency.

Data Storage

Player data is stored in plugins/PlayerData/data/ as JSON files, one per player UUID.