CoinsDiscordEngine
通过 DiscordSRV 将 CoinsEngine 经济系统与 Discord 无缝集成。
一个用于交易日志记录和通知管理的简单高效的桥梁。
? 描述
CoinsDiscordEngine (CDE) 是一个插件加载项,它将 CoinsEngine 经济插件与 DiscordSRV 连接起来。
该插件的主要目标是在服务器上发生任何金融操作时,向指定的 Discord 频道发送通知。这对于公共交易日志或经济管理审计非常完美。
✨ 主要功能
- 交易日志: 直接将
/pay 命令(玩家 -> 玩家)记录到 Discord。
- 管理员监控: 当管理员给予 (
add) 或扣除 (remove) 货币时发送通知。
- 理由支持: 如果提供了转账或余额变更的理由,则显示该理由。
- 灵活配置: 完全可自定义的消息和命令别名。
- 现代核心: 使用 Kotlin 编写,支持 Paper 及其分支。
? 要求
要运行此插件,请确保您拥有以下组件:
| 组件 |
要求 |
| Java |
版本 21 或更高 |
| 服务端核心 |
Paper, Purpur, Folia (1.21+) |
| CoinsEngine |
版本 2.6.0 |
| DiscordSRV |
版本 1.30.3+ |
? 安装
- 安装并配置 CoinsEngine 和 DiscordSRV。确保它们正常工作。
- 下载 CoinsDiscordEngine
.jar 文件。
- 将其放入服务器的
/plugins/ 文件夹中。
- 重启服务器。
- 打开
plugins/CoinsDiscordEngine/config.conf 并设置 Discord 频道 ID (channelId)。
- 运行
/cde reload 或重启服务器。
? 命令与权限
该插件使用自己的命令系统来包装 CoinsEngine 的功能以触发通知。
ℹ️ 注意: 主命令是 /cde(或者是您在配置中定义的前缀)。
| 命令 |
别名 (可配置) |
描述 |
所需权限 |
/cde pay <player> <amount> [reason] |
pay, send |
向玩家转移货币 |
无 |
/cde add <player> <amount> [reason] |
add, deposit |
给予玩家货币 |
coinsengine.command.give |
/cde remove <player> <amount> [reason] |
remove, withdraw |
从玩家处扣除货币 |
coinsengine.command.take |
/cde reload |
reload |
重载配置 |
coinsengine.command.reload |
⚙️ 配置
config.conf
插件的主要设置。在此定义您的频道 ID、货币和命令别名。
? 显示 config.conf
# 自定义命令的前缀
prefix=mycustomprefix
# 是否启用带前缀的命令 (例如 /mycustomprefix pay)
prefixed-commands=false
# 是否启用不带前缀的命令 (例如 /pay, /add 等)
non-prefixed-commands=true
# CoinsEngine 中的货币 ID (默认为 'coins')
currency-id=coins
# 将发送日志的 Discord 文本频道 ID (请更改此项!)
channel-id=0
# 命令别名
alias {
pay=[
pay,
send
]
add=[
add,
deposit
]
remove=[
remove,
withdraw
]
}
# 由于 CoinsEngine 2.6.0 我需要自己记录操作,因此这些是选项
log {
log-pay-to-file=true # 'operations.log' 位于配置文件附近
log-pay-to-console=false
}
# 切换特定操作的 notification
notification {
pay=true
add=true
remove=true
}
language.conf
消息配置。您可以使用占位符,如 {from}, {to}, {target}, {amount}, {reason} 和 {purpose}。
? 显示 language.conf (默认英文)
something-went-wrong="出错了,交易已取消"
# 玩家间交易消息
# 占位符: {from}, {to}, {amount}, {currency}, {purpose}
transaction-message="`{from}` 发送了 {amount} {currency} 给 `{to}`"
transaction-message-purpose="`{from}` 发送了 {amount} {currency} 给 `{to}`。目的: {purpose}"
# 管理员 'add' 消息
# 占位符: {source}, {target}, {amount}, {currency}, {reason}
add-message="`{target}` 的账户充值了 {amount} {currency}"
add-message-reason="`{target}` 的账户充值了 {amount} {currency}。原因: {reason}"
# 管理员 'remove' 消息
# 占位符: {source}, {target}, {amount}, {currency}, {reason}
remove-message="{amount} {currency} 已从 `{target}` 的账户中提取"
remove-message-reason="{amount} {currency} 已从 `{target}` 的账户中提取。原因: {reason}"
# 货币名词形式(主要针对斯拉夫语系用户)
# ONE: 1
# FEW: 2-4
# MANY: 11-14 及所有其他情况
currency-forms {
one=coin
few=coins
many=coins
}
CoinsDiscordEngine
Seamlessly integrate CoinsEngine economy with Discord via DiscordSRV.
A simple and efficient bridge for transaction logging and notification management.
? Description
CoinsDiscordEngine (CDE) is an addon that connects the CoinsEngine economy plugin with DiscordSRV.
The main goal of this plugin is to send notifications to a specified Discord channel whenever financial operations occur on your server. This is perfect for public transaction logs or economy administration auditing.
✨ Key Features
- Transaction Logs: Logs
/pay commands (player -> player) directly to Discord.
- Admin Monitoring: Notifications when administrators give (
add) or take (remove) currency.
- Reason Support: Displays the reason for the transfer or balance change if one was provided.
- Flexible Configuration: Fully customizable messages and command aliases.
- Modern Core: Written in Kotlin, supports Paper and it's forks.
? Requirements
To run this plugin, ensure you have the following components:
| Component |
Requirement |
| Java |
Version 21 or higher |
| Server Core |
Paper, Purpur, Folia (1.21+) |
| CoinsEngine |
Version 2.6.0 |
| DiscordSRV |
Version 1.30.3+ |
? Installation
- Install and configure CoinsEngine and DiscordSRV. Ensure they are working correctly.
- Download the CoinsDiscordEngine
.jar file.
- Place it into your server's
/plugins/ folder.
- Restart the server.
- Open
plugins/CoinsDiscordEngine/config.conf and set the Discord Channel ID (channelId).
- Run
/cde reload or restart the server.
? Commands & Permissions
The plugin uses its own command system that wraps CoinsEngine functionality to trigger notifications.
ℹ️ Note: The main command is /cde (or your custom prefix defined in the config).
| Command |
Aliases (Configurable) |
Description |
Permission Required |
/cde pay <player> <amount> [reason] |
pay, send |
Transfer currency to a player |
None |
/cde add <player> <amount> [reason] |
add, deposit |
Give currency to a player |
coinsengine.command.give |
/cde remove <player> <amount> [reason] |
remove, withdraw |
Take currency from a player |
coinsengine.command.take |
/cde reload |
reload |
Reload configuration |
coinsengine.command.reload |
⚙️ Configuration
config.conf
Main plugin settings. Define your channel ID, currency, and command aliases here.
? Show config.conf
# Prefix for custom commands
prefix=mycustomprefix
# Whether to enable prefixed commands (e.g. /mycustomprefix pay)
prefixed-commands=false
# Whether to enable non-prefixed commands (e.g. /pay, /add, etc.)
non-prefixed-commands=true
# Currency ID from CoinsEngine (default is 'coins')
currency-id=coins
# Discord Text Channel ID where logs will be sent (CHANGE THIS!)
channel-id=0
# Command aliases
alias {
pay=[
pay,
send
]
add=[
add,
deposit
]
remove=[
remove,
withdraw
]
}
# Since CoinsEngine 2.6.0 I need to log operations myself, so these are options
log {
log-pay-to-file=true # 'operations.log' near config file
log-pay-to-console=false
}
# Toggle notifications for specific actions
notification {
pay=true
add=true
remove=true
}
language.conf
Message configuration. You can use placeholders like {from}, {to}, {target}, {amount}, {reason}, and {purpose}.
? Show language.conf (Default English)
something-went-wrong="Something went wrong, transaction cancelled"
# Player-to-player transaction messages
# Placeholders: {from}, {to}, {amount}, {currency}, {purpose}
transaction-message="`{from}` sent `{to}` {amount} {currency}"
transaction-message-purpose="`{from}` sent `{to}` {amount} {currency}. Purpose: {purpose}"
# Admin 'add' messages
# Placeholders: {source}, {target}, {amount}, {currency}, {reason}
add-message="`{target}` account was replenished with {amount} {currency}"
add-message-reason="`{target}` account was replenished with {amount} {currency}. Reason: {reason}"
# Admin 'remove' messages
# Placeholders: {source}, {target}, {amount}, {currency}, {reason}
remove-message="{amount} {currency} were withdrawn from `{target}`'s account"
remove-message-reason="`{amount} {currency} were withdrawn from `{target}`'s account. Reason: {reason}"
# Currency noun forms (mostly for slavic languge users)
# ONE: 1
# FEW: 2-4
# MANY: 11-14 and everything else
currency-forms {
one=coin
few=coins
many=coins
}
Developed with ❤️ by Animepdf
评论 0
登录后参与评分
还没有评论,来抢沙发吧