注意:此插件的最新版本兼容所有支持 UUID 的 CraftBukkit 或 Spigot 版本!
CSN (ChestShop Notifier) 是一款将 ChestShop 交易记录到 SQLite 或 MySQL 数据库的插件。当店主登录服务器时,系统会提供查看其离线期间销售记录的选项。
安装说明
命令
- /csn help → 显示可用命令
- /csn history [<page>] → 显示数据库中未读的销售历史
- /csn history [<username> [<page>]] → 显示其他玩家的销售历史
- /csn clear [<username>] → 将你的用户的所有销售历史记录标记为已读
- /csn cleandatabase → 删除数据库条目。参数:
--older-than, -o days → 删除早于指定天数的条目
--user, -u username/uuid → 仅删除特定用户的条目
--read-only, -r → 仅删除已读条目(默认行为)
--all, -a → 删除所有条目
- /csn upload → 强制插件将所有数据上传至数据库(在 v1.1 及更高版本中,仅在出现数据库连接问题时使用!)
- /csn reload → 重新加载配置并使用新配置连接数据库
- /csn convert → 将数据库表 csn 转换为 UUID 格式。(表 csn 将被转换为 csnUUID,且用户名表重命名为 csnOLD)
权限
- csn.user → 允许用户在登录时接收通知,并访问 /csn history。
- csn.admin → 超级权限节点。可访问所有命令。(特别是 upload、reload 和 convert)
有关所有权限,请查看 plugin.yml
配置
# Chest Shop Notifier<br />
logging:
admin-shop: true
notifications:
notify-on-user-join: true
delay-seconds: 5
history:
max-rows: 10
query-limit: 10000
debugging:
verbose: true
database:
Possible types: SQLite and MySQL
type: sqlite
dbname: 'database'
MySQL specific settings
host: 'localhost'
port: 3306
username: 'dbadmin'
password: '123456'
ssl: false
clean-on-startup:
enabled: false
parameters: "--older-than 30 --all"
messages:
sales: "&c ** You made &f{sales} sales&c since you last checked."
history-cmd: "&c ** To see them, type &f/csn history&c."
history-caption: "&dChestShop Notifier // &7Latest Commissions"
history-empty: "&cNothing to show."
history-bought: "&a+ &9{player} &7bought &a{count}x&9{item} &f{timeago}&7 ago &a(+{money})"
history-bought-read: "&a+ &7{player} &8bought &a{count}x&7{item} &7{timeago}&8 ago &a(+{money})"
history-sold: "&c- &9{player} &7sold you &c{count}x&9{item} &f{timeago}&7 ago &c(-{money})"
history-sold-read: "&c- &7{player} &8sold you &c{count}x&7{item} &7{timeago}&8 ago &c(-{money})"
history-footer-page: "&c- Page &f{current}&c/&f{pages}&6 - &7/csn history <page>"
history-footer-clear: "&f- &cTo remove all old entries, type /csn clear"
history-clear: "&cHistory cleared! New sales will continue to be recorded."
history-marked-read: "&cUnread entries marked read!"
history-others-not-allowed: "&cYou are not allowed to check the history of {username}"
new translations
reload-cmd: "&dChestShop Notifier // &7Reloading, please wait..."
reload-success: "&aReloaded!"
reload-database-success: "&aDatabase connected!"
reload-database-fail: "&cDatabase failed to connect!"
user-not-found: "&cThe user '{player}' was not found."
page-not-found: "&e{page} &cis not a valid page number input for /csn history <page>!"
page-not-found-other: "&e{page} &cis not a valid page number input for /csn history <user> <page>!"
database-error: "&cInvalid database connection. Please edit config and /csn reload."
database-error-oncommand: "&cDatabase error while executing this command!"
database-cleaned: "&cCleaned database from {amount} entries!"
database-uploaded: "&cBatch executed!"
database-convert: "&cAttempting to convert database..."
database-convert-fail: "&cError while trying to convert! Maybe you don't have a 'csn' table?"
database-converted: "&cDatabase converted!"
unrecognized-command: "&cCommand not recognized. Type /csn help for help."
missing-arguments: "&cMissing parameter arguments: {usage}"
invalid-number: "&c{typo} 不是 {usage} 的有效数字输入!"
invalid-username: "&c{typo} 不是 {usage} 的有效用户名/UUID 输入!"
missing-permission: "&c你缺少权限 {permission}!"
help:
header: "&dChestShop Notifier // &7命令"
help: "&7 /csn &dhelp &f- 插件用法与命令"
history: "&7 /csn &dhistory [<页码>]&f- 查看销售记录"
clear: "&7 /csn &dclear &f- 清除已读的销售记录"
history-others: "&7 /csn &dhistory <用户名> [<页码>]&f- 查看其他账户的销售记录"
clear-others: "&7 /csn &dclear <用户名>&f- 清除其他账户已读的销售记录"
cleandatabase: "&7 /csn &ccleandatabase &f- 删除数据库条目。参数:"
cleandatabase-older-than: "&c --older-than, -o <天数> &f- 删除早于 <天数> 的条目"
cleandatabase-user: "&c --user, -user <用户名/UUID> &f- 仅删除单个用户的条目"
cleandatabase-read-only: "&c --read-only, -r &f- 仅删除已读条目,默认行为"
cleandatabase-all: "&c --all, -a &f- 删除所有条目"
upload: "&7 /csn &cupload &f- 强制更新数据库"
convert: "&7 /csn &cconvert &f- 将数据库转换为 UUID 格式"
reload: "&7 /csn &creload &f- 重新加载配置"
依赖要求
- 安装并运行 ChestShop。
- 可选:如果你希望将信息存储在真正的数据库中或在服务器间共享,则需要 MySQL 服务器。
计划中的功能
支持 UUID 已在 v1.1.2 中完成
查询离线玩家的销售记录 已在 v1.1.2 中完成
忽略 ChestShop 的管理员商店 已在 v1.1.2 中完成
历史记录分页 已在 v1.2 中完成
SQLite 支持 已在 v1.3.3 中完成
- 自动更新器与版本检查器
- 翻译系统 (部分功能在 v1.1.2 中完成,你可以在配置文件中自定义消息)
如需更多功能和提交建议,请使用 GitHub Issues 页面!
源代码与开发构建版
捐赠
欢迎通过 在 GitHub 仓库上创建 Issue 来评论你的想法、报告错误或提出请求。
如果你确实想要进行金钱上的支持,请 点击此处。
演示


