Skip to content

Commit

Permalink
chore(item): 更换物品的配置逻辑,支持跨版本的物品读取、保存。
Browse files Browse the repository at this point in the history
BREAKING-CHANGE: 旧的配置文件需要进行变更。
  • Loading branch information
CarmJos committed Oct 12, 2023
1 parent 12489fe commit 53281b8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected void firstInitialize(File dataFolder) {
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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/main/resources/prefixes/example-prefix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ actions:
- "[CONSOLE] say %player_name% 选择了 Pro会员前缀 !"

# 该前缀的GUI物品配置
# 物品配置方式详见 https://github.com/CryptoMorin/XSeries/wiki/XItemStack
item:

# 有权限时显示的物品 [必须]
Expand Down

0 comments on commit 53281b8

Please sign in to comment.