
一款简单的 Minecraft 模组,玩家首次加入服务器时会被传送至随机位置。

- 随机出生点:玩家首次加入服务器时会被传送至随机位置
- 安全传送:高级算法确保玩家在地表安全区域生成,而非洞穴、墙壁或危险区域
- 风景出生点选项:玩家可以在高空生成并带有缓慢下落效果,以欣赏新家园的景色
- 可配置设置:服务器管理员可以自定义传送设置
- 自定义消息:配置玩家在传送时显示的消息
- 可选重复传送:可选择每次加入服务器时都传送玩家,而不仅仅是第一次
- 玩家例外名单:可配置白名单/黑名单,指定哪些玩家不应被传送

该模组包含一个配置文件,您可以在此调整以下设置:
- 从出生点的最大和最小传送距离
- 是否在每次加入服务器时传送玩家,还是仅首次加入时传送
- 玩家被传送时显示的自定义消息(默认禁用)
- 安全传送开关(确保玩家不会在危险区域生成)
- 风景出生点选项(玩家在高空中生成并带有缓慢下落效果,缓缓降落至地面)
- 维度特定的传送设置(下界和末地的传送选项)
- 排除在随机传送之外的玩家列表
以下是配置文件示例(randomspawn-common.toml):
[general]
# 从出生点传送玩家的最小距离(方块单位)
minDistance = 500
# 从出生点传送玩家的最大距离(方块单位)
maxDistance = 2000
# 是否每次加入服务器时都传送玩家,而不仅仅是第一次
teleportOnEveryJoin = false
# 是否允许在下界维度进行传送
allowNetherTeleport = false
# 是否允许在末地维度进行传送
allowEndTeleport = false
[messages]
# 是否在玩家被传送时向玩家显示消息
showTeleportMessage = false
# 玩家被传送时显示的消息
teleportMessage = "You have been teleported to a random location!"
[safety]
# 如果为 true,则确保玩家被传送至安全位置(不在岩浆、洞穴等中)
safeTeleport = true
# 如果为 true,玩家将在 Y=100 处生成并带有缓慢下落效果,轻轻飘落到地面
spawnHighWithSlowFalling = false
[debug]
# 如果为 true,启用详细的调试日志以帮助诊断问题
debugMode = false
[exceptions]
# 如果为 true,只有列表中的玩家会被传送。如果为 false,列表中的玩家将不会被传送。
useWhitelist = false
# 列入白名单或黑名单的玩家名称列表,用于控制是否传送
playerExceptions = ["ExamplePlayer1", "ExamplePlayer2"]

/newspawn - 将自己传送至随机位置(需要 OP 权限)
/newspawn <player> - 将指定玩家传送至随机位置(需要 OP 权限)
/newspawn @a - 将所有玩家传送至随机位置(需要 OP 权限)
/newspawn @r - 将一名随机玩家传送至随机位置(需要 OP 权限)
/newspawn @p - 将最近的玩家传送至随机位置(需要 OP 权限)
该命令支持所有玩家选择器(@a、@p、@r、@e[type=player]),并且可以同时传送多名玩家。
项目支持与使用
托管服务: 为了获得最佳性能,我推荐使用横幅中链接的 BisectHosting 服务。
整合包: 您可以自由地将我的作品包含在任何整合包中。请通过提供指向本项目页面的链接来给予适当的署名。


A simple Minecraft mod that teleports players to random locations when they first join the server.

- Random First Spawn: Players are teleported to a random location when they first join the server
- Safe Teleportation: Advanced algorithm ensures players spawn safely on the surface, not in caves, walls, or dangerous areas
- Scenic Spawn Option: Players can spawn high in the air with slow falling effect for a scenic view of their new home
- Configurable Settings: Server administrators can customize teleportation settings
- Customizable Messages: Configure messages shown to players when they are teleported
- Optional Repeat Teleportation: Option to teleport players on every join, not just the first time
- Player Exceptions: Configure whitelist/blacklist for players who should not be teleported

The mod includes a configuration file where you can adjust:
- Minimum and maximum teleportation distance from spawn
- Whether to teleport players on every join or just the first time
- Custom messages to display when players are teleported (disabled by default)
- Safe teleportation toggle (ensures players don't spawn in dangerous areas)
- Scenic spawn option (players spawn high in the air with slow falling effect)
- Dimension-specific teleportation settings (Nether and End teleportation options)
- List of players who should be excluded from random teleportation
Here's an example of the configuration file (randomspawn-common.toml):
[general]
# Minimum distance from spawn to teleport players (in blocks)
minDistance = 500
# Maximum distance from spawn to teleport players (in blocks)
maxDistance = 2000
# Whether to teleport players on every join, not just the first time
teleportOnEveryJoin = false
# Whether to allow teleportation in the Nether dimension
allowNetherTeleport = false
# Whether to allow teleportation in the End dimension
allowEndTeleport = false
[messages]
# Whether to show a message to players when they are teleported
showTeleportMessage = false
# Message to show to players when they are teleported
teleportMessage = "You have been teleported to a random location!"
[safety]
# If true, ensures players are teleported to safe locations (not in lava, caves, etc.)
safeTeleport = true
# If true, players will spawn at Y=100 with slow falling effect and gently float down to the ground
spawnHighWithSlowFalling = false
[debug]
# If true, enables detailed debug logging to help diagnose issues
debugMode = false
[exceptions]
# If true, only players in the list will be teleported. If false, players in the list will NOT be teleported.
useWhitelist = false
# List of player names to whitelist or blacklist from teleportation
playerExceptions = ["ExamplePlayer1", "ExamplePlayer2"]

/newspawn - Teleports yourself to a random location (requires OP permission)
/newspawn <player> - Teleports the specified player to a random location (requires OP permission)
/newspawn @a - Teleports all players to random locations (requires OP permission)
/newspawn @r - Teleports a random player to a random location (requires OP permission)
/newspawn @p - Teleports the nearest player to a random location (requires OP permission)
The command supports all player selectors (@a, @p, @r, @e[type=player]) and can teleport multiple players at once.
Project Support & Usage
Hosting: For the best performance, I recommend using BisectHosting linked in the banner.
Modpacks: You are free to include my work in any modpack. Please ensure proper credit is given by providing a link to this project page.

评论 0
登录后参与评分
还没有评论,来抢沙发吧