Bug Report

插件

· 作者 ItsLeon15

一个带有图形界面的简单错误报告插件,用于管理玩家提交的报告。

0 本站下载 0 关注 更新于 1 年前

最新 0.13.0 · 26.2 · Bukkit / Paper

一键开服(送7天)

错误报告

什么是错误报告?

Bug Report 是一款辅助服务器管理员管理玩家发现的任何错误的工具,并通过图形用户界面(GUI)进行访问。由于在玩家提交错误报告时会立即存储该玩家的相关信息,因此这一功能尤为实用。收集到的信息包括:

  1. 服务器名称
  2. 玩家名称
  3. 玩家 UUID
  4. 当前世界名称
  5. 完整消息内容
  6. 分类 ID(如果开启了相关选项)
  7. 状态(可通过 GUI 自定义)
  8. 日期与时间
  9. 玩家位置
  10. 玩家游戏模式

您可以归档/取消归档/删除错误报告、自定义“错误报告详情”GUI、自定义所有状态、语言选择器等等!

命令

  • bugreport <Message> - 通过消息或针对各个分类的 GUI 添加新的错误报告。
  • buglist - 显示包含设置页面中所有报告的 GUI。
  • buglistsettings - 显示错误列表设置 GUI。
  • buglistarchived - 以 GUI 形式查看所有已归档的错误报告。
  • buglinkdiscord <Webhook URL> - 链接 Discord Webhook 以将所有 Bug Reports 发送过去。

命令别名

  • /br <message> (/bugreport <Message>)
  • /bl (/buglist)
  • /bla (/buglistarchived)
  • /bls (/buglistsettings)
  • /bld <Webhook URL> (/buglinkdiscord <Webhook URL>)

权限

  • bugreport.admin - 允许玩家管理错误报告
  • bugreport.notify - 接收错误报告通知
  • bugreport.archived - 允许玩家访问已归档的错误报告
  • bugreport.settings - 允许玩家访问并更改插件的设置
  • bugreport.list - 允许玩家查看错误报告列表
  • bugreport.use - 允许玩家使用错误报告命令
  • bugreport.archive - 允许玩家归档错误报告
  • bugreport.delete - 允许玩家删除错误报告

Plan 支持

Bug Report 现在支持 Plan API。要配合 Plan 使用 Bug Report,您需要在 Spigot 服务器上安装 Plan,它会自动完成所有配置。

自定义 GUI 支持

Bug Report 现在支持自定义 GUI 的功能。要自定义 GUI,只需导航至 custom_bug_report_details_GUI.yml 文件,然后选择您喜欢的任意风格 GUI。目前处于 BETA 阶段,可能会发现一些错误。YML 文件如下所示:

# 槽位始终从 0 开始,直到达到最大 guiSize 值。
# 有效的 bugReportItem 实例列表为:
# BugReporter, BugReportUUID, BugReportWorld, BugReportMessage, BugReportCategory, BugReportStatus, BugReportTimestamp
# BugReportLocation, BugReportGamemode, BugReportArchive, BugReportBack, BugReportDelete, BugReportServerName
# 上述任何项目都可以拥有纹理,纹理列表可从以下网址获取:https://minecraft-heads.com/custom-heads
# 然后在“For Developers:”部分下选择“Value”,并将其粘贴到 texture 字段中。
# 唯一接受材质数组的材质是 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

Placeholder API 支持

Bug Report 现在支持 Placeholder API,其键值如下,未来还将增加更多。

%bugreports_totalBugReports% - (返回错误报告的总数) %bugreports_totalArchivedBugReports% - (返回已归档的错误报告总数) %bugreports_totalNonArchivedBugReports% - (返回未归档的错误报告总数)

Discord 支持

如果您需要任何支持或希望向 Bug Report 添加功能,您可以加入 Discord 服务器:。

示例主配置文件

webhookURL: https://discord.com/api/webhooks/

enableDiscordWebhook: false
enablePluginReportBook: false
enableBugReportNotifications: true

# 两者中必须有一个为 true,不能同时为 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

# 如果您想 @提及某个角色或成员,可以在此处添加。您可以添加多个角色和成员。
# 角色或成员将在您在 discordPingMessage 中设置的消息中被 @提及。
# 您不需要在角色或成员前添加 "<@" 或 "<@&" 字符,它们会自动添加。
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

# 您可以使用 & 符号进行颜色编码,例如 "&8[&6Bug Report&8]&9"。
# 如需查看颜色代码列表,请访问 https://htmlcolorcodes.com/minecraft-color-codes(格式代码无效!)
# 这将覆盖 pluginColor 选项。
pluginTitle: '[Bug Report]'

# 此选项可以是 "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

语言文件

新的语言文件可在此处查看:

指标收集

Bug Report 使用 bStats 收集服务器的匿名统计数据。如果您希望禁用指标收集,可以通过编辑 plugins/bStats/config.yml 文件来实现。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源