mirror of
https://github.com/CarmJos/UserPrefix.git
synced 2024-09-19 12:05:47 +00:00
chore(item): 更换物品的配置逻辑,支持跨版本的物品读取、保存。
BREAKING-CHANGE: 旧的配置文件需要进行变更。
This commit is contained in:
parent
12489fe1a8
commit
53281b80e3
@ -26,7 +26,7 @@ public class ConfigManager {
|
||||
File configFile = new File(dataFolder, "config.yml");
|
||||
if (!configFile.exists()) {
|
||||
try {
|
||||
JarResourceUtils.copyFolderFromJar("en_US", dataFolder, JarResourceUtils.CopyOption.COPY_IF_NOT_EXIST);
|
||||
JarResourceUtils.copyFolderFromJar("i18n", dataFolder, JarResourceUtils.CopyOption.COPY_IF_NOT_EXIST);
|
||||
JarResourceUtils.copyFolderFromJar("prefixes", dataFolder, JarResourceUtils.CopyOption.COPY_IF_NOT_EXIST);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -27,6 +27,8 @@ permission: "yc.vip"
|
||||
actions:
|
||||
- "[CONSOLE] say %player_name% selected PRO !"
|
||||
|
||||
# Display item configuration
|
||||
# More details please see https://github.com/CryptoMorin/XSeries/wiki/XItemStack
|
||||
item:
|
||||
# itemHasPermission [Necessary]
|
||||
# This Item will be displayed when player has permission
|
@ -30,6 +30,7 @@ actions:
|
||||
- "[CONSOLE] say %player_name% 选择了 Pro会员前缀 !"
|
||||
|
||||
# 该前缀的GUI物品配置
|
||||
# 物品配置方式详见 https://github.com/CryptoMorin/XSeries/wiki/XItemStack
|
||||
item:
|
||||
|
||||
# 有权限时显示的物品 [必须]
|
||||
|
Loading…
Reference in New Issue
Block a user