Bug Report

一个带有GUI,用于管理玩家举报的简单举报插件。

资源图片
# 错误报告 ## 什么是错误报告? Bug Report 是一个工具,可帮助服务器所有者管理玩家发现的任何错误,这些错误可以通过 GUI 进行访问。这尤其有帮助,因为在玩家提交错误报告时,关于玩家的信息就会被存储。提交错误报告时收集的信息如下: 1. 服务器名称 2. 玩家名称 3. 玩家的 UUID 4. 当前世界名称 5. 完整消息 6. 类别 ID(如果启用该选项) 7. 状态(可以使用 GUI 自定义) 8. 日期和时间 9. 玩家位置 10. 玩家游戏模式 您可以存档/取消存档/删除错误报告,自定义“错误报告详细信息”GUI,自定义所有状态,语言选择器等等! ## 命令 - **bugreport ** - 通过消息或类别 GUI 添加新的错误报告。 - **buglist** - 在设置页面的 GUI 中显示所有报告。 - **buglistsettings** - 显示“错误列表设置”GUI。 - **buglistarchived** - 在 GUI 中查看所有已存档的错误报告。 - **buglinkdiscord ** - 将 Discord Webhook 链接到,以便将所有错误报告发送到该 Webhook。 ## 命令别名 - **/br ** (/bugreport ) - **/bl** (/buglist) - **/bla** (/buglistarchived) - **/bls** (/buglistsettings) - **/bld ** (/buglinkdiscord ) ## 权限 - bugreport.admin - 允许玩家管理错误报告 - bugreport.notify - 接收错误报告通知 - bugreport.archived - 允许玩家访问已存档的错误报告 - bugreport.settings - 允许玩家访问和更改插件设置 - bugreport.list - 允许玩家访问错误报告列表 - bugreport.use - 允许玩家使用错误报告命令 - bugreport.archive - 允许玩家存档错误报告 - bugreport.delete - 允许玩家删除错误报告 ## 计划支持 Bug Report 现在支持 Plan API。要使用 Plan,您需要在 Spigot 服务器上安装 Plan,它应该会自动设置所有内容。 ## 自定义 GUI 支持 Bug Report 现在支持自定义 GUI,以自定义 GUI,只需导航到 `custom_bug_report_details_GUI.yml` 文件,然后选择您喜欢的任何风格的 GUI。目前处于 BETA 阶段,因此很可能存在错误。 YML 文件如下: ```yaml # 插槽总是从 0 开始,一直到 max guiSize 值。 # 有效的 bugReportItem 实例列表为 # BugReporter, BugReportUUID, BugReportWorld, BugReportMessage, BugReportCategory, BugReportStatus, BugReportTimestamp # BugReportLocation, BugReportGamemode, BugReportArchive, BugReportBack, BugReportDelete, BugReportServerName # 这些项目中的任何一个都可以拥有纹理,纹理列表可以从这里获得:https://minecraft-heads.com/custom-heads # 然后在“For Developers:”部分下选择“Value”,并将其粘贴到纹理字段中。 # 唯一接受数组的材料是 BugReportStatus。任何其他 bugReportItem 不接受这种类型! # 可以拥有纹理的所有项目列表如下: # BugReportUUID, BugReportWorld, BugReportMessage # BugReportCategory, BugReportTimestamp, BugReportLocation # BugReportGamemode, BugReportArchive, BugReportDelete, BugReportServerName # BugReportStatus 将在提供自定义状态时终止。 bug_report_details_GUI: guiSize: 45 # GUI 大小在 9 到 54 之间,但必须是 9 的倍数。 items: - slot: 0 bugReportItem: BugReportServerName material: DIAMOND texture: "" - slot: 2 bugReportItem: BugReporter material: PLAYER_HEAD # 对于玩家纹理,使用 %player_texture%。仅适用于 BugReporter。 texture: "%player_texture%" - slot: 4 bugReportItem: BugReportUUID material: NAME_TAG texture: "" - slot: 6 bugReportItem: BugReportWorld material: GRASS_BLOCK texture: "" - slot: 8 bugReportItem: BugReportMessage material: PAPER texture: "" - slot: 18 bugReportItem: BugReportCategory material: CHEST texture: "" - slot: 20 bugReportItem: BugReportStatus material: [ LIME_DYE, RED_DYE ] # 第一个项目是“活动”,第二个是“已存档” - slot: 22 bugReportItem: BugReportTimestamp material: CLOCK texture: "" - slot: 24 bugReportItem: BugReportLocation material: COMPASS texture: "" - slot: 26 bugReportItem: BugReportGamemode material: DIAMOND_SWORD texture: "" - slot: 38 # 对于 BugReportArchive 和 BugReportUnArchive,只有一个会在 GUI 中显示,另一个将被隐藏。 bugReportItem: BugReportUnArchive material: PLAYER_HEAD texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDVjNTg4YjllYzBhMDhhMzdlMDFhODA5ZWQwOTAzY2MzNGMzZTNmMTc2ZGM5MjIzMDQxN2RhOTNiOTQ4ZjE0OCJ9fX0=" - slot: 38 bugReportItem: BugReportArchive material: PLAYER_HEAD texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2Y5YjY3YmI5Y2MxYzg4NDg2NzYwYjE3MjY1MDU0MzEyZDY1OWRmMmNjNjc1NTc1MDA0NWJkNzFjZmZiNGU2MCJ9fX0=" - slot: 40 bugReportItem: BugReportBack material: BARRIER - slot: 42 bugReportItem: BugReportDelete material: PLAYER_HEAD texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmUwZmQxMDE5OWU4ZTRmY2RhYmNhZTRmODVjODU5MTgxMjdhN2M1NTUzYWQyMzVmMDFjNTZkMThiYjk0NzBkMyJ9fX0 ``` ## 占位符 API 支持 Bug Report 现在支持占位符 API,错误报告的密钥如下,未来会有更多。 %bugreports_totalBugReports% - (**返回错误报告的总数**) %bugreports_totalArchivedBugReports% - (**返回已存档错误报告的总数**) %bugreports_totalNonArchivedBugReports% - (**返回未存档错误报告的总数**) ## Discord 支持 如果您需要任何支持或希望向 Bug Report 添加任何功能,您可以在这里加入 Discord - https://discord.gg/jXsV3xQJD4。 示例主配置文件 ```yaml webhookURL: https://discord.com/api/webhooks/ enableDiscordWebhook: false enablePluginReportBook: false enableBugReportNotifications: true # 以下两者之一必须为真,两者都不能为真同时为真 enablePluginReportCategoriesGUI: false # 如果您希望在执行 /bugreport 后出现类别选择 GUI,则设置为 true enablePluginReportCategoriesTabComplete: false # 如果您希望在执行 /bugreport 后出现类别自动完成,则设置为 true。不会打开 GUI language: en_US update-checker: true update-checker-join: true # # 可用占位符: # # Aqua, Black, Blue, Dark_Aqua, Dark_Blue # Dark_Gray, Dark_Green, Dark_Purple, Dark_Red # Gold, Gray, Green, Light_Purple, Red, White, Yellow discordEmbedColor: Green discordEmbedTitle: New Bug Report discordEmbedFooter: Bug Report v0.12.3 discordEmbedThumbnail: https://www.spigotmc.org/data/resource_icons/110/110732.jpg discordEnableThumbnail: true discordEnableUserAuthor: true discordIncludeDate: true # 如果您想 ping 一个角色或成员,您可以在这里添加他们。您可以添加多个角色和成员。 # 该角色或成员将在您设置在 discordPingMessage 中的消息中被 ping。 # 您不需要添加"<@" 字符或 "<@&" 字符到角色或成员。它们将自动添加。 discordPingMessage: A new Bug Report has been submitted discordEnablePing: true discordPingMembers: - ' ' discordPingRoles: - ' ' enableBungeeCordSendMessage: true enableBungeeCordReceiveMessage: true useTitleInsteadOfMessage: false enablePlayerHeads: true refreshPlayerHeadCache: 1d # 默认,1m, 1h, 1d, 1w, 1mo, 1y metrics: true # 启用或禁用指标 serverName: "My Server" max-reports-per-player: 25 # 0 = 无限制 report-confirmation-message: Thanks for submitting a report! bug-report-cooldown: 0 # 0 = 禁用 # # 可用占位符: # # Aqua, Black, Blue, Dark_Aqua, Dark_Blue # Dark_Gray, Dark_Green, Dark_Purple, Dark_Red # Gold, Gray, Green, Light_Purple, Red, White, Yellow pluginColor: Yellow # 它可以是 "mysql" 或 "local"。 # 如果您选择 "mysql",则必须填写以下数据库部分。 # 如果您选择 "local",则不需要任何配置。 databaseType: local database: host: localhost port: 3306 database: database username: root password: password # 占位符通过 PlaceholderAPI 允许使用在 discordEmbedFields 中。 # 例如:您可以创建一个显示玩家生物群落的字段,错误报告在该生物群落中创建。 # 对于值,选择: "%player_biome%"(不带 "")。这适用于 PlaceholderAPI 支持的任何其他占位符。 discordEmbedFields: - name: "Username" id: 1 value: "%report_username%" inline: true - name: "UUID" id: 2 value: "%report_uuid%" inline: true - name: "World" id: 3 value: "%report_world%" inline: true - name: "Location (X, Y, Z)" id: 4 value: "%report_location%" inline: true - name: "Gamemode" id: 5 value: "%report_gamemode%" inline: true - name: "Status" id: 6 value: "%report_status%" inline: true - name: "Category" id: 7 value: "%report_category%" inline: true - name: "Sever Name" id: 8 value: "%report_server_name%" inline: true - name: "Full Message" id: 9 value: "%report_full_message%" inline: false reportCategories: - name: Plugin Bug id: 1 description: Report a bug with a plugin item: minecraft:book color: red - name: Server Bug id: 2 description: Report a bug with the server item: minecraft:emerald color: green - name: Resource Bug id: 3 description: Report a bug with the resource pack item: minecraft:map color: blue - name: Other id: 4 description: Report something else item: minecraft:paper color: yellow statuses: - name: Open description: Report is open icon: minecraft:green_dye color: GREEN id: 1 - name: Archived description: Report is archived icon: minecraft:red_dye color: RED id: 2 - name: Pending description: Report is pending icon: minecraft:yellow_dye color: YELLOW id: 3 - name: Ignored description: Report is ignored icon: minecraft:white_dye color: WHITE id: 4 ``` ## 语言文件 新的语言文件可以在这里查看 - https://github.com/ItsLeon15/Bug-Reports/tree/main/src/main/resources/languages ## 指标收集 Bug Report 使用 **bStats** 收集有关服务器的匿名统计信息。如果您想禁用指标收集,可以通过编辑 **plugins/bStats/config.yml** 文件来完成。