SMP实用工具

SMP实用工具

这个模组旨在设计和规划以提升在Minecraft中创建SMP服务器的体验。其主要功能是禁止和控制物品、方块及模组,并能为特定玩家解除对这些物品、方块或模组的禁用。

管理

SMP Utilities – 命令 Wiki

概述

SMP Utilities 是一个旨在增强 Minecraft 中**SMP(生存多人)**服务器创建与管理体验的模组。

该模组的主要目的是限制和控制物品、方块甚至整个模组,同时允许管理员为特定玩家创建白名单,使其能够绕过这些限制。


管理员物品

Absurd Damage Sword(荒诞伤害之剑)

Absurd Damage Sword

一把伤害极高的剑。它实际上会对命中的任何生物执行 /kill。

Ban Sword(封禁之剑)

Ban Sword

一把在攻击玩家时会踢出或封禁玩家的剑。

  • 未附魔 Mending 时攻击 → 踢出玩家
  • 附魔 Mending 时攻击 → 永久封禁玩家

Chapolin Colorado's Sledgehammer(Chapolin Colorado 的大锤)

Chapolin Colorado's Sledgehammer

一把特殊武器,伤害为零但击退极强。击中任何实体都会将其击飞很远但不会杀死它。拥有无限耐久且抗火。

Little Poop(小 poop)

Little Poop

一个可投掷物品。除可投掷外无其他机制效果。

Realm Coin(领域硬币)

Realm Coin

一个用于服务器经济或活动用途的收集/货币物品。

Mind Wrench(心灵扳手)

Replace this with a description

一把特殊武器,伤害为零且拥有无限耐久。

  • 左键(攻击)生物 → 施加永久的 Slowness 255(隐形,无粒子/图标),实际上将生物冻结在原地。
  • 右键(交互)生物 → 切换生物的 AI:
    • 若 AI 当前已启用 → 禁用它并为该生物标记 MindWrenched 标签。
    • 若 AI 当前已禁用(之前被扳手处理过) → 重新启用并移除该标签。

适用于摆姿势或冻结生物,用于装饰、活动或截图。

Security Block(安全方块)

Replace this with a description

一个不可破坏的方块,供管理员使用。


目录

  1. 简介
  2. 主要命令
  3. 权限系统
  4. 限制类型
  5. 详细命令(idrestrict、idcontrol、idlock)
  6. 白名单管理
  7. 实际示例
  8. 配置文件
  9. 常见问题
  10. 物品自定义(/lore 和 /rename)
  11. /objective
  12. 药水与效果
  13. 传送石抑制

简介

SMP Utilities 为管理员提供三大控制系统:

/idrestrict

阻止物品、方块或模组的使用。

玩家仍可将该物品保留在物品栏中,但无法使用它。


/idcontrol

阻止物品或模组的持有。

如果玩家物品栏中有该物品,它将被自动移除。


/idlock

结合两个系统。

玩家既不能持有也不能使用该物品。


所有命令都需要管理员(OP)权限或权限等级 2。


主要命令

基本结构

/command <action> <type> <id>

可用操作

  • disable 为所有玩家封禁某物品、方块或模组,除非该玩家拥有该物品或其模组的白名单权限。

  • enable 从封禁列表中移除某物品、方块或模组。如果其来源模组仍被封禁,则没有单独权限的玩家仍受限制。

  • global disable / global enable global disable 明确将物品标记为单独封禁,覆盖模组级白名单权限。global enable 将物品添加为全局例外——即使其模组被封禁,所有玩家也可使用。

  • status 检查物品、方块、模组或玩家的状态。

  • list 显示所有受限的物品、方块或模组。

  • allow 将玩家添加到某物品或模组的白名单。白名单中的玩家即使该物品被全局封禁或其模组被封禁,也可以使用、持有、装备和放置该物品。

  • deny 从白名单中移除玩家。

  • allowlist check 检查某玩家的权限。

  • allowlist clear 移除某玩家的所有权限。


目标类型

命令可针对四种不同类型:

  • item — 游戏中的任何物品。示例:minecraft:diamond
  • block — 游戏中的方块。示例:minecraft:stone
  • mod — 整个模组。示例:thermal
  • item-block — 既是物品又是方块的东西。示例:minecraft:dirt

权限系统

限制等级

idrestrict

玩家可以持有该物品,但无法使用它。


idcontrol

