随机传送
简介
CMI 随机传送功能允许服务器管理员将玩家强制传送到世界中的随机位置。适用于自定义事件、别名命令或最常用的 /rtp 命令。
配置 /rtp 命令
Alias.yml 方法: 打开 Alias.yml,找到 /rt 和 /rtp 命令,设置 Enabled: true。
AliasEditor 方法: 游戏内 /cmi aliaseditor 创建 /rtp 命令,可添加粒子、延迟、消息等。
自定义别名文件示例(放入 plugins/CMI/CustomAlias/):
CustomAlias:
rtp:
Cmds:
- asConsole! cmi sound block_conduit_deactivate [playerName]
- asConsole! cmi titlemsg [playerName] &6⸭ ⸭ ⸭\n&f充能传送器
- delay! 3
- asConsole! cmi titlemsg [playerName] &6⸭ ⸭ ⸭\n&f传送器就绪!
- asConsole! cmi rt [playerName]
- delay! 0.2
- asConsole! cmi sound entity_generic_explode [playerName]
配置(config.yml)
RandomTeleportation:
AutoGenerateWorlds: true # 自动生成所有世界的默认设置
Worlds:
world:
Enabled: true
MaxRange: 1000 # 最大传送范围
MinRange: 500 # 最小传送范围
CenterX: 0
CenterZ: 0
Circle: false # 圆形/方形范围
IgnoreWater: true
IgnoreLava: true
ignorePowderSnow: false
minY: -50
maxY: 300
Cooldown: 5 # 冷却时间(秒)
MaxTries: 20 # 最大尝试次数
ExcludedBiomes: # 排除的生物群系
- Ocean
- Deep ocean
预热、冷却和费用
- config.yml 的 WarmUps 段添加 cmi rt 命令设置预热
- config.yml 的 RandomTeleportation.Cooldown 设置冷却
- commandCost.yml 设置命令费用
重定向 RT
使用专属命令识别玩家所在世界并重定向:
ifinworld:spawn! asConsole! cmi rt [playerName] world_survival
ifinworld:lobby! asConsole! cmi rt [playerName] world_games
限制使用次数
perm:cmi.onetimertp! msg! [playerName] 抱歉,你只能使用一次 /rtp。
perm:cmi.onetimertp@! asConsole! cmi rt [playerName] %cmi_player_world%
perm:cmi.onetimertp@! asConsole! lp user [playerName] permission set cmi.onetimertp true
命令、权限和占位符
命令: /cmi setrt、/cmi rt
权限: cmi.command.rt、cmi.command.setrt、cmi.randomteleport.cooldownbypass、cmi.teleport.bypassblacklist 等
占位符: %cmi_user_backloc%、%cmi_player_world%、%cmi_player_x/y/z%、%cmi_player_biome%