本插件存储数据的方式与 MultiVerse-Inventories 根本不同。就像 MV-I 一样,该插件将数据保存为 .json 格式,但相似之处仅此而已。它不仅保存你的物品栏,还会保存你的各项统计数据!这包括活跃药水效果、经验值、等级、经济余额等。如果你不希望保存所有这些项目,可以针对每一项进行配置。请参阅下方的“配置”部分以获取详细信息。所有命令均可在游戏中通过 '/pwi help' 命令查看。
> 配置
##########################################
# PerWorldInventory 配置文件 #
# #
# 如果配置中添加了新值, #
# 它们不会自动 #
# 添加到这里。如果不存在,则默认为 #
# false。 #
##########################################
# 配置文件版本。切勿更改!!!
config-version: 3
# 如果为 true,插件将在玩家进入世界时更改其游戏模式
# 设置的游戏模式在 worlds.yml 文件中配置
manage-gamemodes: false
# 如果为 true,玩家在不同游戏模式下将拥有独立的物品栏
separate-gamemode-inventories: true
# 所有玩家设置均在此处:
player:
# 保存并加载玩家的经济余额。需要 Vault!
economy: false
# 加载玩家的末影箱
ender-chest: true
# 加载玩家的物品栏
inventory: true
# 所有玩家统计数据的选项均在此处:
stats:
# 加载玩家是否允许飞行
can-fly: true
# 加载玩家的显示名称
display-name: false
# 加载玩家的饥饿值消耗等级
exhaustion: true
# 加载玩家的经验值总量
exp: true
# 加载玩家的饥饿度
food: true
# 加载玩家当前是否处于飞行状态
flying: true
# 加载玩家所在的游戏模式。如果
# 'manage-gamemodes' 为 true,则此项会被强制设为 false,以防止无限循环
gamemode: true
# 加载玩家的生命值
health: true
# 加载玩家的等级
level: true
# 加载玩家的所有药水效果
potion-effects: true
# 加载玩家的饱和度
saturation: true
# 加载玩家的坠落距离
fall-distance: true
# 加载玩家身上的火焰燃烧刻数
fire-ticks: true
# 加载玩家的最大空气量
max-air: true
# 加载玩家当前剩余的空气量
remaining-air: true
# 此行之下的配置版本为 2 #
# 配置保存之间的时间间隔,单位为秒
# 默认值为 5 分钟(300 秒)
save-interval: 300
# 此行之下的配置版本 3 新增内容 #
# 尝试判断玩家上次登出所在的维度/世界
# 如果该世界不同,则保存/加载正确的数据。
# 需要 MC 1.9.2 或更高版本
load-data-on-join: false
# 在控制台输出 PWI 中发生的所有事件的调试消息
debug-mode: false
非常直观,将选项设置为 false 会导致该项在世界切换时不被加载。默认情况下,'manage-gamemodes'(管理游戏模式)选项被设为 false,以避免与你可能用于管理游戏模式的其他插件产生冲突。
groups:
world1:
worlds:
- world1
- world1_nether
- world1_the_end
default-gamemode: SURVIVAL
world_2:
worlds:
- world_2
default-gamemode: CREATIVE
在这里配置你的世界分组。请遵循默认值或上述示例以获取正确的格式。如果在主配置中将 'manage-gamemodes' 设置为 false,则此处的 'default-gamemode'(默认游戏模式)选项无效,可以安全删除。同一组内的所有世界将共享相同的物品栏和统计数据。
完成所需的更改后,只需输入 /pwi reload 即可。
为每个已配置的分组以及服务器后备方案(如果某些世界未属于任何分组)提供了默认的物品栏预设。可以通过在游戏中使用 '/pwi setworlddefault [group]' 命令来设置这些预设,其中 group 是已配置的分组的名称,或者 'default'。如果未指定分组,它将为你当前所在的世界分组设置预设。这不需要重新加载配置。
> 权限与命令
权限:
- - perworldinventory.admin:默认为管理员拥有,授予所有其他权限
- - perworldinventory.convert:允许用户从其他插件转换数据
- - perworldinventory.reload:允许用户重新加载配置文件和世界分组
- - perworldinventory.setdefaults:允许用户设置分组的默认物品栏预设
- - perworldinventory.notify:拥有此权限的用户将在配置过时收到通知
- - perworldinventory.bypass.*:拥有此权限的用户在切换世界或游戏模式时将保留其物品栏
- - perworldinventory.bypass.gamemode:拥有此权限的用户在切换游戏模式时将保留其物品栏
- - perworldinventory.bypass.world:拥有此权限的用户在切换世界时将保留其物品栏
命令:
- /pwi help:显示帮助页面
- /pwi convert:从 MultiVerse-Inventories 转换数据;详见下文
- /pwi reload:重新加载配置文件和世界文件
- /pwi setWorldDefault [default | <group_name>]:为指定的分组或服务器默认设置默认物品栏预设。如果未提供参数,它将为你当前所在的世界分组设置预设。
> 数据转换
如果你是从 MV-I 进行转换,只需运行 "/pwi convert multiverse" 命令,插件会自动处理一切。你必须正在运行 MV-I 才能执行此操作。请注意,转换功能仅适用于 MV-I 版本 2.5,不适用于 2.4。当 MV-I 从 2.4 更新到 2.5 时,它从 yml 文件格式切换到 json 文件格式,但不会立即转换数据,直到数据被使用为止。请务必保留好你的 MV-I 数据,以防万一出现问题。
来自 MultiInv 的转换器仍在开发中。自版本 1.4.0 起已有初步框架;请勿使用!它尚未完全正常运行,会导致错误。
> 杂项
支持
如果你遇到问题,请点击这里提交。请附上你的配置文件和相关日志!
> 其他
代码仓库可在 Github 和 BitBucket 上找到。
The way this plugin stores data is fundamentally different from MultiVerse-Inventories. Like MV-I, this plugin saves data in a .json format, but that is where the similarities end. Not only does this save your inventory, it saves your stats as well! This includes things like active potion effects, exp, level, economy balance, and more. These all can be configured on a per-item basis, should you not want all of these saved. See the Configuration section below for these. All commands can be seen ingame with the '/pwi help' command.
> Configuration
##########################################
# PerWorldInventory configuration file #
# #
# If new values are added to the #
# config, they will not automatically #
# be added here. They will default to #
# false if not present. #
##########################################
# Version of the config. DO NOT CHANGE!!!!!
config-version: 3
# If true, the plugin will change player's gamemodes when entering a world
# The gamemode set is configured in the worlds.yml file
manage-gamemodes: false
# If true, players will have different inventories for each gamemode
separate-gamemode-inventories: true
# All settings for players are here:
player:
# Save and Load players' economy balances. Requires Vault!
economy: false
# Load players' ender chests
ender-chest: true
# Load players' inventory
inventory: true
# All options for player stats are here:
stats:
# Load if a player is able to fly
can-fly: true
# Load the player's display name
display-name: false
# Load a player's exhaustion level
exhaustion: true
# Load how much exp a player has
exp: true
# Load a player's hunger level
food: true
# Load if a player is flying
flying: true
# Load what gamemode a player is in. This is shadow-set to false if
# 'manage-gamemodes' is true, to stop infinite loop
gamemode: true
# Load how much health a player has
health: true
# Load what level the player is
level: true
# Load all the potion effects of the player
potion-effects: true
# Load the saturation level of the player
saturation: true
# Load a player's fall distance
fall-distance: true
# Load the fire ticks a player has
fire-ticks: true
# Load the maximum amount of air a player can have
max-air: true
# Load the current remaining air a player has
remaining-air: true
# Config Version 2 below this line #
# Configure the amount of time between saves, in seconds
# Default is 5 minutes (300 seconds)
save-interval: 300
# Config Version 3 Additions below this line #
# Attempt to figure out which world a player last logged off in
# and save/load the correct data if that world is different.
# REQUIRES MC 1.9.2 OR NEWER
load-data-on-join: false
# Print out debug messages to the console for every event that happens in PWI
debug-mode: false
Pretty straightforward, turning the options to false will cause that item to not be loaded on world change. The option 'manage-gamemodes' is set to false by default to not interfere with other plugins that you may have to manage GameModes.
groups:
world1:
worlds:
- world1
- world1_nether
- world1_the_end
default-gamemode: SURVIVAL
world_2:
worlds:
- world_2
default-gamemode: CREATIVE
This is where you configure your world groups. Follow the default or above example to get the format. If you have 'manage-gamemodes' set to false in your main config, the 'default-gamemode' option here does nothing, and can be safely removed. Worlds in the same group will all share the same inventory and stats.
Once you have made your desired changes, simply type /pwi reload.
A default inventory loadout is provided for each configured group, as well as for a server fallback, if for some reason a world isn't in any group. These can be set ingame by using the '/pwi setworlddefault [group]' command, where group is a configured group name, or 'default'. If no group is specified, it will set the loadout for the group that you are currently standing in. This does not require a reload.
> Permissions and Commands
Permissions:
- - perworldinventory.admin: Defaults to Ops, grants all other permissions
- - perworldinventory.convert: Allows user to convert data from other plugins
- - perworldinventory.reload: Allows user to reload configs and world groups
- - perworldinventory.setdefaults: Allows user to set the default inventory loadout for a group
- - perworldinventory.notify: Users with this permission will be notified if the config is out of date
- - perworldinventory.bypass.*: Users that have this will keep their inventory when changing worlds or gamemode
- - perworldinventory.bypass.gamemode: Users that have this will keep their inventory when changing gamemode
- - perworldinventory.bypass.world: Users that have this will keep their inventory when changing worlds
Commands:
- /pwi help: Shows the help page
- /pwi convert: Converts data from MultiVerse-Inventories; see below
- /pwi reload: Reloads the config file and worlds file
- /pwi setWorldDefault [default | <group_name>]: Sets the default inventory loadout for the specified group, or server default. If no parameter is given, it will sets the loadout for the group you are currently standing in.
> Conversion
If you are converting from MV-I, simply run the "/pwi convert multiverse" command and the plugin will take care of everything. You must have MV-I running for this. Keep in mind, converting only works with MV-I version 2.5, it will not work on 2.4. When MV-I is updated from 2.4 to 2.5, it switches from yml to json files, but does not convert the data until it is used. Be sure to keep your MV-I data around, just in case something does go wrong.
A converter from MultiInv is still in the works. There is a beginning framework as of version 1.4.0; do not use it! It is not fully operational yet, and will result in errors.
> Miscellaneous
Support
If you have an issue, please go here. Include your configs and relevant logs!
> Other
The code repository can be found on both Github and BitBucket.
评论 0
登录后参与评分
还没有评论,来抢沙发吧