玩家无法持有该物品。它将从物品栏中自动移除。


idlock

玩家既不能持有也不能使用该物品。


玩家白名单

你可以允许特定玩家绕过限制。

示例:

/idrestrict allow player item minecraft:diamond
/idcontrol allow player mod thermal
/idlock allow player all

白名单类型

共有四种权限类型:

  • item — 允许特定物品。
  • block — 允许特定方块。
  • mod — 允许某模组的所有物品。
  • all — 允许所有模组(三个系统中均可用)。

优先级规则

单独封禁始终覆盖玩家白名单权限。

如果某特定物品通过 disable item 或 global disable item 被封禁,任何玩家都无法使用或持有它,即使他们拥有整个模组的白名单权限。

示例:

  • 模组 aether 被封禁
  • 玩家 ddogo 拥有模组 aether 的白名单
  • 管理员单独封禁 aether:some_item
  • 结果: 尽管有模组白名单,ddogo 仍无法使用 aether:some_item

限制类型

物品限制

/idrestrict disable item minecraft:diamond_sword

玩家仍可持有该剑,但无法使用它。


方块限制

/idcontrol disable block minecraft:tnt

玩家无法将 TNT 保留在物品栏中。


模组限制

/idlock disable mod thermal

任何人都无法使用或持有该模组的物品。


物品-方块限制

用于既是物品又是方块的东西。

/idlock disable item-block minecraft:dirt

泥土将同时作为物品和世界方块受到限制。


允许所有模组

允许玩家忽略所有模组限制。

/idcontrol allow player all
/idlock allow player all

全局例外

当模组被全局封禁时,你可以允许特定物品/方块,同时保持模组封禁:

/idlock global enable item aether:golden_amber

这会将 aether:golden_amber 添加为全局例外——尽管模组被封禁,所有人都可以使用它。

要移除该例外,直接封禁该物品:

/idlock global disable item aether:golden_amber

/idrestrict

阻止物品、方块和模组的使用。玩家仍可保留该物品,但无法与其交互。

disable / global disable / enable / global enable 的行为

命令 效果
/idrestrict disable item <id> 为所有玩家封禁该物品,除非其拥有该物品或其模组的白名单
/idrestrict global disable item <id> 同上——明确将物品标记为单独封禁,覆盖模组白名单
/idrestrict enable item <id> 从封禁列表中移除该物品。如果模组仍被封禁,则没有单独权限的玩家仍受限制
/idrestrict global enable item <id> 将物品添加为全局例外——即使其模组被封禁,所有玩家也可使用

使用示例

/idrestrict disable item minecraft:elytra
/idrestrict disable block minecraft:enchanting_table
/idrestrict disable mod twilightforest
/idrestrict disable item-block minecraft:dirt
/idrestrict global enable item twilightforest:some_item
/idrestrict status item minecraft:diamond
/idrestrict status player PlayerName
/idrestrict list

idrestrict 阻止的内容

  • 使用物品
  • 进食或饮水
  • 放置方块
  • 破坏方块
  • 与方块交互
  • 用物品攻击实体
  • 装备盔甲
  • 装备 Curios 饰品

idrestrict 不阻止的内容

  • 将物品保留在物品栏中
  • 从地面拾取物品
  • 用物品进行合成
  • 在界面中交易物品

/idcontrol

阻止物品或模组的持有。受限物品将从物品栏中自动移除。

示例

/idcontrol disable item minecraft:diamond
/idcontrol disable mod create
/idcontrol allow player all
/idcontrol deny player all

idcontrol 阻止的内容

  • 将物品保留在物品栏中
  • 从地面拾取物品
  • 装备物品
  • 在任何槽位中持有物品

特殊行为

当物品被 idcontrol 限制时:

  1. 物品从玩家物品栏中被移除
  2. 它被掉落在地面上,并带有 smp_controlled_item 标签
  3. 带有此标签的物品无法再次被拾取
  4. 检查每游戏刻运行一次

/idlock

结合 idrestrict + idcontrol。这是最严格的系统。玩家既不能使用也不能持有该物品。

示例

/idlock disable item minecraft:diamond_sword
/idlock disable block minecraft:crafting_table
/idlock disable mod mekanism
/idlock allow player all
/idlock global enable item mekanism:some_item
/idlock status item minecraft:diamond
/idlock list

