Minecraft Wiki

除另有声明,转载时均必须注明出处若簡繁轉換出錯,請以遊戲內為準请勇于扩充与修正内容有兴趣逛逛我们的微博沟通交流,欢迎到社区专页需要协助,请在告示板留言

了解更多

Minecraft Wiki
注册
Advertisement

Server

Java版默认的server.properties文件

server.properties是储存多人游戏(Minecraft或Minecraft Classic)服务器所有设置的文件。

在编辑server.properties时,行之间的顺序可以打乱,但文件结构不能改变。每一行的等号之前的文本为变量名,你不应该修改这些内容。等号后面为变量的值,你可以按照规则自行编辑。以#开头的行为注释,添加、修改或移除注释行不会对游戏造成影响。

保存了server.properties的更改之后,服务端必须重新启动才能使更改生效,另一种选择是在服务器控制台或游戏中使用/reload命令重新加载,这也能获得同样的效果。

如果server.properties文件未列出下文中所有的属性(例如服务端版本更新加入新属性,或该文件还未创建),那么服务器在启动时会重写server.properties补全缺失的属性,并将缺失的属性值设为默认值。

尽管有扩展名,server.properties文件只是一个普通的UTF-8编码文本文件,因此可以使用任何文本编辑器进行编辑,比如Windows上的记事本、macOS上的TextEdit或者Linux上的nano和vim。

文件位置[]

Java版[]

该文件会在服务端第一次运行时自动生成(如果本来没有的话)。

操作系统 文件位置 注解
Windows 工作目录路径(chdir)
Linux

Unix Unix/Mac

工作目录路径(pwd)

