Home›Java›Mods›TideEconomy
TideEconomy
ModsJava

TideEconomy

Java mod listed for Minecraft 26.x. Downloads from the MC Java Mods app on Android.

by Suttanfix · on Modrinth

⬇ Download on Modrinth

TideEconomy (下滑可找到中文翻译)

A lightweight standalone economy core plugin for Minecraft, providing a basic currency system and an HTTP API interface.

Introduction

TideEconomy is a standalone economy core plugin that provides a complete currency system for your server. It has a built-in coin currency, stores asset data by player UUID, and provides both in-game commands and an HTTP API for easy integration with other plugins.

Features

Installation

  1. Download the latest version of TideEconomy.jar
  2. Place the jar file into the server's plugins/ directory
  3. Restart the server or load it using a plugin manager

Configuration

Configuration file location: plugins/TideEconomy/config.yml

enableapiserver: true   # Whether to enable the API server
apiserverport: 7200     # API server port
passkey: "77664455"     # Passkey (plaintext)

After modifying the configuration, run /te_reload or restart the plugin for the changes to take effect.

Commands

/coin

Check your own balance.

/pay <player> <count>

Transfer money to another player.

/te_admin <action> <player> <count>

Modify a player's balance as an administrator.

/te_reload

Reload the configuration file and restart the API server.

HTTP API

TideEconomy has a built-in HTTP API server that allows other plugins to manage player assets through POST requests.

Endpoint Overview

Endpoint Path Description
Add assets /addplayercoin Add coin to a player
Deduct assets /takeplayercoin Deduct coin from a player
Overwrite assets /setplayercoin Set a player's balance to the specified value

Request Format

All endpoints use POST requests with a JSON request body:

{
  "uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
  "value": 100,
  "passkey": "77664455"
}
Field Type Description
uuid string Target player UUID
value long Amount
passkey string Passkey (plaintext)

Response Format

Success:

{
  "success": true,
  "message": "Operation successful",
  "balance": 200
}

Failure:

{
  "success": false,
  "message": "Operation failed (amount validation failed or insufficient balance)"
}

Call Example

curl -X POST http://127.0.0.1:7200/addplayercoin \
  -H "Content-Type: application/json" \
  -d '{"uuid":"069a79f4-44e9-4726-a5be-fca90e38aaf5","value":100,"passkey":"77664455"}'

For the complete API documentation, please refer to API.md in the project repository.

Data Storage

Permissions

Permission Node Description Default
tideeconomy.admin Permission for admin commands (te_admin, te_reload) OP

FAQ

Q: Why does the API request return 403? A: The API server only accepts requests from 127.0.0.1. Please make sure to call it from the local machine.

Q: Why does the API request return 401? A: The passkey is incorrect. Please confirm that the passkey in the request matches the value in config.yml, and that you have run /te_reload after modifying the configuration.

Q: Can a player's balance be negative? A: No. The plugin prevents any operation that would cause a negative balance.

Q: How can other plugins integrate with it? A: Other plugins can call the API endpoints through HTTP POST requests. See the API documentation for details.

If you encounter any issues or have suggestions while using it, you can contact the author Suttanfix: qq3954519717

TideEconomy

一个轻量级的 Minecraft 独立经济核心插件,提供基础货币系统与 HTTP API 接口。

简介

TideEconomy 是一个独立的经济核心插件,为你的服务器提供一套完整的货币系统。它内置 coin 货币,按玩家 UUID 存储资产数据,并提供游戏内命令与 HTTP API 两种操作方式,方便其他插件集成。

功能特性

安装

  1. 下载最新版本的 TideEconomy.jar
  2. 将 jar 文件放入服务器的 plugins/ 目录
  3. 重启服务器或使用插件管理器加载

配置

配置文件位置:plugins/TideEconomy/config.yml

enableapiserver: true   # 是否开启 API 服务器
apiserverport: 7200     # API 服务器端口
passkey: "77664455"     # 通行密钥(明文)

修改配置后,执行 /te_reload 或重启插件生效。

命令

/coin

查看自己的资产。

/pay <player> <count>

向其他玩家转账。

/te_admin <action> <player> <count>

以管理员身份修改玩家资产。

/te_reload

重载配置文件并重启 API 服务器。

HTTP API

TideEconomy 内置 HTTP API 服务器,允许其他插件通过 POST 请求操作玩家资产。

接口概览

接口 路径 说明
增加资产 /addplayercoin 为玩家增加 coin
扣除资产 /takeplayercoin 从玩家扣除 coin
覆盖资产 /setplayercoin 将玩家资产设定为指定值

请求格式

所有接口均为 POST 请求,请求体为 JSON:

{
  "uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
  "value": 100,
  "passkey": "77664455"
}
字段 类型 说明
uuid string 目标玩家 UUID
value long 金额
passkey string 通行密钥(明文)

响应格式

成功:

{
  "success": true,
  "message": "操作成功",
  "balance": 200
}

失败:

{
  "success": false,
  "message": "操作失败(金额校验不通过或余额不足)"
}

调用示例

curl -X POST http://127.0.0.1:7200/addplayercoin \
  -H "Content-Type: application/json" \
  -d '{"uuid":"069a79f4-44e9-4726-a5be-fca90e38aaf5","value":100,"passkey":"77664455"}'

完整 API 文档请参阅项目仓库中的 API.md。

数据存储

权限

权限节点 说明 默认
tideeconomy.admin 管理命令权限(te_admin、te_reload) OP

常见问题

Q:为什么 API 请求返回 403? A:API 服务器仅接受来自 127.0.0.1 的请求,请确保从本机调用。

Q:为什么 API 请求返回 401? A:通行密钥错误。请确认请求中的 passkey 与 config.yml 中的值一致,且修改配置后已执行 /te_reload。

Q:玩家资产可以为负数吗? A:不可以。插件会阻止任何导致资产为负数的操作。

Q:如何让其他插件集成? A:其他插件可通过 HTTP POST 请求调用 API 接口,详见 API 文档。

如在使用中发现问题或有建议,可联系作者Suttanfix: qq3954519717

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more