Skip to content

Minecraft Java server side Frabric Mod that allows the admin to manage chest refills.

License

Notifications You must be signed in to change notification settings

gbti-network/minecraft-mod-travelers-chest

Repository files navigation

Traveler's Chest

A Minecraft mod that enables administrators to manage refillable chests dynamically. Designed for multiplayer servers using Fabric for Minecraft 1.21.1, the mod provides control over chest content, cooldowns, and interactions.

✨ Features

  • Refillable chests with customizable cooldowns
  • Administrator tools for creating, editing, and destroying refillable chests
  • Protected chests to prevent unauthorized modifications or destruction

🚀 Installation

  1. Install Fabric Loader and Fabric API.
  2. Download the latest version of Traveler's Chest from the releases page.
  3. Place the .jar file in your server's mods folder.
  4. Start your server to generate configuration files.

🔧 Configuration

Config Files

  • config/travelers-chest/travelers_chest_config.txt

    • Example Contents:
      debug_logging=false
    • Enables or disables debug logging for detailed troubleshooting.
  • config/travelers-chest/travelers_chests.json

    • Stores data about all managed chests, including their cooldowns, items, and positions.

🛠️ Usage

Commands

Administrators can manage chests using commands:

  1. Create a Traveler's Chest:

    • Command: /travelers_chest create [cooldown_in_seconds]
    • Default cooldown: 30 minutes (1800 seconds)
    • Example: /travelers_chest create 600 creates a chest with a 10-minute cooldown.
  2. Edit a Traveler's Chest:

    • Command: /travelers_chest edit [new_cooldown_in_seconds]
    • Updates the cooldown of an existing chest.
    • Example: /travelers_chest edit 1200 sets the cooldown to 20 minutes.
  3. Destroy a Traveler's Chest:

    • Command: /travelers_chest destroy
    • Removes a Traveler's Chest and its data.

Chest Functionality

  • Protected Chests: Players without sufficient permissions cannot break or modify these chests.
  • Refill Mechanism: Automatically replenishes chest contents based on saved configurations after the cooldown period expires.
  • Double Chest Support: Handles single and double chests seamlessly.

Debug Logging

Enable debug logging in travelers_chest_config.txt for detailed logs of mod operations, such as chest refills and command execution:

debug_logging=true

Logs are output to the server console.

📄 JSON Structure

Chests are stored in travelers_chests.json with the following schema:

  • lastRefreshed: Timestamp of the last refill
  • chestCooldown: Cooldown in seconds
  • worldKey: World identifier
  • items: List of stored items
  • itemPositions: Item slot positions

Example:

{
  "123456789": {
    "lastRefreshed": 12345678,
    "chestCooldown": 1800,
    "worldKey": "minecraft:overworld",
    "items": [{"nbt": "{id:\"minecraft:diamond\",Count:1b}"}],
    "itemPositions": [0]
  }
}

🤝 Support

To support the development of Traveler's Chest, please join the GBTI Network for access to:

  • 🚀 Exclusive tools and resources
  • 🛠️ Development support
  • 🎮 Private Minecraft Server

Other Ways to Contribute

📄 License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.