如果你在你的 home 目录下启动(/home/用户名),服务端文件也会在/home/用户名下创建。请按照下列步骤确保服务端文件能够如你预期地正确生成。

  • 准备一个完整的文件夹来存放所有服务端文件。(如果你不这么做的话事情会一团糟)
    • server.jar放置(复制、移动)进去。
  • 使用官方指导设置你的Minecraft服务端启动脚本。(我们假设你的Minecraft服务端启动脚本名是./start.sh
    • 确保它位于你的可执行目录 $PATH
    • 确保你具有启动脚本的执行权限(chmod +x start.sh,或使用文件夹管理器)
      • ./start.sh

基岩版[]

本文件会与bedrock_server.exe一同下载。

操作系统 文件位置
Windows bedrock_server.exe的相同目录下
Linux bedrock_server的相同目录下

server.properties[]

新安装的Minecraft服务器具有以下默认设置:

Java版[]

以下内容来自23w31a

#Minecraft server properties
#(文件修改时间戳)
enable-jmx-monitoring=false
rcon.port=25575
level-seed=
gamemode=survival
enable-command-block=false
enable-query=false
generator-settings={}
enforce-secure-profile=false
level-name=world
motd=A Minecraft Server
query.port=25565
pvp=true
generate-structures=true
max-chained-neighbor-updates=1000000
difficulty=easy
network-compression-threshold=256
max-tick-time=60000
require-resource-pack=false
use-native-transport=true
max-players=20
online-mode=false
enable-status=true
allow-flight=false
initial-disabled-packs=
broadcast-rcon-to-ops=true
view-distance=10
server-ip=
resource-pack-prompt=
allow-nether=true
server-port=25565
enable-rcon=false
sync-chunk-writes=true
op-permission-level=4
prevent-proxy-connections=false
hide-online-players=false
resource-pack=
entity-broadcast-range-percentage=100
simulation-distance=10
rcon.password=
player-idle-timeout=0
force-gamemode=false
rate-limit=0
hardcore=false
white-list=false
broadcast-console-to-ops=true
spawn-npcs=true
spawn-animals=true
log-ips=true
function-permission-level=2
initial-enabled-packs=vanilla
level-type=minecraft\:normal
text-filtering-config=
spawn-monsters=true
enforce-whitelist=false
spawn-protection=16
resource-pack-sha1=
max-world-size=29999984

基岩版[]

以下内容来自1.20.0.20

server-name=Dedicated Server
# Used as the server name
# Allowed values: Any string without semicolon symbol.

gamemode=survival
# Sets the game mode for new players.
# Allowed values: "survival", "creative", or "adventure"

force-gamemode=false
# force-gamemode=false (or force-gamemode is not defined in the server.properties)
# prevents the server from sending to the client gamemode values other
# than the gamemode value saved by the server during world creation
# even if those values are set in server.properties after world creation.
# 
# force-gamemode=true forces the server to send to the client gamemode values
# other than the gamemode value saved by the server during world creation
# if those values are set in server.properties after world creation.

difficulty=easy
# Sets the difficulty of the world.
# Allowed values: "peaceful", "easy", "normal", or "hard"

allow-cheats=false
# If true then cheats like commands can be used.
# Allowed values: "true" or "false"

max-players=10
# The maximum number of players that can play on the server.
# Allowed values: Any positive integer

online-mode=true
# If true then all connected players must be authenticated to Xbox Live.
# Clients connecting to remote (non-LAN) servers will always require Xbox Live authentication regardless of this setting.
# If the server accepts connections from the Internet, then it's highly recommended to enable online-mode.
# Allowed values: "true" or "false"

allow-list=false
# If true then all connected players must be listed in the separate allowlist.json file.
# Allowed values: "true" or "false"

server-port=19132
# Which IPv4 port the server should listen to.
# Allowed values: Integers in the range [1, 65535]

server-portv6=19133
# Which IPv6 port the server should listen to.
# Allowed values: Integers in the range [1, 65535]

enable-lan-visibility=true
# Listen and respond to clients that are looking for servers on the LAN. This will cause the server
# to bind to the default ports (19132, 19133) even when `server-port` and `server-portv6`
# have non-default values. Consider turning this off if LAN discovery is not desirable, or when
# running multiple servers on the same host may lead to port conflicts.
# Allowed values: "true" or "false"

view-distance=32
# The maximum allowed view distance in number of chunks.
# Allowed values: Positive integer equal to 5 or greater.

tick-distance=4
# The world will be ticked this many chunks away from any player.
# Allowed values: Integers in the range [4, 12]

player-idle-timeout=30
# After a player has idled for this many minutes they will be kicked. If set to 0 then players can idle indefinitely.
# Allowed values: Any non-negative integer.

max-threads=8
# Maximum number of threads the server will try to use. If set to 0 or removed then it will use as many as possible.
# Allowed values: Any positive integer.

level-name=Bedrock level
# Allowed values: Any string without semicolon symbol or symbols illegal for file name: /\n\r\t\f`?*\\<>|\":

level-seed=
# Use to randomize the world
# Allowed values: Any string

default-player-permission-level=member
# Permission level for new players joining for the first time.
# Allowed values: "visitor", "member", "operator"

texturepack-required=false
# Force clients to use texture packs in the current world
# Allowed values: "true" or "false"

content-log-file-enabled=false
# Enables logging content errors to a file
# Allowed values: "true" or "false"

compression-threshold=1
# Determines the smallest size of raw network payload to compress
# Allowed values: 0-65535

compression-algorithm=zlib
# Determines the compression algorithm to use for networking
# Allowed values: "zlib", "snappy"

server-authoritative-movement=server-auth
# Allowed values: "client-auth", "server-auth", "server-auth-with-rewind"
# Enables server authoritative movement. If "server-auth", the server will replay local user input on
# the server and send down corrections when the client's position doesn't match the server's.
# If "server-auth-with-rewind" is enabled and the server sends a correction, the clients will be instructed
# to rewind time back to the correction time, apply the correction, then replay all the player's inputs since then. This results in smoother and more frequent corrections.
# Corrections will only happen if correct-player-movement is set to true.

player-movement-score-threshold=20
# The number of incongruent time intervals needed before abnormal behavior is reported.
# Disabled by server-authoritative-movement.

player-movement-action-direction-threshold=0.85
# The amount that the player's attack direction and look direction can differ.
# Allowed values: Any value in the range of [0, 1] where 1 means that the
# direction of the players view and the direction the player is attacking
# must match exactly and a value of 0 means that the two directions can
# differ by up to and including 90 degrees.

player-movement-distance-threshold=0.3
# The difference between server and client positions that needs to be exceeded before abnormal behavior is detected.
# Disabled by server-authoritative-movement.

player-movement-duration-threshold-in-ms=500
# The duration of time the server and client positions can be out of sync (as defined by player-movement-distance-threshold)
# before the abnormal movement score is incremented. This value is defined in milliseconds.
# Disabled by server-authoritative-movement.

correct-player-movement=false
# If true, the client position will get corrected to the server position if the movement score exceeds the threshold.

server-authoritative-block-breaking=false
# If true, the server will compute block mining operations in sync with the client so it can verify that the client should be able to break blocks when it thinks it can.

chat-restriction=None
# Allowed values: "None", "Dropped", "Disabled"
# This represents the level of restriction applied to the chat for each player that joins the server.
# "None" is the default and represents regular free chat.
# "Dropped" means the chat messages are dropped and never sent to any client. Players receive a message to let them know the feature is disabled.
# "Disabled" means that unless the player is an operator, the chat UI does not even appear. No information is displayed to the player.

disable-player-interaction=false
# If true, the server will inform clients that they should ignore other players when interacting with the world. This is not server authoritative.

client-side-chunk-generation-enabled=true
# If true, the server will inform clients that they have the ability to generate visual level chunks outside of player interaction distances.

block-network-ids-are-hashes=true
# If true, the server will send hashed block network ID's instead of id's that start from 0 and go up.  These id's are stable and won't change regardless of other block changes.

disable-persona=false
# Internal Use Only

disable-custom-skins=false
# If true, disable players customized skins that were customized outside of the Minecraft store assets or in game assets.  This is used to disable possibly offensive custom skins players make.

server-build-radius-ratio=Disabled
# Allowed values: "Disabled" or any value in range [0.0, 1.0]
# If "Disabled" the server will dynamically calculate how much of the player's view it will generate, assigning the rest to the client to build.
# Otherwise from the overridden ratio tell the server how much of the player's view to generate, disregarding client hardware capability.
# Only valid if client-side-chunk-generation-enabled is enabled

Minecraft服务器属性[]

Java版[]

属性 类型 默认值 描述
allow-flight 布尔值 false 允许玩家在安装添加飞行功能的mod前提下在生存模式下飞行

允许飞行可能会使恶意破坏者更加常见,因为此设定会使他们更容易达成目的。在创造模式下无作用。

false - 不允许飞行。悬空超过5秒的玩家会被踢出服务器。
true - 允许飞行。玩家得以使用任何能飞行的mod飞行。
allow-nether 布尔值 true 允许玩家进入下界
false - 下界传送门不会生效。
true - 玩家可以通过下界传送门前往下界。
broadcast-console-to-ops 布尔值 true 向所有在线OP发送所执行命令的输出。
broadcast-rcon-to-ops 布尔值 true 向所有在线OP发送通过RCON执行的命令的输出。
difficulty 字符串 easy 定义服务器的游戏难度(例如生物对玩家造成的伤害,饥饿和中毒对玩家的影响方式等)。

如果设置了旧的数字ID,则会自动转化为英文的难度名称。

peaceful (0) - 和平
easy (1) - 简单
normal (2) - 普通
hard (3) - 困难
enable-command-block 布尔值 false 是否启用命令方块。
enable-jmx-monitoring 布尔值 false 暴露一个具有对象名net.minecraft.server:type=ServerMBean和两个属性averageTickTimetickTimes用于暴露以毫秒为单位的tick时间。
为了启用JRE的JMX,你需要添加在此处所述的一些JVM标志。
enable-query 布尔值 false 允许使用GameSpy4协议的服务器监听器。用于获取服务器信息。
enable-rcon 布尔值 false 是否允许远程访问服务器控制台。
  • 由于RCON协议传输数据时没有加密,所以不建议把RCON暴露在互联网上。RCON客户端和服务端交换的所有数据(包括RCON密码)都会泄露给正在监听此连接的人。
enable-status 布尔值 true 使服务器在服务器列表中看起来是“在线”的。
enforce-secure-profile 布尔值 true 要求玩家必须具有Mojang签名的公钥才能进入服务器。
true - 不具有Mojang签名的公钥的玩家不能进入服务器。
false - 不具有Mojang签名的公钥的玩家也可进入服务器。
enforce-whitelist 布尔值 false 在服务器上强制执行白名单。

当启用后,不在白名单(前提是启用)中的用户将在服务器重新加载白名单文件后从服务器踢出。

true - 不在白名单上的用户会被踢出。
false - 不在白名单上的在线用户不会被踢出。
entity-broadcast-range-percentage 整数(10-1000) 100 此选项控制实体需要距离玩家有多近才会将数据包发送给客户端。更高的数值意味着实体可以在更远的地方就被渲染,同时也可能提高增加延迟的概率。
这个值是以默认值的百分比来表示的。例如:将此值设为50,表示将渲染正常情况下一半距离以内的生物。
此功能模仿了客户端视频设置中的功能,而不像客户端的渲染距离设置一样只能在服务器设置的限制下调整渲染距离。
force-gamemode 布尔值 false 强制玩家加入时为默认游戏模式
false - 玩家将以退出前的游戏模式加入
true - 玩家总是以默认游戏模式加入
function-permission-level 整数(1-4) 2 设定函数的默认权限等级。

4个等级的详情见 #op-permission-level

gamemode 字符串 survival 定义默认游戏模式

如果值是旧用的数字,会静默转换为对应游戏模式的英文名称。

survival (0) - 生存模式
creative (1) - 创造模式
adventure (2) - 冒险模式
spectator (3) - 旁观模式
generate-structures 布尔值 true 定义是否能生成结构(例如村庄)。
false - 新生成的区块中将不包含结构。
true - 新生成的区块中将包含结构。

注:由于地牢沙漠水井在技术上属于地物,因而即使此项设为false,其仍然会生成。

generator-settings 字符串 {} 本属性质用于自定义世界的生成。详见超平坦世界自定义了解正确的设定及例子。
hardcore 布尔值 false 如果设为 true,服务器难度的设置会被忽略并且设为hard(困难),玩家在死后会自动切换至旁观模式。
hide-online-players 布尔值 false 如果设为 true,服务端在响应客户端状态请求时不会返回在线玩家列表。
initial-disabled-packs 字符串 空白 需要在创建世界过程中禁用的数据包名称,以逗号分隔。
initial-enabled-packs 字符串 vanilla 需要在创建世界过程中启用的数据包名称,以逗号分隔。特别地,功能数据包必须在此指定才能生效。
level-name 字符串 world “level-name”的值将作为世界名称及其文件夹名。你也可以把你已生成的世界存档复制过来,然后让这个值与那个文件夹的名字保持一致,服务器就可以载入该存档。
部分字符,例如 ' (单引号)可能需要在前面加反斜杠号 \ 才能被正常应用。
level-seed 字符串 空白 与单人游戏类似,为你的世界定义一个种子
这里有一些例子:minecraft,404,1a2b3c。
level-type 字符串 minecraft:normal 使用世界预设ID,确定地图所生成的类型。

使用世界预设ID时,需要在其中的“:”前加“\”转义。原版世界预设ID可以省略其前面的“minecraft:”(即命名空间)。

minecraft:normal - 带有丘陵、河谷、海洋等的标准的世界。
minecraft:flat - 一个没有特性的平坦世界,可用generator-settings修改。
minecraft:large_biomes - 如同默认的世界,但所有生物群系都更大。
minecraft:amplified - 如同默认的世界,但世界生成高度提高。
minecraft:single_biome_surface - 单一生物群系世界,可用generator-settings修改。
log-ips 布尔值 true 是否在有新玩家加入游戏时,在服务器日志中记录其IP地址。
true - 在日志中记录新加入玩家的IP地址。
false - 在日志中隐藏新加入玩家的IP地址。
max-build-height 整数 256 玩家在游戏中能够建造的最大高度。可能会在该值较小时生成超过该值的地形。
max-chained-neighbor-updates 整数[需要更多信息] 1000000 限制连锁NC更新的数量,超过此数量的连锁NC更新会被跳过。若为负数则无限制。
max-players 整数(0-2147483647) 20 服务器同时能容纳的最大玩家数量。请注意,在线玩家越多,对服务器造成的负担也就越大。同样注意,服务器的OP具有在人满的情况下强行进入服务器的能力:找到在服务器根目录下叫ops.json的文件并打开,将需要此能力的OP下的bypassesPlayerLimit选项设置为true即可(默认值为false),这意味着OP将不需要在服务器人满时等待有玩家离开后再加入。过大的数值会使客户端显示的玩家列表崩坏。
max-tick-time
整数(0–(2^63 - 1)) 60000 设置每个tick花费的最大毫秒数。超过该毫秒数时,服务器watchdog插件将停止服务器程序并附带上信息:服务器的一个tick花费了60.00秒(最长也应该只有0.05秒);判定服务器已崩溃,它将被强制关闭。遇到这种情况的时候,它会调用 System.exit(1)。

译者注:如果你监测服务程序的返回代码,此时返回代码会为1。(习惯上,程序正常退出应当返回0)

-1 - 完全停用watchdog插件(这个停用选项在14w32a快照中添加)
max-world-size
整数(1-29999984) 29999984 设置可让世界边界获得的最大半径值,单位为方块。通过成功执行的命令能把世界边界设置得更大,但不会超过这里设置的最大方块限制。如果设置的max-world-size超过默认值的大小,那将不会起任何效果。

例如:

  • 设置 max-world-size为1000将会有2000×2000的地图边界。
  • 设置 max-world-size为4000将会有8000×8000的地图边界。
motd 字符串 A Minecraft Server 本属性值是玩家客户端的多人游戏服务器列表中显示的服务器信息,显示于名称下方。
  • MOTD 支持样式代码
  • MOTD 支持特殊符号,比如"♥"。然而,这些符号需要转换为Unicode转义字符。你可以在这里找到一个转换器。
  • 如果MOTD超过59个字符,服务器列表很可能会返回“通讯错误”。
network-compression-threshold
整数 256 默认会允许n-1字节的数据包正常发送, 如果数据包为n字节或更大时会进行压缩。所以,更低的数值会使得更多的数据包被压缩,但是如果被压缩的数据包字节太小将反而使压缩后字节更大。
-1 - 完全禁用数据包压缩
0 - 压缩全部数据包

注:以太网规范要求把小于64字节的数据包填充为64字节。因此,设置一个低于64的值可能没有什么好处。也不推荐让设置的值超过MTU(通常为1500字节)。

online-mode 布尔值 true 是否让服务器对比Minecraft账户数据库验证登录信息。只有在你的服务器并未与Internet连接时,才将这个值设为false。如果设为false,黑客就能够使用任意假账户连接服务器!如果minecraft.net服务器宕机或不可访问,那么该值设为true的服务器会因为无法验证玩家身份而拒绝所有玩家加入。通常,这个值设为true的服务器被称为“正版服务器”。故意设定该变量为false的服务器称为“破解服务器”(也称离线服务器),这类服务器允许拥有未授权的Minecraft副本的玩家加入。
true - 启用。服务器会认为自己具有Internet连接,并检查每一位连入的玩家。
false - 禁用。服务器不会尝试检查玩家。
op-permission-level 整数(1-4) 4 设定使用/op命令时OP的权限等级。所有存档会从之前的存档继承能力和命令。
1 - OP可以绕过重生点保护。
2 - OP可以使用所有单人游戏作弊命令(除了/publish,因为不能在服务器上使用;/debug也是)并使用命令方块。命令方块和领域服服主/管理员有此等级权限。
3 - OP可以使用大多数多人游戏中独有的命令,包括 /debug,以及管理玩家的命令(/ban/op等等)。
4 - OP可以使用所有命令,包括 /stop, /save-all, /save-on/save-off
player-idle-timeout 整数 0 如果不为0,服务器将在玩家的空闲时间达到设置的时间(单位为分钟)时将玩家踢出服务器
注:当服务器接受到下列数据包之一时将会重置空闲时间:
prevent-proxy-connections 布尔值 false 如果服务器发送的ISP/AS和Mojang的验证服务器的不一样,玩家将会被踢出。
true - 启用。服务器将会禁止玩家使用虚拟专用网络或代理。
false - 禁用。服务器将不会禁止玩家使用虚拟专用网络或代理。
pvp 布尔值 true 是否允许PvP。也只有在允许PvP时玩家自己的箭才会受到伤害。
true - 玩家可以互相伤害。
false - 玩家无法互相造成伤害(也称作玩家对战环境PvE))。

