我的世界 基岩版:官方服务器配置与使用

官方免责声明

  • 这是 Mojang 尚未完成的服务器版本(预览版)
  • 可能有严重的 bug
  • Mojang 随时都可以停止支持它

平台

Linux:

  • 将压缩文件解压到一个空文件夹中
  • 使用以下命令启动服务器
setsid ./bedrock_server

Windows

  • 将压缩文件解压到一个空文件夹中
  • 运行 bedrock_server.exe 文件启动服务器
  • 在某些系统上,当您希望使用运行在同一台计算机上的客户端连接到服务器时,服务器正在运行,您将需要去除 Minecraft 客户端 的 UWP 环回限制
CheckNetIsolation.exe LoopbackExempt –a –p=S-1-15-2-1958404141-86561845-1752920682-3514627264-368642714-62675701-733520436

配置文件

  • 服务器将读取 server.properties 作为服务器的配置文件
  • 其中一些选项仅在创建新世界时读取
  • 其他一些选项在每次启动时都会读取
  • 该文件应包含一个列表,其中的键和值以等号分隔,每行一个
  • 可以使用以下选项。 如果值为括号中的数字,则可以使用该数字代替文本值
选项 可用值 默认值 生效时间 备注
gamemode survival (0)
creative (1)
adventure (2)
survival 新玩家加入 游戏模式
difficulty peaceful (0)
easy (1)
normal (2)
hard (3)
easy 始终 游戏难度
level-type FLAT
LEGACY
DEFAULT
DEFAULT 生成世界时 生成世界的类型,建议不修改
server-name 任何字符 Dedicated Server 始终 游戏内服务器列表显示的名称
max-players 任何正整数 10 始终 服务器玩家上限
server-port 0-65535 19132 始终 ipv4 端口号
server-portv6 0-65535 19133 始终 ipv6 端口号
level-name 任何字符 level 始终 /worlds 文件夹中的地图文件夹名称
level-seed 任何字符 生成世界时 如果为空将在生成时使用随机种子
online-mode true
false
true 始终 正版验证(登录Xbox账号)
white-list true
false
false 始终 开启白名单
allow-cheats true
false
false 始终 开启作弊(只限管理员)
view-distance 任何正整数 10 始终 玩家最大视距
player-idle-timeout 任何正整数 30 始终 挂机N秒后踢出服务器
max-threads 任何正整数 8 始终 服务器最大线程数
设置为0自动调整(不建议)
tick-distance 4-12的整数 4 始终 玩家周围加载区块的范围
值越大越影响服务器性能
default-player-permission-level visitor
member
operator
member 始终 新加入玩家的权限
texturepack-required true
false
false 始终 强制使用服务器的材质包

文件夹

  • 解压后,您将看到一些文件夹和二进制可执行文件
  • 第一次启动服务器时,将创建一堆新(空)文件夹
  • 您应该关注的文件夹如下:
文件夹 用途
behavior_packs 这是可以安装新行为包的地方
目前没有实装,可以安装在地图里
resource_packs 这是可以安装新资源包的地方
目前没有也没有实装,也可以安装在地图里
worlds 如果该文件夹尚不存在,则将在启动时创建该文件夹
创建的每个世界都将有一个根据其命名的文件夹

白名单

  • 如果在 server.propertieswhite-list 设置为 true
  • 服务器将只允许 whitelist.json 列表中的玩家进入服务器
  • 允许玩家进入服务器必须知道玩家的 游戏昵称(即登录 Xbox 后显示的名字)
  • 添加一名玩家进入白名单只需要执行命令 whitelist add <游戏昵称>
  • 从白名单中删除一名玩家只需要执行命令 whitelist remove <游戏昵称>
  • 每次修改白名单后都必须执行命令 whitelist reload 才会刷新白名单
  • whitelist.json 中参数如下
数据类型
name 字符串 玩家的游戏昵称
xuid 字符串 可选参数,一般填 name 的值这个就不用填了,该玩家登陆后会自动补充
ignoresPlayerLimit 布尔值 true:玩家在超过服务器人数上限时可以加入服务器
false:玩家不能在超过服务器人数上限时加入服务器
  • whitelist.json 文件示例:
[
    {
        "ignoresPlayerLimit": false,
        "name": "MyPlayer"
    },
    {
        "ignoresPlayerLimit": false,
        "name": "AnotherPlayer",
        "xuid": "274817248"
    }
]

权限组

  • 可以通过 permissions.json 给特定玩家分配特定的权限
  • 分配权限的玩家必须具有是登录Xbox账号进入服务器的玩家(因为需要他们的 xuid)
  • 可以使用 permissions list 命令罗列出所有拥有特殊权限的玩家
  • permissions.json 文件示例:
[
    {
        "permission": "operator",
        "xuid": "451298348"
    },
    {
        "permission": "member",
        "xuid": "52819329"
    },
    {
        "permission": "visitor",
        "xuid": "234114123"
    }
]

Commands
You can issue commands to the server by typing in the console. The following commands are available. < > means a parameter is required, [ ] means it's optional and | denotes different allowed values. Strings can be enclosed in double quotes, ", if they contain spaces.

Command syntax Description
kick <player name or xuid> <reason> Immediately kicks a player. The reason will be shown on the kicked players screen.
stop Shuts down the server gracefully.
save <hold | resume | query> Used to make atomic backups while the server is running. See the backup section for more information.
whitelist <on | off | list | reload>
on and off turns the whitelist on and off. Note that this does not change the value in the server.properties file!

list prints the current whitelist used by the server

reload makes the server reload the whitelist from the file.

See the Whitelist section for more information.

whitelist <add | remove> <name> Adds or removes a player from the whitelist file. The name parameter should be the Xbox Gamertag of the player you want to add or remove. You don't need to specify a XUID here, it will be resolved the first time the player connects.

See the Whitelist section for more information.
permissions <list | reload>
list prints the current used operator list.

reload makes the server reload the operator list from the ops file.

See the Permissions section for more information.

op <player>
Promote a player to operator. This will also persist in permissions.json if the player is authenticated to XBL. If permissions.json is missing it will be created. If the player is not connected to XBL, the player is promoted for the current server session and it will not be persisted on disk. Defualt server permission level will be assigned to the player after a server restart.

deop <player>
Demote a player to member. This will also persist in permissions.json if the player is authenticated to XBL. If permissions.json is missing it will be created.

changesetting <setting> <value> Changes a server setting without having to restart the server. Currently only two settings are supported to be changed, allow-cheats (true or false) and difficulty (0, peaceful, 1, easy, 2, normal, 3 or hard). They do not modify the value that's specified in server.properties.
Backups
The server supports taking backups of the world files while the server is running. It's not particularly friendly for taking manual backups, but works better when automated. The backup (from the servers perspective) consists of three commands.

Command Description
save hold This will ask the server to prepare for a backup. It’s asynchronous and will return immediately.
save query After calling save hold you should call this command repeatedly to see if the preparation has finished. When it returns a success it will return a file list (with lengths for each file) of the files you need to copy. The server will not pause while this is happening, so some files can be modified while the backup is taking place. As long as you only copy the files in the given file list and truncate the copied files to the specified lengths, then the backup should be valid.
save resume When you’re finished with copying the files you should call this to tell the server that it’s okay to remove old files again.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 159,015评论 4 362
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,262评论 1 292
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,727评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,986评论 0 205
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,363评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,610评论 1 219
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,871评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,582评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,297评论 1 242
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,551评论 2 246
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,053评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,385评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,035评论 3 236
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,079评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,841评论 0 195
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,648评论 2 274
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,550评论 2 270