以下为1.20.4的配置文件为例
!!!所有改动均需要重启服务端后才能生效
#Minecraft server properties
#Wed Dec 27 21:41:59 CST 2023
allow-flight=false
allow-nether=true
broadcast-console-to-ops=true
broadcast-rcon-to-ops=true
debug=false
difficulty=easy
enable-command-block=false
enable-jmx-monitoring=false
enable-query=false
enable-rcon=false
enable-status=true
enforce-secure-profile=true
enforce-whitelist=false
entity-broadcast-range-percentage=100
force-gamemode=false
function-permission-level=2
gamemode=survival
generate-structures=true
generator-settings={}
hardcore=false
hide-online-players=false
initial-disabled-packs=
initial-enabled-packs=vanilla
level-name=world
level-seed=
level-type=minecraft\:normal
log-ips=true
max-chained-neighbor-updates=1000000
max-players=20
max-tick-time=60000
max-world-size=29999984
motd=A Minecraft Server
network-compression-threshold=256
online-mode=true
op-permission-level=4
player-idle-timeout=0
prevent-proxy-connections=false
pvp=true
query.port=25565
rate-limit=0
rcon.password=
rcon.port=25575
require-resource-pack=false
resource-pack=
resource-pack-id=
resource-pack-prompt=
resource-pack-sha1=
server-ip=
server-name=Unknown Server
server-port=25565
simulation-distance=10
spawn-animals=true
spawn-monsters=true
spawn-npcs=true
spawn-protection=16
sync-chunk-writes=true
text-filtering-config=
use-native-transport=true
view-distance=10
white-list=false
其中较为常用的点将列在如下,为了方便查找,请善用F3
将enable-command-block=false改成enable-command-block=true即可启用
将max-players=20的20改为你想要的数即可
将motd=A Minecraft Server的A Minecraft Server改为你想要的数即可,此处博主更建议使用第三方插件来进行修改花里胡哨的motd
将difficulty=easy的easy修改即可,可修改为easy|hard|normal|peaceful(参考Minecraft Wiki)
将online-mode=true改为online-mode=false即可
将pvp=true改为false即可
将server-port=25565的25565改为你所想的端口即可(本文作者建议将query.port=25565的25565一并改为相同端口,虽然不知道有啥用)
将spawn-protection=16改为spawn-protection=0即可
将allow-flight=false的false改为true有助于你解决因延迟过高被判定飞行作弊而踢出服务器问题
在level-seed=后面加上你所需的种子,然后删除服务器的world文件夹重新生成即可