注:由玩家造成的间接伤害(例如熔岩TNT等,某种程度上还有沙子沙砾)还是会伤害其他玩家。

query.port 整数(1-65534) 25565 设置监听服务器的端口号(参见 enable-query)。
rate-limit 整数 0 设置玩家被踢出服务器前,可以发送的数据包数量。
设置为0表示关闭此功能。
rcon.password 字符串 空白 设置RCON远程访问的密码(参见enable-rcon)。RCON:能允许其他应用程序通过互联网与Minecraft服务器连接并交互的远程控制台协议。
rcon.port 整数(1-65534) 25575 设置RCON远程访问的端口号。
require-resource-pack 布尔值 false 当此选项启用(设为true)时,玩家会被提示作出选择(是否启用服务器资源包)。如果玩家拒绝则会被服务器断开连接。
  • 但是,若玩家使用Linux系统加入服务器,游戏目录内的server-resource-packs没有写权限,则会提示“无法应用服务器资源包”“所有依赖自定义资源包的功能都有可能不按预期工作”,并提示玩家“继续”或“断开连接”。若玩家选择“继续”,则仍可在此服务器中游戏。
resource-pack 字符串 空白 可选选项,可输入指向一个资源包的URI。玩家可选择是否使用该资源包。

注意若该值含":"和"="字符,需要在其前加上反斜线(\),例如 http\://somedomain.com/somepack.zip?someparam\=somevalue 资源包大小理应不能超过

  • 50 MiB(1.15-pre5前)
  • 100 MiB(1.15-pre5到1.18-pre8)
  • 250 MiB(1.18-rc1起)

