本插件存储数据的方式与 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 起已有初步框架;请勿使用!它尚未完全正常运行,会导致错误。
> 杂项
支持 如果你遇到问题,请点击这里提交。请附上你的配置文件和相关日志!
> 其他
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.
下载 Per World Inventory
下载 Per World Inventory
下载 Per World Inventory
下载 Per World Inventory
下载 Per World Inventory
下载 Per World Inventory
下载 Per World Inventory
下载 Per World Inventory
下载 Per World Inventory
下载 Per World Inventory
1.7.5 更新:
* 修复在 1.10 版本启动时检查服务器版本的问题
1.7.4 更新:
* 内容过多,无法在此一一列举,详情请参见其他站点
1.5.8 热修复:
* 在获取玩家数据时增加目录存在性检查;修复新玩家首次加入时出现的错误
1.5.7 更新:
+ 加入时加载数据
* 组名称不再区分大小写
* 修复了检查错误权限节点的问题
1.5.6 更新:
+ 加载玩家数据时增加配置检查
* 修复了在特定配置组合下导致的 StackOverflowError(栈溢出错误)
1.5.5 更新:
+ 添加了 Metrics(指标统计)。可在配置文件中禁用。
* 从 __default.json 中移除了经济数值,以防止人们在切换世界时意外清空余额
1.5.4 热修复:
* 修复了 worlds.yml 被清空或未生成的问题
1.5.3 热修复:
* 修复了检查头颅拥有者为 null(空值)时的逻辑问题
1.5.2 更新:
* 针对拥有者为 null 的头颅导致错误的可能的变通方案
* 重新构建了配置后端(1)
* 当玩家切换到 worlds.yml(2) 中未列出的世界时,不再报错
(1) 无需对现有配置进行任何更改,这些更改仅影响后台操作。用户应不会察觉明显差异。
(2) 插件不再因找不到该世界或其他原因抛出错误,而是会为该世界创建一个虚拟组。这意味着与该世界的物品栏数据仍会被保存!太棒了!
1.5.1 热修复:
* 修复了当 'manage-gamemodes' 设置为 'true' 时游戏模式未被更改的问题
1.5.0 更新:
+ 采用新的序列化技术,现在应能保存物品的所有数据
+ 经济余额现已被保存
* 修复了 'setworlddefault' 命令的几个 Bug
保存和读取物品栏数据的方式现在截然不同,但别担心!旧的保存方式仍然保留,以便读取旧版遗留数据。这意味着你无需担心转换数据!
1.4.0 更新:
+ 为每种游戏模式分别保存物品栏
+ 玩家登出时保存其物品栏
+ 在启动时添加一些信息提示消息
* 修复了来自 MultiVerse-Inventories 的导入 Bug;保存的数据格式不正确
1.3.1 热修复:
* 修复了命令帮助显示中的拼写错误
* 修复了制作旗帜时报错的问题
1.3.0 更新:
+ 每个世界组默认的物品栏配置
+ 改进了旗帜的处理方式,正确保留了图案和颜色
* 修复了删除 'data' 目录后启动时报错的问题
1.2.1 更新:
* 修复了应用错误游戏模式的 Bug
1.2.1 更新:
* 修复了保存游戏模式选项不存在的问题
* 修复了重载时配置文件更改丢失的问题
1.2.0 更新:
* 重写了 ConfigManager。对用户无可见变化。
* 文件 'default.json' 每次启动时将不再被覆盖
1.5.5 更新:
文件名末尾现在包含版本号,请务必删除之前的 jar 文件!
1.4.0 更新:
升级到此版本时,你的 worlds.yml 文件将自动更新为新格式。
如果插件正在运行,且你在 config.yml 中将 'separate-gamemode-inventories' 设置为 true,则必须重启服务器。这是因为我只在该选项设置为 true 时才注册相应的监听器,而我尚未找到检测监听器是否已注册的好方法。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
ExyliaPlugins 的库。
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
使床在所有维度中爆炸的模组
插件
为 Armor Poser 模组添加兼容性
插件
SkyBlock、OneBlock、Boxed、SkyGrid、AcidIsland、CaveBlock、Poseidon、StrangerRealms——以及更多!这些只是由 BentoBox 支持的基于岛屿的游戏模式之一。来自原版 ASkyBlock 的作者。
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
评论 0
登录后参与评分
还没有评论,来抢沙发吧