SQLiteConnectMC
一款简单的插件,允许你将任何 SQLite 数据库与你的 Minecraft 服务器集成,并执行各种查询。
查看 To-Do.md 以了解插件的进度。
| 支持的平台 |
| Bukkit |
| Spigot |
| Paper |
| Purpur |
| Folia |
| Canvas |
上述平台已测试与该插件兼容。上述平台的 任何 分支版本应该也能正常工作。
重要提示
- SRVBase 发布版并非通常的面板和控制台版本。SRVBase 发布版暴露的是 Postgresql 连接,并将配置中添加到数据库视为模式(schema)。
- 请参阅 SRVBase 的 README.md 文件或 doc.md 文件。
SRVBase 发布版需要更多的技术知识才能使用,仅在你清楚自己在做什么的情况下使用它们。
功能
- 游戏内查询:通过
/sqlite query <query> 即时执行查询。
- 多数据库支持:配置多个 SQLite 文件并在游戏中切换。
- 安全的 Web 面板:运行一个带有会话 Cookie 和 CSRF 检查的简单登录保护查询控制台。
- 模式切换:通过配置文件暴露控制台/玩家命令、Web 面板或两者兼有。
- 可配置的行数限制:保留默认的 50 行上限,或将
query.row-limit 设置为 -1 以获取无限制的结果。
- 异步且高性能:数据库任务在异步线程中运行,确保服务器完美运行。
- 故障安全机制:只读和读写模式可在配置中进行设置,默认为只读以防止任何覆盖。
安装
- 下载最新的 jar 文件。
- 将其放入服务器的
plugins/ 文件夹中。
- 重启服务器。
- 打开生成的
plugins/SQLiteConnectMC/config.yml 并添加你想要检查的数据库。旧配置文件会自动迁移,并备份为 config.v<old-version>.bak.yml。
- 将
access.mode 设置为 CONSOLE_PLAYER、WEB_PANEL 或 BOTH,如果不想使用默认的 50 行,请调整 query.row-limit。
- 如果你想要面板,请使用
/sqlite panel mail add <mail> pass set <pass> 创建一个登录账户。
- 运行
/sqlitereload 以应用配置更改并启动或重启面板。
命令
/sqlite query <query> - 在选定的数据库中安全地运行查询。
/sqlite list tables - 列出选定数据库中的所有表。
/sqlite list databases - 列出所有配置的数据库。
/sqlite select database <name> - 切换选定的数据库。
/sqlite help panel - 显示面板状态、URL 和账户命令用法。
/sqlite panel mail add <mail> pass set <pass> - 创建或重置 Web 面板登录。
/sqlite help - 显示游戏内帮助菜单。
/sqlitereload - 重新加载配置并重新连接到数据库。
权限
sqliteconnectmc.admin : 所有命令必需(默认为服务器操作员)。
文档
有关配置的更多详细信息,请查看 doc.md 文件![警告:该文档文件由 AI 生成以节省时间,但仍然非常有用。]
SQLiteConnectMC
A simple plugin that lets you integrate any SQLite DB with your Minecraft server and lets you execute all sorts of queries.
See To-Do.md for plugin progress.
| Supported Platforms |
| Bukkit |
| Spigot |
| Paper |
| Purpur |
| Folia |
| Canvas |
The platforms stated above have been tested to work with the plugin. Any forks of the above platforms should also work.
IMPORTANT NOTE
- The SRVBase releases are not the usual panel and console releases. The SRVBase releases expose a Postgresql connection and considers any added database to the config as a schema.
- Please refer to the SRVBase README.md file or the doc.md file.
The SRVBase releases require more technical knowledge to use, only use them if you know what you are doing.
Features
- In-Game Queries: Execute queries instantly with
/sqlite query <query>.
- Multiple Databases: Configure several SQLite files and switch between them in-game.
- Secure Web Panel: Run a simple login-protected query console with session cookies and CSRF checks.
- Mode Switching: Expose console/player commands, the web panel, or both through config.
- Configurable Row Limit: Keep the default 50-row cap or set
query.row-limit to -1 for unlimited results.
- Async and Highly Performant: Database tasks run asynchronously to keep your server ticking perfectly.
- Fail-Safe: Read-only and read-write modes and be configured in the config, default is read-only to prevent any overrides.
Installation
- Download the latest jar file.
- Drop it into your server's
plugins/ folder.
- Restart your server.
- Open the
plugins/SQLiteConnectMC/config.yml that gets generated and add the databases you want to inspect. Older config files are migrated automatically and backed up as config.v<old-version>.bak.yml.
- Set
access.mode to CONSOLE_PLAYER, WEB_PANEL, or BOTH, and adjust query.row-limit if you want something other than the default 50 rows.
- If you want the panel, create a login with
/sqlite panel mail add <mail> pass set <pass>.
- Run
/sqlitereload to apply config changes and start or restart the panel.
Commands
/sqlite query <query> - Run a query safely on the selected database.
/sqlite list tables - List all tables in the selected database.
/sqlite list databases - List all configured databases.
/sqlite select database <name> - Switch the selected database.
/sqlite help panel - Show the panel status, URL, and account command usage.
/sqlite panel mail add <mail> pass set <pass> - Create or reset a web panel login.
/sqlite help - Displays an in-game help menu.
/sqlitereload - Reload the config and reconnect to the database.
Permissions
sqliteconnectmc.admin : Required for all commands (Defaults to Server Operators).
Documentation
For more details on configuration, please check the doc.md file! [Warning: The doc file is AI generated to save time but is still pretty helpful.]
评论 0
登录后参与评分
还没有评论,来抢沙发吧