注意,下载成功或失败由客户端记录,而非服务器。

resource-pack-prompt 字符串 空白

可选,用于在使用require-resource-pack时在资源包提示界面显示自定义信息。

与聊天组件语法一致,可以包含多行文本。

resource-pack-sha1 字符串 空白 资源包的SHA-1值,必须为小写十六进制,建议填写它。这还没有用于验证资源包的完整性,但是它提高了资源包缓存的有效性和可靠性。
server-ip 字符串 空白 将服务器与一个特定IP绑定。强烈建议留空该属性值!
留空,或是填入你想让服务器绑定(监听)的IP。
server-port 整数(1-65534) 25565 改变服务器(监听的)端口号。如果服务器在使用NAT的网络中运行,该端口必须被转发(在你有家用路由器/防火墙的前提下)。
simulation-distance 整数(3-32) 10 设置服务端可更新实体范围的最大值,即玩家各个方向上的区块数量(是以玩家为中心的半径,不是直径)。超出此范围的实体不会被更新,对玩家也不可见。

默认/推荐设置为10,如果有严重卡顿的话,减少该数值。

spawn-animals 布尔值 true 决定动物是否可以生成。
true - 动物可以正常生成。
false - 动物生成后会立即消失。

提示:如果你有严重的卡顿,可以设为false。

