OpGuard

作者:Rezz 发布时间:2016年5月14日 原生版本:未知 测试支持:1.8,1.9,1.10,1.11,1.12,1.13,1.14,1.15,1.16

密码保护/操作等!保护您的服务器免受操作漏洞和恶意插件的攻击。

点此下载

插件详细介绍

🛡️ OpGuard 是一款保护 Minecraft 服务器免受恶意插件和利用漏洞攻击的插件。它通过维护一个经过验证的管理员列表,并使用自定义的 /opguard 命令替代原生的 /op/deop 命令来实现保护。

🛡️ OpGuard

🔑 主要功能

  • 密码保护: 可以设置密码来限制 /op (/opguard op) 命令的使用,防止不信任的管理员或恶意用户提权。
  • 阻止原生指令: 禁用原生的 /op/deop 命令,所有操作必须通过 /opguard 进行。
  • 惩罚机制: 可以配置多个指令来惩罚试图通过非正常手段获取管理员权限的玩家。
  • 隐蔽性: 插件可以对 /help/? 和 Tab 键自动补全隐藏,如果服务器禁用了 /plugins 命令,玩家将无法得知插件的存在。
  • 详细日志: 记录插件的所有操作,日志内容可在配置文件中修改。

⚙️ 命令

  • /opguard (别名: /og)

📝 用法

  • /opguard op <玩家> <密码 (如果已设置)>
    • 赋予玩家管理员权限。如果 OpGuard 设置了密码,则必须提供密码。
  • /opguard deop <玩家> <密码 (如果已设置)>
    • 移除玩家的管理员权限。如果 OpGuard 设置了密码,则必须提供密码。
  • /opguard list
    • 列出所有已验证的管理员。
  • /opguard password <新密码>
    • 设置 OpGuard 的密码。此操作仅在 OpGuard 尚未设置密码时有效。
  • /opguard reset <当前密码>
    • 移除 OpGuard 的密码。必须提供当前密码才能移除。
  • /opguard reload <密码 (如果已设置)>
    • 重新加载 OpGuard 的配置。如果 OpGuard 设置了密码,则必须提供密码。

🔑 权限

  • opguard.warn
    • 接收来自 OpGuard 的通知和警告。
    • 默认情况下,拥有管理员权限的玩家拥有此权限。

只有经过验证的管理员和控制台可以使用 /opguard 命令。

📝 配置示例


# OpGuard Configuration

# The password required to use /opguard op, /opguard deop, and /opguard reload
# To remove the password, set it to "none" and run /opguard reload
password: "none"

# List of commands to execute when a player attempts to gain op without permission.
# {player} will be replaced with the player's name.
punishment-commands:
  - "kick {player} Attempted unauthorized op"
  - "say {player} tried to become op without permission!"

# Prevent players from using /op and /deop
# Setting this to false will allow players to use /op and /deop
# even though OpGuard is installed.
# If you want to let players use /op and /deop, remove OpGuard instead of setting this to false.
prevent-default-op: true

# Prevent players from seeing OpGuard in /plugins
# When true, players without the opguard.warn permission will
# not see OpGuard in /plugins.
hide-from-plugins: true

# Prevent players from tab-completing /opguard and seeing it in /help
# When true, players without the opguard.warn permission will
# not be able to tab-complete /opguard or see it in /help.
hide-from-help: true

# Log all OpGuard activity to a file
# When true, all OpGuard activity will be logged to a file in the OpGuard folder.
# If you are experiencing issues with OpGuard, please enable this option.
enable-logging: true

# List of items to log
# Valid options:
#   - op-attempt: Logs when a player attempts to use /op or /deop
#   - opguard-command: Logs when a player uses an OpGuard command
#   - op-change: Logs when a player is opped or deopped through OpGuard
#   - config-reload: Logs when the config is reloaded
logged-items:
  - "op-attempt"
  - "opguard-command"
  - "op-change"
  - "config-reload"

# Message to send to players when they try to use /op or /deop without permission
# {player} will be replaced with the player's name.
no-permission: "&cYou do not have permission to use this command."

# Message to send to players when they try to use an OpGuard command without permission
# {player} will be replaced with the player's name.
no-opguard-permission: "&cYou do not have permission to use this command."

# Message to send to players when they try to use /opguard reload without the correct password
incorrect-password: "&cIncorrect password."

# Message to send to players when they try to set a new password while one is already set
password-already-set: "&cPassword already set. Reset the current password before setting a new one."

# Message to send to players when they try to reset the password without providing the correct current password
incorrect-current-password: "&cIncorrect current password."

# Message to send to players when they successfully set a new password
password-set: "&aPassword successfully set!"

# Message to send to players when they successfully reset the password
password-reset: "&aPassword successfully reset!"

# Message to send to players when they successfully reload the config
config-reloaded: "&aConfig reloaded!"

# Message to send to players when they try to op a player without providing the password
password-required: "&cPassword required."

# Message to send to players when they successfully op a player
player-opped: "&aSuccessfully opped {player}."

# Message to send to players when they successfully deop a player
player-deopped: "&aSuccessfully deopped {player}."

# Message to send to players when they try to op or deop a player that doesn't exist
player-not-found: "&cPlayer not found."

🔗 链接