受限内容

  • 使用物品
  • 持有物品
  • 从地面拾取物品
  • 装备物品
  • 放置方块
  • 破坏方块
  • 与相关对象交互

白名单管理

检查某玩家的权限:

/idrestrict allowlist check PlayerName
/idcontrol allowlist check PlayerName
/idlock allowlist check PlayerName

检查所有在线玩家的权限:

/idrestrict allowlist check
/idcontrol allowlist check
/idlock allowlist check

移除所有权限:

/idrestrict allowlist clear PlayerName
/idcontrol allowlist clear PlayerName
/idlock allowlist clear PlayerName

实际示例

带限制的生存服务器

/idrestrict disable item minecraft:elytra
/idrestrict disable item minecraft:totem_of_undying

/idcontrol disable block minecraft:tnt
/idcontrol disable block minecraft:bedrock

VIP 白名单:

/idrestrict allow VIP_Player item minecraft:elytra

主题服务器(无魔法)

/idlock disable mod ars_nouveau
/idlock disable mod mana-and-artifice

模组维护

临时禁用某模组:

/idcontrol disable mod problem_mod

稍后重新启用:

/idcontrol enable mod problem_mod

限制模组但允许特定物品

/idlock global disable mod aether
/idlock global enable item aether:golden_amber
/idlock global enable item aether:zanite_gemstone

尽管模组其余部分被封禁,这两个物品所有人都可使用。


配置文件

数据保存在世界文件夹下的 serverconfig/smp_utilities/ 中:

idrestrict

  • id_restrict_config.dat — 被封禁的物品、方块、模组
  • id_restrict_whitelist.dat — 按玩家白名单
  • id_restrict_exceptions.dat — 全局例外

idcontrol

  • id_control_config.dat — 被禁用的物品和模组
  • id_control_whitelist.dat — 按玩家白名单
  • id_control_exceptions.dat — 全局例外

idlock

  • id_lock_config.dat — 被锁定的物品、方块、模组
  • id_lock_whitelist.dat — 按玩家白名单
  • id_lock_exceptions.dat — 全局例外

传送石抑制

  • waystone_suppression_config.toml — 被抑制的模组模式、被封禁的物品和方块

常见问题

这些命令之间有什么区别?

idrestrict — 玩家可以持有物品但无法使用。

idcontrol — 玩家无法持有物品。

idlock — 玩家既不能持有也不能使用物品。


disable 和 global disable 有什么区别?

两者都为所有没有白名单权限的玩家封禁该物品。区别在于优先级:global disable 明确将物品标记为单独封禁,确保其覆盖模组级白名单权限。当你要封禁某个模组中的特定物品而该模组本身是被允许的时,使用 global disable。


enable 和 global enable 有什么区别?

enable 从封禁列表中移除该物品。如果其模组仍被封禁,则没有单独权限的玩家仍受限制。

global enable 将物品添加为全局例外——它变得对所有人可用,无论其模组是否被封禁。


我可以组合使用这些命令吗?

可以。所有系统相互独立。你可以用 idrestrict 做轻度限制,用 idcontrol 做中度限制,用 idlock 做严格限制。


玩家白名单能绕过单独物品封禁吗?

不能。单独物品/方块封禁始终优先于模组白名单权限。即使玩家拥有某模组的权限,通过 disable item 封禁的特定物品也无法使用或持有。


它与 Curios 兼容吗?

是的。该模组集成了 Curios API。受限物品会在 Curios 槽位中被检测到,自动移除,且无法装备。


/rename 和 /lore

该模组包含使用消耗性票据自定义物品的命令。


/rename

重命名玩家手持的物品。需要一张 Rename Ticket(重命名票据)。

/rename <color> normal <name>
/rename <color> <format> <name>
/rename <color> <format1> <format2> <name>
/rename <color> <format1> <format2> <format3> <name>

示例:

/rename red normal Fire Sword
/rename gold bold Royal Shield
/rename blue italic Magic Potion
/rename dark_red strikethrough Cursed Item
/rename green bold italic Lucky Amulet

使用此命令会消耗一张 Rename Ticket:

Rename Ticket


/lore

为玩家手持的物品添加描述(lore)。需要一张 Lore Ticket(描述票据)。

/lore <color> normal <text>
/lore <color> <format> <text>
/lore <color> <format1> <format2> <text>

示例:

/lore dark_gray normal A very rare item.
/lore gold bold Forged by ancient kings.
/lore blue italic Said to bring luck.
/lore dark_red strikethrough Forbidden item.

