跳到主要内容

Paper 配置


Paper 配置文件

信息

我们的许多文件都有全面的文档说明。如果是这种情况,它们会提供指向其页面的链接。 如果不是这种情况,它们会提供简短的说明来解释它们是什么。

logs
Description:
This folder contains all the logs for the server. It compresses old logs into .gz files, but holds the most recent log as a latest.log file.
plugins
Description:
You can place your plugin JARs here.
└─
Description:
Used to store remapped plugins. (Learn more)
└─
Description:
Used to store configuration and data for the bundled spark profiler. (Learn more)
<world>
└─
Description:
Every world folder will have this file. The values here only apply to this world.
banned-ips.json
Description:
This file stores all the banned IP addresses on the server.
banned-players.json
Description:
This file stores all the banned player information for the server.
eula.txt
Description:
This file is in place to allow you to accept the Minecraft EULA. This is required to start the server.
help.yml
Description:
This file provides you with a wide variety of ways to configure the /help system in your Paper Server.
ops.json
Description:
This file stores a list of all players with operator status.
permissions.yml
Description:
The permissions.yml file allows creating of permission nodes so that server admins can easily distribute permissions.
usercache.json
Description:
This file acts as a cache of user information that has been requested from Mojang's servers when they join the server or their texture is used as a Head.
whitelist.json
Description:
This is is a server configuration file that stores the usernames of players who have been whitelisted on a server.

每个世界的配置

Paper 配置中最强大但最不被理解的功能之一是为每个世界设置配置选项。虽然您不能为每个世界覆盖所有配置选项,但存储在 paper-world-defaults.yml 中的所有内容都可以。

默认值

Paper 默认不设置任何每个世界的覆盖,所有默认值都存储在 config/paper-world-defaults.yml 中。这个文件中的所有内容都可以按世界覆盖,但默认情况下不会。更改 paper-world-defaults.yml 中的内容将更改所有您没有手动覆盖的世界的值。

每个世界的值

要为特定世界设置值,请编辑世界文件夹中的 paper-world.yml。例如,如果您想为名为 resource 的世界启用 lootables.auto-replenish,您需要像这样编辑 resource 文件夹中的 paper-world.yml

_version: 28

lootables:
auto-replenish: true

默认情况下,paper-world.yml 配置文件中除了 _version 外没有设置任何内容。要覆盖某个选项的默认值,您必须通过从 paper-world-defaults.yml 复制来手动添加它。

继承

所有未在世界中明确定义的配置都从 paper-world-defaults.yml 继承。这意味着您不需要在 paper-world-defaults.yml 和每个单独的 paper-world.yml 之间重复自己。您不需要也不应该将整个 paper-world-default.yml 文件复制到每个您想要修改的 paper-world.yml 文件中。只需复制您想要更改的确切值。

这里有一个更复杂的实际例子:在两个世界中设置不同的 spawn-limitsauto-replenish

paper-world-defaults.yml
lootables:
auto-replenish: true
entities:
spawning:
spawn-limits:
ambient: 70
axolotls: 10
creature: 15
monster: 5
underground_water_creature: 5
water_ambient: 5
water_creature: 20
world_nether/paper-world.yml
entities:
spawning:
spawn-limits:
monster: 90
resource_world/paper-world.yml
lootables:
auto-replenish: false
entities:
spawning:
spawn-limits:
axolotls: 8
creature: 15
monster: 2

这个例子展示了继承的概念。对于每个世界,这是将要应用的有效配置:

配置键worldworld_netherworld_the_endresource_world
lootables.auto-replenishtruetruetruefalse
entities.spawning.spawn-limits.ambient15151515
entities.spawning.spawn-limits.axolotls5558
entities.spawning.spawn-limits.creature10101015
entities.spawning.spawn-limits.monster7090702
entities.spawning.spawn-limits.underground_water_creature5555
entities.spawning.spawn-limits.water_ambient20202020
entities.spawning.spawn-limits.water_creature5555

注意 world_the_end/paper-world.yml 从未被修改。因此,它从 config/paper-world-defaults.yml 继承所有配置选项。此外,auto-replenish 只在 resource_world/paper-world.yml 中被禁用,因为在 config/paper-world-defaults.yml 中,auto-replenish 被设置为 true