1623 字
8 分钟
Minecraft服务器配置详解 (server.properties)
🎮 Minecraft服务器配置详解 (server.properties)
🔧 适用版本:Minecraft Java Edition 服务端
📋 目录
🛡️ 安全设置
online-mode
online-mode=true正版验证模式
true✅ 启用正版验证(推荐)false❌ 离线模式,允许盗版客户端
⚠️ 安全提醒:关闭正版验证会带来安全风险
enforce-secure-profile
enforce-secure-profile=true强制安全配置文件
true✅ 强制使用安全配置文件false❌ 不强制使用
prevent-proxy-connections
prevent-proxy-connections=false阻止代理连接
true✅ 阻止通过代理连接的玩家false❌ 允许代理连接
🌍 世界生成
level-name
level-name=world世界名称
指定世界存档的文件夹名称,默认为 world
level-seed
level-seed=世界种子
- 留空:随机生成世界
- 可输入数字或文字作为种子
level-type
level-type=minecraft:normal世界类型
minecraft:normal🏔️ 普通世界minecraft:flat🏞️ 超平坦minecraft:large_biomes🌲 大型生物群系minecraft:amplified⛰️ 放大化世界
generate-structures
generate-structures=true生成结构
true✅ 生成村庄、要塞、遗迹等结构false❌ 不生成任何结构
generator-settings
generator-settings={}生成器设置
用于超平坦世界等特殊世界类型的详细配置
👥 玩家管理
max-players
max-players=20最大玩家数
服务器同时在线的最大玩家数量
white-list
white-list=false白名单功能
true✅ 启用白名单false❌ 禁用白名单
enforce-whitelist
enforce-whitelist=false强制白名单
true✅ 只有白名单玩家可以进入false❌ 不强制白名单
player-idle-timeout
player-idle-timeout=0玩家空闲超时
0禁用超时踢出数字空闲超时时间(分钟)
hide-online-players
hide-online-players=false隐藏在线玩家
true✅ 隐藏服务器列表中的在线玩家信息false❌ 显示在线玩家信息
🎯 游戏机制
gamemode
gamemode=survival默认游戏模式
survival⚔️ 生存模式creative🎨 创造模式adventure🗺️ 冒险模式spectator👻 观察者模式
force-gamemode
force-gamemode=false强制游戏模式
true✅ 强制所有玩家使用默认游戏模式false❌ 允许玩家保持自己的游戏模式
difficulty
difficulty=easy游戏难度
peaceful😇 和平easy😊 简单normal😐 普通hard😈 困难
hardcore
hardcore=false极限模式
true⚰️ 启用极限模式(死亡后被踢出)false❌ 普通模式
pvp
pvp=true玩家对战
true⚔️ 启用PVPfalse🕊️ 禁用PVP
allow-flight
allow-flight=false允许飞行
true✈️ 允许生存模式飞行false🚫 禁止生存模式飞行
allow-nether
allow-nether=true启用下界
true🔥 启用下界维度false❌ 禁用下界维度
🔧 服务器性能
view-distance
view-distance=10视距设置
服务器向客户端发送的最大视距(区块数)
- 范围:3-32
- 数值越高消耗越大
simulation-distance
simulation-distance=10模拟距离
服务器模拟游戏逻辑的距离,影响:
- 🔴 红石电路运行
- 🌱 农作物生长
- 🐄 动物行为
entity-broadcast-range-percentage
entity-broadcast-range-percentage=100实体广播范围
100默认范围(100%)- 数值越高范围越大,性能消耗越大
max-tick-time
max-tick-time=60000最大Tick时间
单个tick允许的最大时间(毫秒),超过会显示警告
max-chained-neighbor-updates
max-chained-neighbor-updates=1000000最大连锁更新数
防止红石等连锁反应造成服务器卡顿
sync-chunk-writes
sync-chunk-writes=true同步区块写入
true📝 同步写入(更安全,性能较低)false⚡ 异步写入(性能更好,可能丢失数据)
use-native-transport
use-native-transport=true原生传输
true🚀 使用原生网络传输(Linux下性能更好)false☕ 使用Java传输
🌐 网络配置
server-ip
server-ip=服务器IP
- 留空:绑定所有可用IP
- 指定IP:只绑定特定IP地址
server-port
server-port=25565服务器端口
服务器监听的端口号,默认 25565
network-compression-threshold
network-compression-threshold=256网络压缩阈值
-1禁用压缩数字超过此大小的数据包将被压缩
rate-limit
rate-limit=0连接速率限制
0禁用限制数字限制同一IP的连接频率
motd
motd=A Minecraft Server服务器描述
在服务器列表中显示的服务器描述信息
📦 资源包设置
resource-pack
resource-pack=资源包URL
服务器资源包的下载链接
resource-pack-prompt
resource-pack-prompt=资源包提示
提示玩家下载资源包时显示的信息
resource-pack-sha1
resource-pack-sha1=资源包校验
用于验证资源包完整性的SHA1哈希值
require-resource-pack
require-resource-pack=false强制资源包
true✅ 必须接受资源包才能进入false❌ 资源包可选
🛠️ 管理工具
enable-command-block
enable-command-block=false命令方块
true✅ 启用命令方块false❌ 禁用命令方块
op-permission-level
op-permission-level=4管理员权限等级
1基础权限2中级权限3高级权限4完整权限
function-permission-level
function-permission-level=2函数权限等级
数据包函数的权限等级(1-4)
broadcast-console-to-ops
broadcast-console-to-ops=true广播控制台消息
true✅ 管理员可以看到控制台消息false❌ 管理员看不到控制台消息
🔍 监控和查询
enable-status
enable-status=true状态查询
true✅ 启用服务器状态查询false❌ 禁用状态查询
enable-query
enable-query=falseQuery查询
true✅ 允许外部程序查询服务器信息false❌ 禁用Query功能
query.port
query.port=25565Query端口
用于外部查询服务器信息的端口号
enable-jmx-monitoring
enable-jmx-monitoring=falseJMX监控
true✅ 启用JMX性能监控false❌ 禁用JMX监控
🔐 远程控制
enable-rcon
enable-rcon=falseRCON远程控制台
true✅ 启用RCONfalse❌ 禁用RCON
rcon.port
rcon.port=25575RCON端口
远程控制台的端口号
rcon.password
rcon.password=RCON密码
远程控制台的连接密码
broadcast-rcon-to-ops
broadcast-rcon-to-ops=true广播RCON消息
true✅ 管理员可以看到RCON消息false❌ 管理员看不到RCON消息
🐾 生物生成
spawn-animals
spawn-animals=true生成动物
true🐄 生成被动生物(牛、羊、猪等)false❌ 不生成被动生物
spawn-monsters
spawn-monsters=true生成怪物
true👹 生成敌对生物(僵尸、苦力怕等)false❌ 不生成敌对生物
spawn-npcs
spawn-npcs=true生成NPC
true👨🌾 生成村民和其他NPCfalse❌ 不生成NPC
spawn-protection
spawn-protection=16出生点保护
出生点周围的保护范围(方块数)
0禁用保护数字保护半径
🌍 世界设置
max-world-size
max-world-size=29999984最大世界大小
世界边界的最大半径(约3000万方块)
initial-enabled-packs
initial-enabled-packs=vanilla初始启用数据包
服务器启动时启用的数据包列表
initial-disabled-packs
initial-disabled-packs=初始禁用数据包
服务器启动时禁用的数据包列表
text-filtering-config
text-filtering-config=文本过滤配置
用于过滤聊天内容的配置文件路径
📊 性能优化建议
🚀 高性能配置
view-distance=8simulation-distance=6entity-broadcast-range-percentage=75network-compression-threshold=512sync-chunk-writes=false🛡️ 安全优化配置
online-mode=trueenforce-secure-profile=trueprevent-proxy-connections=truewhite-list=truespawn-protection=32🎮 体验优化配置
difficulty=normalpvp=truespawn-animals=truespawn-monsters=truegenerate-structures=true📝 注意事项
⚠️ 重要提醒:
- 修改配置后需要重启服务器才能生效
- 部分配置修改可能影响已生成的世界
- 建议在修改前备份世界文件
- 性能配置需要根据服务器硬件调整
Minecraft服务器配置详解 (server.properties)
https://blog.ekubo.me/posts/5/ 部分信息可能已经过时