使用此命令会消耗一张 Lore Ticket:

Lore Ticket


/objective

在玩家的动作栏上显示持久消息。适用于在游戏过程中显示目标、规则或活动。

需要权限等级 4(服务器管理员)。


语法

/objective global <color> <format> <text>
/objective player <player> <color> <format> <text>
/objective clear
/objective clear <player>

示例

/objective global gold bold Defeat the Ender Dragon!
/objective global red normal Do not use Waystones today.

/objective player Steve blue italic Find 5 diamonds.
/objective player Alex green bold italic Complete your quest!

/objective clear
/objective clear Steve

行为

  • 目标显示在动作栏上(快捷栏上方)。
  • 它每刻发送,以确保其保持可见且不会淡出。
  • 当玩家加入服务器时,其存储的目标会自动显示。
  • 玩家专属目标优先于全局目标。
  • 清除全局目标不会移除玩家专属目标。

可用颜色和格式

以下颜色和格式选项可用于 /rename、/lore 和 /objective:

颜色:

black、dark_blue、dark_green、dark_aqua、dark_red、dark_purple、gold、gray、dark_gray、blue、green、aqua、red、light_purple、yellow、white

格式:

normal、bold、italic、underlined、strikethrough

组合:

bold italic、bold underlined、bold strikethrough、italic underlined、italic strikethrough、bold italic underlined、bold italic strikethrough


药水与效果

SMP Utilities 添加了两种自定义药水效果。


传送石抑制(Waystone Suppression)

效果颜色: 紫色(#ae37d5)
类别: 有益

激活期间,玩家无法使用或交互 waystone_suppression_config.toml 中列出的物品、方块或模组。

设计用于在特定游戏时刻或活动中阻止传送类模组(如 Waystones)。

可用药水:

  • 传送石抑制药水
  • 传送石抑制喷溅药水
  • 传送石抑制滞留药水
  • 传送石抑制之箭

失衡(Imbalance)

效果颜色: 深洋红(#3b4c5b 反转)
类别: 有益(但机制上为负面)

每刻降低玩家击退抗性 -(amplifier + 1)。在 amplifier 0(I 级)时,移除 1 点击退抗性。更高等级时降低量相应缩放。

设计用于使玩家更容易受到击退,配合 Chapolin Colorado 的大锤等物品使用。

可用药水:

  • 失衡药水
  • 失衡喷溅药水
  • 失衡滞留药水
  • 失衡之箭

传送石抑制

传送石抑制系统会为处于传送石抑制效果下的玩家限制传送与移动类物品/方块。


配置文件

位置:serverconfig/smp_utilities/waystone_suppression_config.toml

[blacklist]
# disables teleport mods (blocks breaking, use of blocks and items, and/or equipping armor)
WaystoneSuppression = ["waystones:*", "balm:*", "endermanoverhaul:*"]

[banned_items]
# individual item IDs to ban (cannot equip in armor or curios slots; drops if equipped)
BannedItems = ["minecraft:ender_pearl", "minecraft:chorus_fruit", "all_in_one:enchiridion", "relics:chorus_inhibitor", "relics:enders_hand", "relics:spatial_sign"]

[banned_blocks]
# individual block IDs to ban (cannot place, break, or interact with) remove the '#' to enable it; minecraft:tnt is just an example, you can remove it
# BannedBlocks = ["minecraft:tnt"]

模式格式

  • modid:* — 封禁该模组的所有物品和方块
  • modid:item_id — 封禁特定物品或方块

它阻止的内容(效果激活时)

  • 放置或破坏被封禁模组的方块
  • 使用被封禁的物品
  • 将被封禁的物品装备为盔甲或放入 Curios 槽位(物品会掉落)
  • 与被封禁的方块交互
  • 用被封禁的物品攻击

默认抑制内容

默认情况下,以下模组被抑制:

  • waystones:* — 所有 Waystones 模组内容
  • balm:* — 所有 Balm 模组内容(Waystones 依赖)
  • endermanoverhaul:* — 所有 Enderman Overhaul 模组内容

以下单独物品被封禁:

  • minecraft:ender_pearl
  • minecraft:chorus_fruit
  • all_in_one:enchiridion
  • relics:chorus_inhibitor
  • relics:enders_hand
  • relics:spatial_sign

SMP Utilities — 让你的服务器井然有序。