spawn-monsters 布尔值 true 决定攻击型生物(怪物)是否可以生成。
true - 启用。怪物会生成于夜晚和黑暗处。
false - 禁用。不会有任何怪物。

如果difficulty=0(即难度设置为和平)的话,该属性值不会有任何影响。

提示:如果你有严重的卡顿,可以设为false。

spawn-npcs 布尔值 true 决定是否生成村民
true - 启用。生成村民。
false - 禁用。不生成村民。
spawn-protection 整数 16 通过将该值进行2x+1的运算来决定出生点的保护半径。设置为1会保护以出生点为中心的3×3方块的区域,2会保护5×5方块的区域,3会保护7×7方块的区域,以此类推。这个选项不在第一次服务器启动时生成,只会在第一个玩家加入服务器时出现。如果服务器没有设置OP,这个选项会自动禁用。设置为0将不会禁用出生点保护,但会保护位于出生点的那一个方块(13w05a前)。
设置为0会禁用出生点保护(13w05a起,参见MC-666)。
sync-chunk-writes 布尔值 true 启用后区块文件以同步模式写入。
text-filtering-config 字符串[需要测试] 空白 服务器中需要被屏蔽的文本。[需要测试]
use-native-transport 布尔值 true 是否使用针对Linux平台的数据包收发优化。此选项仅会在Linux平台上生成。
true - 启用。启用Linux数据包收发优化。
false - 禁用。禁用Linux数据包收发优化。
view-distance 整数(3-32) 10 设置服务端发送给客户端的世界数据量,也就是设置玩家各个方向上的区块数量(是以玩家为中心的半径,不是直径)。它决定了服务端的可视距离。(另见渲染距离

默认/推荐设置为10,如果有严重卡顿的话,减少该数值。

white-list 布尔值 false 启用服务器的白名单。

当启用时,只有白名单上的用户才能连接服务器。白名单主要用于私人服务器,例如提供给相识的朋友、通过应用流程谨慎选择的陌生人等。

false - 不使用白名单。
true - 从whitelist.json文件加载白名单。

注: OP会自动被视为在白名单上,所以无需再将OP加入白名单。

Java版1.12之前的版本中,announce-player-achievements 布尔值(默认为true)属性用于切换是否成就要广播给所有玩家。该属性已被移除,但如果已经设置了这条属性,则游戏规则announceAdvancements将自动更新,随后从文件中删除这条属性。

基岩版[]

属性名称 可选值 默认值 何时生效 作用 备注
gamemode survival (0), creative (1), adventure (2) survival 总是生效或新玩家进入时 设定新玩家的游戏模式。 survival (0) - 生存模式

creative (1) - 创造模式 adventure (2) - 冒险模式

difficulty peaceful (0), easy (1), normal (2), hard (3) easy 总是生效 设置世界的游戏难度。 peaceful (0) - 和平

easy (1) - 简单 normal (2) - 普通 hard (3) - 困难

level-type FLAT, LEGACY, DEFAULT DEFAULT 生成地形时 决定生成的地图的类型。 FLAT - 平坦

LEGACY - 旧世界 DEFAULT - 默认

server-name 任意字符串 Dedicated Server 总是生效 用作服务器的名称 作为服务器在游戏内服务器列表中显示的名称。
max-players 正整数 10 总是生效 设置服务器同时能容纳的最大玩家数量。 这是应该能在服务器上游戏的玩家的最大数量。较高的值可能会影响服务器性能。
server-port 任意整数 19132 总是生效 设置服务器监听的IPv4端口号。
server-portv6 任意整数 19133 总是生效 设置服务器监听的IPv6端口号。
level-name 任意字符串 level 总是生效 该值用于世界的名称以及文件夹名。你也可以复制你的存档到这里,并把该值修改成文件夹的名称,以此替换服务器加载的存档。 使用/生成的存档名称。每个存档在/worlds中都有单独的文件夹。
level-seed 任意字符串 空白(th34f1ju34facjn5f871df312h) 生成地形时 用于将世界随机化 为世界定义一个种子。留空将随机选择种子。
online-mode true, false true 总是生效 是否身份验证 如果为true,则每个连接的玩家都必须与Xbox Live进行身份验证。
allow-list true, false false 总是生效 是否开启白名单 如果为true,则玩家都必须要在allowlist.json文件中才能登录服务器。
allow-cheats true, false false 总是生效 是否允许作弊 如果为true,则服务器将允许作弊行为(例如使用命令)。
view-distance 任意整数 10 总是生效 设置玩家可视距离最大值 单位为区块。较高的值可能会影响服务器性能。
player-idle-timeout 任意整数 30 总是生效 设置空闲玩家被踢出的时间 单位为分钟。玩家空闲时间到达设定值后将被踢出,如果设置为0或被移除。
max-threads 整数 8 总是生效 设置服务器尝试使用的最大线程数 服务器会尽可能多地使用线程。
tick-distance 范围[4, 12]内的整数 4 总是生效 设置停止加载区块的距离 当玩家远离某个区块的距离超过设定值后,该区块会停止加载。较高的值可能会影响服务器性能。
default-player-permission-level visitor, member, operator member 总是生效 设置新玩家加入时的权限 visitor-新玩家不可破坏方块

member-新玩家正常加入 operator-新玩家加入时即为OP

texturepack-required true, false false 总是生效 是否强制加载资源包 如果为 true,则当服务器有资源包时,将强制客户端使用。
content-log-file-enabled true,false false 是否启用错误日志

Minecraft Classic 服务器属性[]

属性 类型 默认值 描述
verify-names 布尔值 true 验证玩家的IP是否与其连接Minecraft.net的IP相同。如果启用,在一台电脑上同时运行服务端和客户端的人会出现问题,服务器看见的是本地IP(127.0.0.1),而Minecraft.net看到的是外部IP。除非上述情况发生,建议启用该属性。
true - 启用。服务器会和Minecraft.net检查所有的名字。
false - 禁用。服务器会确保IP吻合。
admin-slot 布尔值 false 允许OP在服务器人满时也能加入游戏。
public 布尔值 服务器是否显示在服务器列表里。
true - 服务器会显示在服务器列表里,任何人都能看到。
false - 只有掌握服务器 URL(可以在externalurl.txt中找到)的人和掌握IP和端口的人才能加入。
server-name 字符串 服务器名称,会显示在服务器名单上及有人正加入服务器时。
  • 单行文本。部分字符,例如 '(单引号)可能需要在前面加反斜杠号\才能正确应用。
max-players 整数(0-256) 服务器同时在线的最大玩家人数。注意,服务器上玩家越多,服务器使用的资源越多。同样注意,服务器管理员的连接不算在内。
max-connections 整数(1-3) 同一个IP允许的最大连接数。

注: 如果你尝试设定的值大于3,它会被改回3。

motd 字符串 MOTD 是Message of the day(每日一句)的简写,尽管你不用每天更改。MOTD是玩家加入服务器时显示的信息。
grow-trees 布尔值 是否允许树苗长成为树木。
true - 服务器会允许树苗长成为树木。
false - 服务器不会允许树苗长成为树木。

历史[]

Clock
此段落需要更新。

理由:一些设置并没有其首次加入时间

Java版Classic
服务器1.2现今已存档的最早版本。
可用的选项包括:portserver-namemax-playersmotdpublic
服务器1.3加入了verify-names,验证玩家的IP是否与其连接Minecraft.net的IP相同。
服务器1.5加入了max-connections,限制一个IP地址的最大连接数。
服务器1.9.1加入了grow-trees,除非将其设置为true,否则树苗将不会长成树木。
服务器1.10加入了verify-names禁用时的警告。
加入了admin-slot,关闭它将使OP无法在服务器人满时加入游戏。
Java版Alpha
服务器0.1.0移除了全部选项,加入了level-nameserver-ipserver-port选项。
服务器0.1.1加入了online-mode选项,如果设置为true将要求玩家使用在线登陆。
服务器0.2.0加入了monsters选项,如果设置为true将生成怪物。
服务器0.2.2加入了hellworld选项,默认为false,如果设置为true将启用地狱。
服务器0.2.4加入了no-animals选项,如果设置为true则不会生成动物。
服务器0.2.5加入了pvp选项,禁用或者启用玩家对战(PVP)。
monsters重命名为spawn-monsters并将默认设置为true。
no-animals重命名为spawn-animals
Java版Beta
1.3加入了white-list
1.5加入了allow-flight
1.6hellworld重命名为allow-nether
加入了view-distance,设置了大视距。
1.8加入了difficulty
加入了gamemode
加入了motd
Java版
1.0.0Beta 1.9-pre4加入了debugenable-queryenable-rconquery.portrcon.passwordrcon.port
1.111w49a加入了spawn-npcs
12w01a加入了level-type
正式版加入了generate-structures
1.2.112w07a加入了max-build-height
1.3.112w30a加入了snooper-enabled
1.3加入了hardcore[需要更多信息]
加入了texture-pack[需要更多信息]
1.4.212w32a加入了enable-command-block,但不会在默认配置中生成。
12w39a加入了generator-settings
12w40a加入了spawn-protection
1.513w05aspawn-protection设置为0会把出生点保护关闭了,而不是像以前一样保护1×1的范围(MC-666)。
1.6.113w16a加入了force-gamemode
13w18a加入了op-permission-level
1.7.213w36aresource-pack重命名为texture-pack
13w37b加入了player-idle-timeout
正式版加入了announce-player-achievements
1.7.5加入了broadcast-rcon-to-ops
1.814w18a加入了max-world-size
14w28a加入了自定义网络压缩选项network-compression-threshold
14w31a加入了max-tick-time
加入了resource-pack-hash
1.8.1pre1加入了broadcast-rcon-to-ops
加入了use-native-transport
1.8.4加入了broadcast-console-to-ops
1.1116w38a加入了prevent-proxy-connections
1.1217w18a游戏规则announceAdvancements取代选项announce-player-achievements,启动游戏时会将此选项移除并更改游戏规则。
1.1318w19a加入了enforce-whitelist
1.1418w48adifficultygamemode设置使用字符串,整数仍旧可以使用。
1.14.4pre4加入了function-permission-level选项,可以控制函数的权限等级。
1.15pre5将服务器资源包的大小上限提升到100MB。
1.1620w14a加入了sync-chunk-writes选项,是否禁用新的同步区块写入。
20w16a加入了enable-jmx-monitoring选项,启用将使MBean使用以毫秒为单位时间计时[需要更多信息]
20w18a加入了enable-status
加入了entity-broadcast-range-percentage
20w20a移除了generate-structures
移除了generator-settings
移除了level-seed
移除了level-type
1.16.220w28a加入了rate-limit,设置数据包的速度限制。
1.16.4pre1加入了text-filtering-config
1.1720w45a加入了require-resource-pack,用于强制使用户接受服务器资源包。
20w49a移除了max-build-height
21w15a加入了resource-pack-prompt,用于在资源包提示界面中显示自定义信息。
1.1821w38a加入了simulation-distance,用于控制实体更新的距离范围。
21w43a移除了snooper-enabled
21w44a加入了hide-online-players,用于控制服务端是否在响应客户端状态请求时发送在线玩家列表。
pre1重新加入了generate-structures
重新加入了generator-settings
重新加入了level-seed
重新加入了level-type
rc1将服务器资源包的大小上限提升到250MB。
1.1922w11a加入了max-chained-neighbor-updates,用于限制连锁NC更新的数量,超过此数量的连锁NC更新会被跳过。
level-type的接受值改为世界预设ID。
22w17a加入了enforce-secure-profile,用于使服务器要求玩家必须具有Mojang签名的公钥才能进入服务器。
22w19a加入了previews-chat,用于启用聊天预览功能。
加入了临时的test-rainbow-chat,用于在聊天预览中以彩虹色显示消息文本。
pre1移除了test-rainbow-chat
1.19.1pre2enforce-secure-profile的默认值改为true。
1.19.322w42a移除了聊天预览及与其相关的previews-chat
加入了initial-enabled-packsinitial-disabled-packs,用于指定要在创建世界过程中被选中并加载的数据包。
1.20pre1文件现在默认以UTF-8编码读取,但仍保留先前编码(ISO 8859-1/Latin 1)的后向兼容性。
文件现在会以UTF-8编码写入。
1.20.223w31a加入了log-ips,用于在玩家加入游戏时在日志中记录其IP地址。
基岩版
1.6.1基岩版专用服务器的首次发布。
可用的选项包括:server-namegamemodedifficultyallow-cheatsmax-playersonline-modewhite-listserver-portserver-port-v6view-distancetick-distanceplayer-idle-timeoutmax-threadslevel-namelevel-seeddefault-player-permissiontexturepack-required
1.7.0default-player-permission重命名为default-player-permission-level
1.12.0加入了content-log-file-enabled,用于启用错误日志。
1.13.0加入了compression-thresholdserver-authoritative-movementplayer-movement-score-thresholdplayer-movement-distance-thresholdplayer-movement-duration-threshold-in-mscorrect-player-movement
1.16.100server-authoritative-movement的默认值从true改为server-auth(原先的false现在改为client-auth)。
1.16.210加入了新的选项force-gamemodeserver-authoritative-block-break,以及将erver-auth-with-rewind重命名为server-authoritative-movement
1.18.10white-list重命名为allow-list
1.19.20加入了disable-player-interactionchat-restriction
1.19.41加入了client-side-chunk-generation-enabled
1.19.501.19.50.21加入了enable-lan-visibility

语言

Advertisement