Note: The latest version of this plugin works with every UUID-compatible CraftBukkit or Spigot version!
CSN (ChestShop Notifier) is a plugin that records ChestShop transactions to a SQLite or MySQL database. When a shop owner logs onto the server, they will be presented with an option to view sales from when they were offline.
Installation Instructions
Commands
- /csn help → Shows available commands
- /csn history [<page>] → Shows unread sale history from database
- /csn history [<username> [<page>]] → Shows sale history of another player
- /csn clear [<usernamse>] → Marks all sale history as read for your user
- /csn cleandatabase → Remove database entries. Parameters:
--older-than, -o days → Removes entries older than days
--user, -user username/uuid → Removes entries from a single user only
--read-only, -r → Removes only read entries, default behaviour
--all, -a → Removes all entries
- /csn upload → Forces the plugin to upload all data to the database (in v1.1 and higher this should be only used after database connection problems!)
- /csn reload → Reloads configuration and connects to database using new config
- /csn convert → Converts the database table csn to UUIDs. (table csn gets converted in csnUUID and the username table renamed to csnOLD)
Permissions
- csn.user → Allows user to receive notifications when they log in, and access to /csn history.
- csn.admin → Super permission node. Access to all commands. (especially upload, reload and convert)
For all permissions take a look at the plugin.yml
Config
# Chest Shop Notifier<br />
logging:
admin-shop: true
notifications:
notify-on-user-join: true
delay-seconds: 5
history:
max-rows: 10
query-limit: 10000
debugging:
verbose: true
database:
Possible types: SQLite and MySQL
type: sqlite
dbname: 'database'
MySQL specific settings
host: 'localhost'
port: 3306
username: 'dbadmin'
password: '123456'
ssl: false
clean-on-startup:
enabled: false
parameters: "--older-than 30 --all"
messages:
sales: "&c ** You made &f{sales} sales&c since you last checked."
history-cmd: "&c ** To see them, type &f/csn history&c."
history-caption: "&dChestShop Notifier // &7Latest Commissions"
history-empty: "&cNothing to show."
history-bought: "&a+ &9{player} &7bought &a{count}x&9{item} &f{timeago}&7 ago &a(+{money})"
history-bought-read: "&a+ &7{player} &8bought &a{count}x&7{item} &7{timeago}&8 ago &a(+{money})"
history-sold: "&c- &9{player} &7sold you &c{count}x&9{item} &f{timeago}&7 ago &c(-{money})"
history-sold-read: "&c- &7{player} &8sold you &c{count}x&7{item} &7{timeago}&8 ago &c(-{money})"
history-footer-page: "&c- Page &f{current}&c/&f{pages}&6 - &7/csn history <page>"
history-footer-clear: "&f- &cTo remove all old entries, type /csn clear"
history-clear: "&cHistory cleared! New sales will continue to be recorded."
history-marked-read: "&cUnread entries marked read!"
history-others-not-allowed: "&cYou are not allowed to check the history of {username}"
new translations
reload-cmd: "&dChestShop Notifier // &7Reloading, please wait..."
reload-success: "&aReloaded!"
reload-database-success: "&aDatabase connected!"
reload-database-fail: "&cDatabase failed to connect!"
user-not-found: "&cThe user '{player}' was not found."
page-not-found: "&e{page} &cis not a valid page number input for /csn history <page>!"
page-not-found-other: "&e{page} &cis not a valid page number input for /csn history <user> <page>!"
database-error: "&cInvalid database connection. Please edit config and /csn reload."
database-error-oncommand: "&cDatabase error while executing this command!"
database-cleaned: "&cCleaned database from {amount} entries!"
database-uploaded: "&cBatch executed!"
database-convert: "&cAttempting to convert database..."
database-convert-fail: "&cError while trying to convert! Maybe you don't have a 'csn' table?"
database-converted: "&cDatabase converted!"
unrecognized-command: "&cCommand not recognized. Type /csn help for help."
missing-arguments: "&cMissing parameter arguments: {usage}"
invalid-number: "&c{typo} is not a valid number input for {usage}!"
invalid-username: "&c{typo} is not a valid username/uuid input for {usage}!"
missing-permission: "&cYou don't have the permission {permission}!"
help:
header: "&dChestShop Notifier // &7Commands"
help: "&7 /csn &dhelp &f- Plugin usage & commands"
history: "&7 /csn &dhistory [<page>]&f- View sales"
clear: "&7 /csn &dclear &f- Remove read sales"
history-others: "&7 /csn &dhistory <username> [<page>]&f- View sales of another account"
clear-others: "&7 /csn &dclear <username>&f- Remove read sales of another account"
cleandatabase: "&7 /csn &ccleandatabase &f- Remove database entries. Parameters:"
cleandatabase-older-than: "&c --older-than, -o <days> &f- Removes entries older than <days>"
cleandatabase-user: "&c --user, -user <username/uuid> &f- Removes entries from a single user only"
cleandatabase-read-only: "&c --read-only, -r &f- Removes only read entries, default behaviour"
cleandatabase-all: "&c --all, -a &f- Removes all entries"
upload: "&7 /csn &cupload &f- Force update databases"
convert: "&7 /csn &cconvert &f- Convert database to UUIDs"
reload: "&7 /csn &creload &f- Reload configuration"
Requirements
- ChestShop installed and running.
- Optionally: MySQL server if you want to store the information in a real database/share it between servers.
Planned Features
UUID support done in v1.1.2
Look up the sales of offline players done in v1.1.2
Ignore ChestShop's Admin Shop done in v1.1.2
History pagination done in v1.2
SQLite support done in v1.3.3
- Auto updater & version checker
- Translation system (partially done in v1.1.2, you can set your own messages in the config)
For more features and suggestion use the GitHub issues page!
Source Code & Dev Builds
- You can view the source code online at:
- Development builds are available on the Minebench.de Jenkins build server:
Donations
Feel free to comment with your ideas, bugs, or requests, ideally by opening an issue on the github repo.
If you really want to monetarily then click here.
Demonstration


评论 0
登录后参与评分
还没有评论,来抢沙发吧