Advanced-AdminMode

插件

· 作者 The_To_Craft

添加 `/adminmode`:切换临时 OP 或自定义权限,同时你的物品栏、位置和统计数据会安全存储,直到你切换回来。

0 本站下载 0 关注 更新于 2 周前

最新 1.3-Release · 26.3 · Paper / Purpur

一键开服(送7天)

Logo

一款简单、轻量且可自定义的实用插件,专为 Paper 服务器设计,允许管理员在安全存储其物品栏、位置和状态的同时,获得临时权限或 OP(操作员)身份。

需要帮助?请查看我们的 Discord 服务器!

Adminmode softdepends(软依赖)于 Luckperms,用于配置中的权限列表选项。

功能特性

  • 通过 /adminmode 命令在普通玩家状态与操作员/管理员之间切换
  • 自动保存并恢复你的物品栏、位置和状态(详见下方的已保存数据)
  • 支持通过配置文件完全自定义权限,可选择使用 LuckPerms 替代完整的 OP 权限
  • 当你退出 adminmode 时,会将所有状态恢复至进入前的样子
  • 如果在配置中未禁用,管理员将获得一个指南针,可用于传送至其他玩家、进入上帝模式或切换游戏模式。

已保存数据

当 adminmode 处于激活状态时,插件可以保存并在之后恢复以下数据:

  • 坐标与旋转角度
  • 物品栏、护甲及副手物品
  • 游戏模式
  • 选中的快捷栏槽位
  • 等级与经验值 (XP)
  • 生命值
  • 饥饿值与饱和度
  • 活跃的药水效果及其持续时间

上述每一项都可以在配置文件中单独启用或禁用。

命令

命令 权限 功能
/adminmode adminmode.use* 开启或关闭 adminmode
/adminmode on adminmode.use* 开启 adminmode(如果尚未开启)
/adminmode off adminmode.use* 关闭 adminmode(如果尚未关闭)
/adminmode off force-survival adminmode.use* 关闭 adminmode 并强制切换到生存模式,即使之前保存的是其他游戏模式
/adminmode reload adminmode.reload* 重新加载配置文件并添加任何缺失的键值

拥有 adminmode.notify* 权限的玩家会在工作人员切换 adminmode 时收到消息。

* 这些权限仅为默认值——你可以在配置文件中修改它们。

配置文件

以下是默认配置文件,几乎所有内容都是可定制的,但你也可以直接使用默认设置而不会遇到任何问题。

# ================================
#         AdminMode Config
# ================================
# Missing Features, Bugs or Support needed? -> here's our dc : https://discord.gg/DyX736yAMz

# ----- Permission handling -----
# How players get admin permissions while adminmode is active.
#
# OPERATOR         -> grants full OP (not recommended, very broad access)
# PERMISSIONS-LIST -> grants only the permissions listed below (REQUIRES LUCKPERMS)
permission-method: OPERATOR

# Only used if permission-method is PERMISSIONS-LIST
# REQUIRES LUCKPERMS
#
# Two kinds of entries are allowed here:
#   - a plain string  -> always granted while in adminmode
#   - an "if"/"then" block -> only granted if the player already has the
#     permission listed in "if"; everything under "then" is granted on top
permissions-list:
  # Vanilla admin commands
  - minecraft.command.gamemode
  - minecraft.command.give
  - minecraft.command.tp
  - minecraft.command.teleport
  - minecraft.command.time
  - minecraft.command.weather
  - minecraft.command.ban
  - minecraft.command.kick
  - minecraft.command.op
  - minecraft.command.effect
  - minecraft.command.enchant
  # WorldEdit
  - worldedit.*
  # Conditional example: players who already have "myserver.isadmin"
  # additionally get real OP-level commands while in adminmode
  - if: "myserver.isadmin"
    then:
      - "minecraft.command.op"
      - "minecraft.command.*"
      - "luckpems.*"
  # Conditional example: players who already have "myserver.ismod"
  # additionally get a smaller set of extra permissions
  - if: "myserver.ismod"
    then:
      - "aplugin.fly"
      - "aplugin.vanish"


# ---- Command-Aliases ----
#A list of commands that can be uses instead of /adminmode
aliases:
  - am

# ----- Features -----
# Whether these features are enabled at all.
# (people without permissions still cant see them)
features:
  # whether to enable the notify messages.
  notify: true

  # whether to give the player a compass which can be used to teleport to players when in adminmode
  teleport-compass:
    enabled: false
    #selected for mainhand, or 0-8
    slot: selected
    title: "<dark_red>Admin Teleport Compass"
    player-head-name: "<!italic><green>%player%"
    #NOTE: this feature REQUIRES VANISH++
    vanish:
      disable-vanish-actionbar: true
    #To use any vanish command, nearly regardless of what plugin you are using.
    alternative-vanish:
      enabled: false
      #NOTE: this method cant check whether the player already is in vanish when entering adminmode.
      #If you know that your plugin has an api or command to check this, feel free to report that on our dc: https://discord.gg/DyX736yAMz
      #DO NOT put / at the beginning, this is not required.
      command: "vanish"

  #whether to clear the players inventory when entering adminmode
  clear-inv: false


# ----- Data to save & restore -----
# Everything listed here as "true" will be saved before entering
# adminmode, and restored when leaving it.
# Everything set to "false" will be ignored.
save:
  coords: true
  inventory: true
  gamemode: true
  selected-hotbar-slot: true
  levels: true
  health: true
  hunger: true
  potion-effects: true

----- 消息 -----

所有聊天消息都支持 MiniMessage 格式。

messages:

管理员模式激活时永久显示的操作栏消息。

enable-actionbar-message: true actionbar: "<white>管理员模式已开启!" reload: "<green>Adminmode 插件已成功重载!" enter-line1: "<dark_red>管理员模式 <green><bold>已激活!" enter-line2: "<white>点击 <yellow><click:run_command:'/adminmode off'>此处</click><white> 以传送回来并退出!" exit: "<dark_red>管理员模式 <red><bold>已停用!" notify-enter: "<yellow>%player% <green><bold>进入 <dark_red>管理员模式" notify-exit: "<yellow>%player% <red><bold>离开 <dark_red>管理员模式" already-on: "<dark_red>管理员模式 <white>已经处于激活状态!" already-off: "<dark_red>管理员模式 <white>已经处于停用状态!" still-in-adminmode-line1: "<dark_red>管理员模式<white> 仍然 <green><bold>启用!" still-in-adminmode-line2: "<white>点击 <yellow><click:run_command:'/adminmode off'>此处</click><white> 以传送回来并退出!" notify-still-in-adminmode: "%player% 仍然在 <dark_red>管理员模式中!" forced-survival: "<green>强制生存游戏模式!"

----- 命令权限 -----

permissions: toggle: adminmode.use reload: adminmode.reload notify: adminmode.notify

---- 切换命令用户 ----

此选项允许您授予 /adminmode on | off 的权限,而无需真正授予该权限(如果未安装 LuckPerms,这可能很有用)。

use-players:

aPlayersName1abc

aPlayersName2abc

---- 重载命令用户 ----

此选项允许您授予 /adminmode reload 的权限,而无需真正授予该权限(如果未安装 LuckPerms,这可能很有用)。

reload-players:

aPlayersName1abc

aPlayersName2abc


此插件使用 [bStats](https://bstats.org/) 来监控使用 Advanced-Adminmode 的服务器

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

评论 0

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

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源