编辑配置文件
原Wiki页面:https://github.com/Lauriethefish/BetterPortals/wiki/Editing-the-Config-file 在此页,你可以了解到有关配置文件中各项的功能以及更改方式的详细说明。
要在不重新启动服务器的情况下测试对配置文件的更改,只需要在游戏或控制台中输入/bp reload
config.yml
这是一份由插件自动生成的config.yml
插件版本号:0.6
- config_0.6.yml
# This is the BetterPortals configuration file # Many of these values should not be changed unless you know what you are doing # WARNING: The portal effect size is the biggest performance sink, higher numbers can cause tons of lag! # The number of blocks that the portal effect will render # to the up, down, forwards and backwards of the portal # (the total width of the effect is twice this) portalEffectSizeXZ: 13 # Same as the previous, but up/down instead portalEffectSizeY: 7 # The closest portal in this range will be activated # All others are discarded portalActivationDistance: 20 portalBlockUpdateInterval: 20 # How often the portal will re-check for the blocks around it enableEntitySupport: true entityCheckInterval: 5 # How often the portal will check for surrounding entities # Setting this to true will allow you to see straight through a portal # NOTE: This generally makes it look a bit less convincing, since it's easier to see when the player's client doesn't quite keep up hidePortalBlocks: false # How close portals can spawn to each other, in blocks minimumPortalSpawnDistance: 6 enableDebugLogging: false # Setting this to true will make the plugin print much more detailed info about what is happenning. Useful for finding issues. # The maximum size of portals in blocks. The x is width and y is height # This should never be larger than twice the portal effect size # Larger portals tend to look less good, so the default values work well maxPortalSize: x: 5 y: 5 # Stores the offset from the corners of the portal where the collision box will be # This collision box is how the portal effect is calculated # (if the ray from the player's view to the block being tested intersects this box it will be considered visible through the portal) # The default values are tuned to work fairly well, so I don't recommend changing these portalCollisionBox: x: 0.38 y: 0.38 z: 0.25 # Worlds where the plugin will fall back to the vanilla portal logic disabledWorlds: - 'some_world' # How long the plugin waits before rendering portals after switching worlds. # Useful to deal with lag that some players get just after switching worlds. # Set to 0 to disable waitTimeAfterSwitchingWorlds: 1 teleportCooldown: 10 # How long to wait before a player can go back after going through a portal (0 to disable) # Stores the links between worlds. By default this links the overworld and the nether with portals # There are two links for the overworld and the nether - one for each way. # This is to allow one way links between dimensions # The x and z coordinates of the portals are multiplied by the coordinateRescalingFactor to spawn portals # The min and max spawn y limit where portals can spawn - for instance you should not be able to spawn portals above the nether ceiling worldConnections: '0': originWorld: 'world' destinationWorld: 'world_nether' minSpawnY: 5 maxSpawnY: 122 coordinateRescalingFactor: 0.125 '1': originWorld: 'world_nether' destinationWorld: 'world' minSpawnY: 5 maxSpawnY: 250 coordinateRescalingFactor: 8.0 # Allows for setting a proxy server to allow cross-server portals proxy: enableProxy: false proxyAddress: "" proxyPort: 25510 key: "" # A UUID used for encrypted communication with the proxy. You should set this to the UUID in the BetterPortals config on the bungee side. reconnectionDelay: 300 # Delay in ticks before attempting a reconnection to the proxy if disconnected (default 30 seconds) Set to -1 to disable. # Will randomly swap some blocks between the two ends of a nether portal when it's made, makes a cool effect. dimensionBlend: enable: false fallOffRate: 0.15 # Low values mean a greater distance chatMessages: prefix: "&7[&aBetterPortals&7]&a " notEnoughPerms: "You do not have permission to use this command!" mustBePlayer: "You must be a player to use this command" mustMakeSelection: "You must make a selection first" invalidSelection: "Invalid selection! Portal selections must be on the two corners of a portal" mustSelectBothSides: "You must select both sides of a portal first. For info, run /bp help" mustSelectOrigin: "You must select the origin of the portal on this server" wrongNumberOfArgs: "Wrong number of arguments. Run /bp help for help." invalidArgs: "One of your arguments was invalid. Run /bp help for help." differentSizes: "The origin and destination portal must be of the same size" noPortalCloseEnough: "No portal close enough found" portalNotOwnedByPlayer: "You do not have permission to remove portals created by other people" unknownCommand: "Unknown Command. For help, run /bp help" proxyDisabled: "Unable to reconnect to the proxy: it is not enabled!" alreadyConnected: "Unable to reconnect to the proxy: the server is already connected!" horizontalIssues: "Warning: horizontal portals with different origin/destination directions can cause issues with block rotations - not all blocks can be rotated in every direction" reload: "Reloaded plugin" originPortalSet: "Origin portal set" destPortalSet: "Destination portal set" portalsLinked: "Portals linked successfully" portalRemoved: "Portal removed" startedReconnection: "Started reconnecting to the proxy. See console for details." setPosA: "Set position A" setPosB: "Set position B" portalWandName: "&aPortal Wand"
chatMessages部分汉化版:
插件版本号:0.6
- chatMessages.yml
chatMessages: prefix: "&7[&aBetterPortals&7]&a " notEnoughPerms: "你没有权限使用这个命令!" mustBePlayer: "你必须是玩家才能使用这个命令!" mustMakeSelection: "你必须先进行选择" invalidSelection: "无效的选择:必须选择同一垂直于地面的平面上的对角" mustSelectBothSides: "你必须选择两侧的传送门。使用 /bp help 查看帮助" mustSelectOrigin: "你必须在这个服务器上选择起始传送门" wrongNumberOfArgs: "参数值错误。使用 /bp help 查看帮助" invalidArgs: "参数错误。使用 /bp help 查看帮助" differentSizes: "起始传送门和目标传送门的大小必须相同" noPortalCloseEnough: "找不到足够接近你的传送门" portalNotOwnedByPlayer: "你没有权限删除其他人创建的传送门" unknownCommand: "未知命令。使用 /bp help 查看帮助" proxyDisabled: "无法重新连接到Bungeecord代理:未启用!" alreadyConnected: "无法重新连接到Bungeecord代理:服务器已连接!" horizontalIssues: "警告:起点/终点方向不同的水平传送门可能会导致方块旋转出现问题:并非所有方块都可以任意旋转" reload: "插件已重载完成" originPortalSet: "起始传送门已设置" destPortalSet: "目标传送门已设置" portalsLinked: "传送门已建立连接" portalRemoved: "传送门已移除" startedReconnection: "开始重新连接到Bungeecord代理。 有关详细信息,请参见控制台。" setPosA: "设置点A" setPosB: "设置点B" portalWandName: "&a传送门魔杖"
传送门渲染范围大小
portalEffectSizeXZ
指定在X轴和Z轴上传送门渲染的半径
portalEffectSizeY
指定在Y轴上传送门渲染的半径
编辑这些值时请务必谨慎:较大的值不仅会对服务器造成较大压力,也会对客户端造成影响。
当玩家在渲染范围较大的传送门周围走动时会导致客户端的渲染出现延迟。
世界连接
worldConnections
将配置传送门将可以连接到哪些世界。默认的情况下,世界world
1)将与world_nether
2)建立连接。
你也可以根据你的喜好改变地狱和主世界的对应比例。例如,你可以把它改成1:4(下界1个方块=主世界4个方块),而不是原版的1:8(下界1个方块=主世界8个方块)。
下面是默认的config.yml中worldConnections段落:
- worldConnections.yml
worldConnections: '0': originWorld: 'world' destinationWorld: 'world_nether' minSpawnY: 5 maxSpawnY: 122 coordinateRescalingFactor: 0.125 '1': originWorld: 'world_nether' destinationWorld: 'world' minSpawnY: 5 maxSpawnY: 250 coordinateRescalingFactor: 8.0
在此配置文件中,一项连接主世界到下界,另一项连接下界到主世界。
coordinateRescalingFactor
是不同维度之间生成传送门时X轴和Z轴坐标乘以的值。所以从其他世界到下界,坐标要乘以8,从下界到其它世界,坐标要除以8。
minSpawnY
/maxSpawnY
指定了传送门可以生成的区域(这可以防止传送门在下界顶部的基岩层上方生成)。
下面是一个例子,将第二个下界与second世界建立了连接:
你必须确保你worldConnections的列表中没有重复任何数字,每个数字必须是唯一的。
- second.yml
worldConnections: '0': originWorld: 'world' destinationWorld: 'world_nether' minSpawnY: 5 maxSpawnY: 122 coordinateRescalingFactor: 0.125 '1': originWorld: 'world_nether' destinationWorld: 'world' minSpawnY: 5 maxSpawnY: 250 coordinateRescalingFactor: 8.0 '2': originWorld: 'second' destinationWorld: 'second_nether' minSpawnY: 5 maxSpawnY: 122 coordinateRescalingFactor: 0.125 '3': originWorld: 'second_nether' destinationWorld: 'second' minSpawnY: 5 maxSpawnY: 250 coordinateRescalingFactor: 8.0
其他
如果你不清楚某些配置的具体用途,请不要随意修改!
disabledWorlds
在此项指定的世界中,插件将不会生效
waitTimeAfterSwitchingWorlds
控制插件在切换世界后渲染传送门之前等待的时间(单位:tick,如果需要,可以将其设置为0)
maxPortalSize
将限制传送门的最大尺寸(任何大于此大小的传送门将不会被激活)
portalCollisionBox
是插件使用的技术参数,用于指定在何处渲染方块 注意:如果你不清楚此项的具体用途,请不要随意修改!
minimumPortalSpawnDistance
将限制生成传送门时彼此的最近距离
hidePortalBlocks
设置为true
将隐藏传送门方块
enableEntitySupport
设置为false
将禁止传送门渲染可见实体
entityCheckInterval
将控制插件多久检查一次传送门起点和终点附近的实体(单位:tick)
portalActivationDistance
将控制玩家必须距离传送门多近才会渲染另一侧的方块和实体
portalBlockUpdateInterval
将指定传送门检查周围的方块并将其发送到另一个线程进行处理的频率
unsafeMode
使更多的计算在另一个线程上进行 注意:目前未经过足够的测试,可能出现严重BUG,不建议使用!
portalWandName
设置传送门魔杖的物品名称 已获取的传送门魔杖的物品名将不会发生改变