目标
本模组允许玩家在服务器上挂机而不必保持电脑开机。只需使用 /offline 命令即可生成一个与你完全相同的玩家副本,称为离线玩家。根据配置的不同,在离线玩家生成后你将被踢出服务器。
如果离线玩家被击杀,它不会掉落任何战利品,但会被从服务器中踢出。当你重新加入时,离线玩家的物品栏和经验等级将复制给你,同时你会死亡。这给了你时间取回你的物品。
如果离线玩家存活到你重新加入,其物品栏和获得的经验将转移给你。
使用方法
输入 /offline 以生成离线玩家。
动作
你可以为离线玩家添加动作。可用的动作包括:
| 名称 | 描述 |
|---|---|
| attack | 玩家左键点击 |
| break | 玩家左键点击,但等待方块完全破碎。 |
| place / use | 玩家右键点击 |
| crouch | 玩家蹲下 |
| jump | 玩家跳跃 |
| eat | 玩家进食(仅在饥饿且手中持有食物时有效) |
| drop_item | 从当前选中槽位丢弃一个物品 |
| drop_stack | 从当前选中槽位丢弃所有物品 |
| move_forward | 玩家向前移动 |
| move_backward | 玩家向后移动 |
| disconnect | 在设定间隔后自动断开离线玩家的连接 |
要使用某个动作,请输入 /offline [action],例如 /offline attack。
提示:使用
/offline actions查看可用动作列表
间隔/偏移
你可以设置动作的执行间隔或偏移量:
- 间隔:
/offline break:20(打破方块之间间隔 20 刻,即 1 秒) - 偏移:
/offline attack:20:10(在该动作上增加 10 刻的偏移量)
时间解析
除了使用刻(默认单位)外,还可以将间隔和偏移设置为毫秒、秒、分钟、小时甚至天。
示例:/offline use:100ms、/offline attack:1s、/offline attack:1.5m、/offline eat:0.25h、/offline disconnect:1d
链式执行
你可以链式执行多个动作,例如:
/offline attack move_forward/offline attack:100 jump eat:20:10/offline jump:20 attack eat move_backward
动作将按照指定的顺序依次执行。
配置
初始化后,配置文件位于 Minecraft 服务器根目录下的 config/OfflinePlayersReworked.json。
配置内容如下所示:
{
"opRequired": false,
"autoOp": true,
"autoWhitelist": false,
"autoDisconnect": true,
"killOnDeath": true,
"respawnKickedPlayers": true,
"informAboutKickedPlayer": true,
"copySkin": true,
"databaseLocation": "./offlineplayersreworked/",
"offlinePlayerPrefix": "[OFF]",
"availableOptions": ["attack", "break", "use","etc..."]
}
opRequired: 如果为 true,则只有 OP 才能使用/offline。autoOp: 如果为 true,则 OP 的离线玩家会自动获得 OP 权限。autoWhitelist: 如果为 true 且启用了白名单,则离线玩家会自动加入白名单。(默认值为 false,因为似乎没有必要)autoDisconnect: 如果为 true,则玩家在每次使用/offline后会自动断开连接。(使用 false 需自行承担风险)killOnDeath: 如果为 true,则当离线玩家死亡时,玩家重新连接后会立即死亡。respawnKickedPlayers: 如果为 true,则被踢出的离线玩家在服务器重启后会自动重生。informAboutKickedPlayer: 如果为 true,则当离线玩家被踢出且玩家重新加入时,玩家会收到关于离线玩家被踢出的通知。copySkin: 如果为 true,则离线玩家会复制原玩家的皮肤。databaseLocation: 数据库文件夹位置。默认为./offlinePlayersReworked/。offlinePlayerPrefix: 设置离线玩家的前缀。availableOptions: 可用动作选项的列表。
报告问题
如果遇到任何错误或有任何改进建议,请在我们的 GitHub 仓库中创建 Issue。创建 Issue 的步骤如下:
- 进入此仓库的 Issues 标签页。
- 点击 “New Issue”。
- 选择 “Bug report” 或 “Feature request” 模板。
- 尽可能详细地填写模板。
- 提交 Issue。
Goal
This mod allows players to go AFK on a server without leaving their computers on. Simply use the /offline command to spawn an exact copy of your player, called an offline player. Depending on the configuration, you'll be kicked after the offline player has spawned.
If the offline player is killed, it won't drop loot but will be kicked from the server. When you rejoin, the inventory and XP levels from the offline player are copied to you, and you'll be killed. This gives you time to retrieve your items.
If the offline player survives until you rejoin, its inventory and gained experience will be transferred to you.
How to Use
Type /offline to spawn an offline player.
Actions
You can add actions to your offline player. Available actions include:
| Name | Description |
|---|---|
| attack | Player left click |
| break | Player left click, but wait for block to fully break. |
| place / use | Player right click |
| crouch | Player crouching |
| jump | Player jumping |
| eat | Player eating (only if hungry & having food in one hand) |
| drop_item | Drops an item from the active slot |
| drop_stack | Drops all items from the active slot |
| move_forward | Moves the player forward |
| move_backward | Moves the player backwards |
| disconnect | Automatically disconnects the offline player after a set interval |
To use an action, type /offline [action], e.g., /offline attack.
Tip: use
/offline actionsto see a list of available actions
Interval/Offset
You can execute actions with set intervals or offsets:
- Interval:
/offline break:20(20 tick or 1 second interval between breaking blocks) - Offset:
/offline attack:20:10(10 tick offset added to the action)
Time Parsing
Besides using ticks (the default), it is also possible to set the interval and offset to milliseconds, seconds, minutes, hours, and even days.
Example: /offline use:100ms, /offline attack:1s, /offline attack:1.5m, /offline eat:0.25h, /offline disconnect:1d
Chaining
You can chain actions, for example:
/offline attack move_forward/offline attack:100 jump eat:20:10/offline jump:20 attack eat move_backward
Actions are executed in the order specified.
Config
After initialization, the configuration file is located at config/OfflinePlayersReworked.json in your Minecraft server's root folder.
The configuration looks as follows:
{
"opRequired": false,
"autoOp": true,
"autoWhitelist": false,
"autoDisconnect": true,
"killOnDeath": true,
"respawnKickedPlayers": true,
"informAboutKickedPlayer": true,
"copySkin": true,
"databaseLocation": "./offlineplayersreworked/",
"offlinePlayerPrefix": "[OFF]",
"availableOptions": ["attack", "break", "use","etc..."]
}
opRequired: If true, only OPs can use/offline.autoOp: If true, offline players of OPs are automatically made OPs.autoWhitelist: If true and whitelist is enabled, offline players are auto-whitelisted. (Default value is false at it doesn't seem necessary)autoDisconnect: If true, players automatically disconnect after using/offline. (Use false at your own risk)killOnDeath: If true, players automatically die upon reconnecting if their offline player died.respawnKickedPlayers: If true, offline players automatically respawn on server restart when kickedinformAboutKickedPlayer: If true, if offline player was kicked and player rejoins, player will be informed about offlline player being kickedcopySkin: If true, offline players copy the original player's skin.databaseLocation: Folder location for the database. Default is./offlinePlayersReworked/.offlinePlayerPrefix: Sets the prefix for the offline player.availableOptions: A list of the available action options that can be used.
Reporting Issues
If you encounter any bugs or have suggestions for improvements, please create an issue on our GitHub repository. To create an issue:
- Go to the Issues tab of this repository.
- Click on "New Issue".
- Choose between "Bug report" or "Feature request" template.
- Fill out the template with as much detail as possible.
- Submit the issue.
下载 OfflinePlayers
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 OfflinePlayers
下载 OfflinePlayers
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 OfflinePlayers
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 OfflinePlayers
下载 OfflinePlayers
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 OfflinePlayers
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 OfflinePlayers
下载 OfflinePlayers
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 OfflinePlayers
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
OfflinePlayers-Reworked 1.4.0 (MC 26.1 - 26.1.2)
更新:
- 已更新至 Minecraft 26.1
- 少量代码更改 + 格式化
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
评论 0
登录后参与评分
还没有评论,来抢沙发吧