1
mirror of https://github.com/CarmJos/UltraDepository.git synced 2024-09-19 19:55:45 +00:00

[v1.2.4] 添加韩语

This commit is contained in:
Carm Jos 2022-01-14 13:26:52 +08:00
parent 7153661f86
commit 23161a48bd
8 changed files with 236 additions and 43 deletions

View File

@ -6,7 +6,7 @@
## 使用须知
预设配置基于 MineCraft 1.16 实现,更低版本可能无法使用。
预设配置基于 MineCraft 1.16 实现,理论上支持更高版本使用。
## 如何使用?

View File

@ -15,12 +15,12 @@
[![License](https://img.shields.io/github/license/CarmJos/UltraDepository)](https://opensource.org/licenses/GPL-3.0)
[![workflow](https://github.com/CarmJos/UltraDepository/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/CarmJos/UltraDepository/actions/workflows/maven.yml)
![CodeSize](https://img.shields.io/github/languages/code-size/CarmJos/UltraDepository)
![Support](https://img.shields.io/badge/Minecraft-Java%201.13--Latest-green)
![Support](https://img.shields.io/badge/Minecraft-Java%201.16--Latest-green)
![](https://visitor-badge.glitch.me/badge?page_id=UltraDepository.readme)
超级仓库插件,支持设定不同物品的存储仓库。
本插件基于Spigot实现**理论上支持全版本**。
本插件基于 Spigot(1.16.3) 实现,**理论上支持1.16后的版本**。
本插件由 [墨豆Mordo](https://www.mordo.cn)、[子墨Zimrs](https://www.zimrs.cn) 资助本人开发,经过授权后开源。

View File

@ -119,7 +119,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<version>1.16.3-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

View File

@ -7,52 +7,63 @@ import cc.carm.lib.easyplugin.configuration.language.MessagesInitializer;
import cc.carm.plugin.ultradepository.UltraDepository;
import cc.carm.plugin.ultradepository.configuration.PluginMessages;
import java.io.File;
public class ConfigManager {
private static FileConfig pluginConfiguration;
private static MessagesConfig messageConfiguration;
private static FileConfig pluginConfiguration;
private static MessagesConfig messageConfiguration;
public static boolean initialize() {
try {
pluginConfiguration = new FileConfig(UltraDepository.getInstance(), "config.yml");
messageConfiguration = new MessagesConfig(UltraDepository.getInstance(), "messages.yml");
public static boolean initialize() {
UltraDepository udPlugin = UltraDepository.getInstance();
File configFile = new File(udPlugin.getDataFolder(), "config.yml");
if (!configFile.exists()) {
//没找到配置文件可能是第一次加载此插件
//把一些英文版的东西复制出来方便英文用户使用
udPlugin.saveResource("i18n/en_US/config.yml", false);
udPlugin.saveResource("i18n/ko_KR/config.yml", false);
}
FileConfig.pluginConfiguration = () -> pluginConfiguration;
FileConfig.messageConfiguration = () -> messageConfiguration;
try {
pluginConfiguration = new FileConfig(udPlugin, "config.yml");
messageConfiguration = new MessagesConfig(udPlugin, "messages.yml");
MessagesInitializer.initialize(messageConfiguration, PluginMessages.class);
FileConfig.pluginConfiguration = () -> pluginConfiguration;
FileConfig.messageConfiguration = () -> messageConfiguration;
return true;
} catch (Exception ex) {
ex.printStackTrace();
return false;
}
}
MessagesInitializer.initialize(messageConfiguration, PluginMessages.class);
public static FileConfig getPluginConfig() {
return pluginConfiguration;
}
return true;
} catch (Exception ex) {
ex.printStackTrace();
return false;
}
}
public static MessagesConfig getMessageConfig() {
return messageConfiguration;
}
public static FileConfig getPluginConfig() {
return pluginConfiguration;
}
public static void reload() {
try {
getPluginConfig().reload();
getMessageConfig().reload();
} catch (Exception ex) {
ex.printStackTrace();
}
}
public static MessagesConfig getMessageConfig() {
return messageConfiguration;
}
public static void saveConfig() {
try {
getPluginConfig().save();
getMessageConfig().save();
} catch (Exception ex) {
ex.printStackTrace();
}
}
public static void reload() {
try {
getPluginConfig().reload();
getMessageConfig().reload();
} catch (Exception ex) {
ex.printStackTrace();
}
}
public static void saveConfig() {
try {
getPluginConfig().save();
getMessageConfig().save();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}

View File

@ -7,7 +7,7 @@ version: ${project.version}
debug: false
# 统计数据设定
# 选项用于帮助开发者统计插件版本与使用情况,且绝不会影响性能与使用体验。
# 选项用于帮助开发者统计插件版本与使用情况,且绝不会影响性能与使用体验。
# 当然您也可以选择在这里关闭或在plugins/bStats下的配置文件中关闭。
metrics: true

View File

@ -0,0 +1,91 @@
# ${project.name} - ${project.description}
# Source url: ${project.url}
# Download URL: ${project.distributionManagement.downloadUrl}
version: ${project.version}
debug: false
# bStats Metrics
# This option is used to help developers analysis plugin stats,
# and will never affect performance and user experience.
# You can choose to turn it off here.
metrics: true
# Storage Configuration
storage:
# Storage method
# You can choose [ yaml | json | mysql ]
method: yaml
# The storage file path when choosing "yaml"/"json" method.
# Support absolute paths, e.g. “/var/data/ub/"(linux) or "D:\data\ub\"(windows)
# **Be aware of permission issues when using absolute paths!**
file-path: data
# The Database configuration when choosing "mysql" method.
mysql:
driver: "com.mysql.jdbc.Driver"
url: "jdbc:mysql://127.0.0.1:3306/<db-name>"
table: "ud_data" # Plugin data table name, allowing customization
username: "username"
password: "password"
# Player Collect Configuration
# Used to determine when put the player's item into the backpack automatically
collect:
pickup: true # Pickup Items
kill: true # Kill Entities (Animals/Monsters)
break: true # Break Blocks
sounds:
collect: "ENTITY_EXPERIENCE_ORB_PICKUP:0.5"
sell-success: "ENTITY_VILLAGER_CELEBRATE"
sell-fail: "ENTITY_VILLAGER_NO"
gui-click: "UI_BUTTON_CLICK"
# General Configuration
general:
# Hints lore for the item's information
# Will add to items in BackpackGUI and SellGUI.
additional-lore:
- " "
- "&fAmount &a%(amount)"
- "&fPrice &a%(price)"
- "&fSold &a%(remain)&8/%(limit)"
# Hints lore for the player's click
# Will add to items in BackpackGUI.
click-lore:
- " "
- "&a&lLEFT-CLICK &8| &fSell items"
- "&a&lRIGHT-CLICK &8| &fTake one Stack"
# Configuration of the SellGUI
sell-gui:
title: "&8Selling %(item_name)"
items:
add:
type: GREEN_STAINED_GLASS_PANE
name: "&aAdd %(amount)"
remove:
type: RED_STAINED_GLASS_PANE
name: "&cReduce %(amount)"
confirm:
type: EMERALD
name: "&a&lConfirm"
lore:
- " "
- "&7You will sell &r%(item_name) &8x &f%(amount)"
- "&7and will get $&e%(money) &7."
- " "
- "&a&lClick to confirm"
cancel:
type: REDSTONE
name: "&c&lCancel"
lore:
- " "
- "&cClick to cancel"

View File

@ -0,0 +1,91 @@
# ${project.name} - ${project.description}
# Source url: ${project.url}
# Download URL: ${project.distributionManagement.downloadUrl}
version: ${project.version}
debug: false
# bStats Metrics
# This option is used to help developers analysis plugin stats,
# and will never affect performance and user experience.
# You can choose to turn it off here.
metrics: true
# Storage Configuration
storage:
# Storage method
# You can choose [ yaml | json | mysql ]
method: yaml
# The storage file path when choosing "yaml"/"json" method.
# Support absolute paths, e.g. “/var/data/ub/"(linux) or "D:\data\ub\"(windows)
# **Be aware of permission issues when using absolute paths!**
file-path: data
# The Database configuration when choosing "mysql" method.
mysql:
driver: "com.mysql.jdbc.Driver"
url: "jdbc:mysql://127.0.0.1:3306/<db-name>"
table: "ud_data" # Plugin data table name, allowing customization
username: "username"
password: "password"
# Player Collect Configuration
# Used to determine when put the player's item into the backpack automatically
collect:
pickup: true # Pickup Items
kill: true # Kill Entities (Animals/Monsters)
break: true # Break Blocks
sounds:
collect: "ENTITY_EXPERIENCE_ORB_PICKUP:0.5"
sell-success: "ENTITY_VILLAGER_CELEBRATE"
sell-fail: "ENTITY_VILLAGER_NO"
gui-click: "UI_BUTTON_CLICK"
# General Configuration
general:
# Hints lore for the item's information
# Will add to items in BackpackGUI and SellGUI.
additional-lore:
- " "
- "&fAmount &a%(amount)"
- "&fPrice &a%(price)"
- "&fSold &a%(remain)&8/%(limit)"
# Hints lore for the player's click
# Will add to items in BackpackGUI.
click-lore:
- " "
- "&a&lLEFT-CLICK &8| &fSell items"
- "&a&lRIGHT-CLICK &8| &fTake one Stack"
# Configuration of the SellGUI
sell-gui:
title: "&8Selling %(item_name)"
items:
add:
type: GREEN_STAINED_GLASS_PANE
name: "&aAdd %(amount)"
remove:
type: RED_STAINED_GLASS_PANE
name: "&cReduce %(amount)"
confirm:
type: EMERALD
name: "&a&lConfirm"
lore:
- " "
- "&7You will sell &r%(item_name) &8x &f%(amount)"
- "&7and will get $&e%(money) &7."
- " "
- "&a&lClick to confirm"
cancel:
type: REDSTONE
name: "&c&lCancel"
lore:
- " "
- "&cClick to cancel"

View File

@ -9,7 +9,7 @@ authors:
- CarmJos
- Zimrs
api-version: 1.13
api-version: 1.16
softdepend:
- PlaceholderAPI