MSMP Entity
一个服务端 Fabric 模组,通过提供用于获取和设置实体数据的额外功能,扩展了 Minecraft Server Management Protocol (MSMP)。
此模组专为工具、仪表板、自动化系统、外部监控工具以及需要结构化访问实体信息而不依赖命令解析或 RCON 黑盒集成的场景而设计。
安装
- 下载模组
.jar文件并将其放入服务器的mods/文件夹中。 - 在
server.properties中启用管理服务器:management-server-enabled=true - 启动服务器。默认情况下,管理服务器将在
localhost:25576上监听。
配置
首次启动时,模组会在 <server_root_dir>/config/msmp/entity/config.yml 生成配置文件,你可以在其中调整通知系统,针对使用基于阈值/间隔轮询的跟踪事件进行配置:
# MSMP Entity 的主配置文件。
# 与位置相关的设置配置。
position:
# 通知设置。
notification:
# 对已订阅实体的位置变更检查之间的服务器刻数。
# 较低的值会导致更频繁的检查并可能产生更多通知,但可能会增加服务器负载。
# @default: 20
interval-ticks: 20
# 实体必须移动的最小距离(以方块为单位)以触发位置变更通知。
# 将其设置为 0.0 将对任何移动触发通知。
# @default: 1.0
block-delta: 1.0
# 与旋转相关的设置配置。
rotation:
# 通知设置。
notification:
# 对已订阅实体的旋转变更检查之间的服务器刻数。
# 较低的值会导致更频繁的检查并可能产生更多通知,但可能会增加服务器负载。
# @default: 20
interval-ticks: 20
# 实体必须旋转的最小偏航角或俯仰角变化量(以度为单位)以触发旋转变更通知。
# 将其设置为 0.0 将对任何旋转变化触发通知。
# @default: 10.0
rotation-delta: 10.0
较低的间隔值意味着更频繁的检查(以及可能更多的通知),代价是略微增加的服务器负载。将增量设置为 0.0 将对任何变化(无论多小)触发通知。
RPC 方法
该模组目前提供以下 MSMP RPC 方法。所有这些方法也可以通过标准的 rpc.discover MSMP 端点自动发现。
| 方法 | 描述 |
|---|---|
entity:dimension |
通过 UUID 或玩家名称返回任何已加载实体的当前维度 |
entity:dimension/set |
将任何已加载的实体转移到指定维度,保持其当前位置和旋转角度 |
entity:dimension/changed |
返回维度变化事件中所有被跟踪实体的列表 |
entity:dimension/changed/add |
向维度变化通知跟踪器添加实体 |
entity:dimension/changed/clear |
清除维度变化事件中的所有实体 |
entity:dimension/changed/remove |
从维度变化通知跟踪器中移除实体 |
entity:health |
返回任何 LivingEntity 的当前生命值和最大生命值 |
entity:health/set |
部分更新任何 LivingEntity 的生命值和/或最大生命值 |
entity:health/changed |
返回生命值变化事件中所有被跟踪实体的列表 |
entity:health/changed/add |
向生命值变化通知跟踪器添加实体 |
entity:health/changed/remove |
从生命值变化通知跟踪器中移除实体 |
entity:items |
以原版 NBT 格式返回在线玩家所有占用的物品栏槽位 |
entity:items/set |
使用差异方法部分更新在线玩家的物品栏 |
entity:items/changed |
返回物品变化事件中所有被跟踪实体的列表 |
entity:items/changed/add |
向物品变化通知跟踪器添加玩家 |
entity:items/changed/remove |
从物品变化通知跟踪器中移除实体 |
entity:position |
返回任何已加载实体的当前位置 |
entity:position/set |
将任何已加载的实体传送至其当前维度内的指定位置 |
entity:position/changed |
返回位置变化事件中所有被跟踪实体的列表 |
entity:position/changed/add |
向位置变化通知跟踪器添加实体 |
entity:position/changed/remove |
从位置变化通知跟踪器中移除实体 |
entity:rotation |
通过 UUID 或玩家名称返回任何已加载实体的当前旋转角度 |
entity:rotation/set |
设置任何已加载实体的旋转角度,保留其位置和维度 |
entity:rotation/changed |
返回旋转变化事件中所有被跟踪实体的列表 |
entity:rotation/changed/add |
向旋转变化通知跟踪器添加实体 |
entity:rotation/changed/remove |
从旋转变化通知跟踪器中移除实体 |
entity:saturation |
返回在线玩家的当前饥饿值和饱和度 |
entity:saturation/set |
部分更新在线玩家的饥饿值和/或饱和度 |
entity:saturation/changed |
返回饱和度变化事件中所有被跟踪实体的列表 |
entity:saturation/changed/add |
向饱和度变化通知跟踪器添加玩家 |
entity:saturation/changed/remove |
从饱和度变化通知跟踪器中移除实体 |
entity:uuid |
通过玩家名称返回在线玩家的 UUID |
RPC 通知
该模组还提供以下 MSMP RPC 通知,供客户端订阅:
| 方法 | 描述 |
|---|---|
entity:notification/dimension/changed |
当被跟踪的实体改变维度时触发 |
entity:notification/health/changed |
当被跟踪的 LivingEntity 的生命值发生变化时触发 |
entity:notification/items/changed |
当被跟踪的玩家物品栏或装备发生变化时触发 |
entity:notification/position/changed |
当被跟踪的实体移动至少 blockDelta 格时触发 |
entity:notification/rotation/changed |
当被跟踪的实体旋转至少 rotationDelta 度时触发 |
entity:notification/saturation/changed |
当被跟踪的玩家的饥饿值或饱和度发生变化时触发 |
如果您需要更多用于其他目的的方法或通知,请提交问题
许可证
LGPL-3.0
MSMP Entity
A server-side Fabric mod that extends the Minecraft Server Management Protocol (MSMP) by providing additional functions for getting and setting entity data.
This mod is designed for tooling, dashboards, automation systems, external monitoring tools, and integrations that need structured access to entity information without relying on command parsing or RCON hacks.
Installation
- Download the mod
.jarand place it in your server'smods/folder. - Enable the Management Server in
server.properties:management-server-enabled=true - Start the server. The Management Server will listen on
localhost:25576by default.
Configuration
On first start, the mod generates a configuration file at <server_root_dir>/config/msmp/entity/config.yml, where you can tune the notification system for the tracked events that use threshold/interval-based polling:
# Main configuration file for MSMP Entity.
# Configuration for position-related settings.
position:
# Settings for notifications.
notification:
# Number of server ticks between position change checks for subscribed entities.
# Lower values result in more frequent checks and potentially more notifications, but can increase server load.
# @default: 20
interval-ticks: 20
# Minimum distance in blocks that an entity must move to trigger a position change notification.
# Setting this to 0.0 will trigger a notification for any movement.
# @default: 1.0
block-delta: 1.0
# Configuration for rotation-related settings.
rotation:
# Settings for notifications.
notification:
# Number of server ticks between rotation change checks for subscribed entities.
# Lower values result in more frequent checks and potentially more notifications, but can increase server load.
# @default: 20
interval-ticks: 20
# Minimum change in yaw or pitch, in degrees, that an entity must rotate to trigger a rotation change notification.
# Setting this to 0.0 will trigger a notification for any rotation change.
# @default: 10.0
rotation-delta: 10.0
Lower interval values mean more frequent checks (and potentially more notifications), at the cost of slightly more server load. Setting a delta to 0.0 triggers a notification on any change, however small.
RPC Methods
The mod currently provides the following MSMP RPC methods. All of these methods are also automatically discoverable through the standard rpc.discover MSMP endpoint.
| Method | Description |
|---|---|
entity:dimension |
Returns the current dimension of any loaded entity by UUID, or a player by name |
entity:dimension/set |
Transfers any loaded entity to the given dimension, keeping its current position and rotation |
entity:dimension/changed |
Returns a list of all tracked entities for the dimension changed event |
entity:dimension/changed/add |
Add entities to the dimension change notification tracker |
entity:dimension/changed/clear |
Clear all entities for the dimension changed event |
entity:dimension/changed/remove |
Remove entities from the dimension change notification tracker |
entity:health |
Returns the current and maximum health of any LivingEntity |
entity:health/set |
Partially updates the health and/or maximum health of any LivingEntity |
entity:health/changed |
Returns a list of all tracked entities for the health changed event |
entity:health/changed/add |
Add entities to the health change notification tracker |
entity:health/changed/remove |
Remove entities from the health change notification tracker |
entity:items |
Returns all occupied inventory slots of an online player in Vanilla NBT format |
entity:items/set |
Partially updates an online player's inventory using a diff approach |
entity:items/changed |
Returns a list of all tracked entities for the items changed event |
entity:items/changed/add |
Add players to the items change notification tracker |
entity:items/changed/remove |
Remove entities from the items change notification tracker |
entity:position |
Returns the current position of any loaded entity |
entity:position/set |
Teleports any loaded entity to the given position within its current dimension |
entity:position/changed |
Returns a list of all tracked entities for the position changed event |
entity:position/changed/add |
Add entities to the position change notification tracker |
entity:position/changed/remove |
Remove entities from the position change notification tracker |
entity:rotation |
Returns the current rotation of any loaded entity by UUID, or a player by name |
entity:rotation/set |
Sets the rotation of any loaded entity, preserving its position and dimension |
entity:rotation/changed |
Returns a list of all tracked entities for the rotation changed event |
entity:rotation/changed/add |
Add entities to the rotation change notification tracker |
entity:rotation/changed/remove |
Remove entities from the rotation change notification tracker |
entity:saturation |
Returns the current food level and saturation of an online player |
entity:saturation/set |
Partially updates the food level and/or saturation of an online player |
entity:saturation/changed |
Returns a list of all tracked entities for the saturation changed event |
entity:saturation/changed/add |
Add players to the saturation change notification tracker |
entity:saturation/changed/remove |
Remove entities from the saturation change notification tracker |
entity:uuid |
Returns the UUID of an online player by name |
RPC Notifications
The mod also provides the following MSMP RPC notifications that clients can subscribe to:
| Method | Description |
|---|---|
entity:notification/dimension/changed |
Fires when a tracked entity changes dimension |
entity:notification/health/changed |
Fires when a tracked LivingEntity's health changes |
entity:notification/items/changed |
Fires when a tracked player's inventory or equipment changes |
entity:notification/position/changed |
Fires when a tracked entity moves at least blockDelta blocks |
entity:notification/rotation/changed |
Fires when a tracked entity rotates at least rotationDelta degrees |
entity:notification/saturation/changed |
Fires when a tracked player's food level or saturation changes |
If you want more methods or notifications for other purposes, please open an issue
License
LGPL-3.0
下载 MSMP Entity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MSMP Entity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MSMP Entity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MSMP Entity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MSMP Entity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MSMP Entity
下载 MSMP Entity
下载 MSMP Entity
下载 MSMP Entity
下载 MSMP Entity
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
评论 0
登录后参与评分
还没有评论,来抢沙发吧