mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-22 01:58:54 +00:00
调整汉化文件部分...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
70cba23dc8
commit
a98acb58de
@ -142,12 +142,9 @@ public class QuickShop extends JavaPlugin {
|
||||
public boolean loadEcon() {
|
||||
final EconomyCore core = new Economy_Vault();
|
||||
if (!core.isValid()) {
|
||||
// getLogger().severe("Economy is not valid!");
|
||||
getLogger().warning("无法找到经济管理类插件...");
|
||||
getLogger().warning("卸载插件!!!");
|
||||
this.getPluginLoader().disablePlugin(this);
|
||||
// if(econ.equals("Vault"))
|
||||
// getLogger().severe("(Does Vault have an Economy to hook into?!)");
|
||||
return false;
|
||||
} else {
|
||||
this.economy = new Economy(core);
|
||||
@ -186,13 +183,15 @@ public class QuickShop extends JavaPlugin {
|
||||
/* Empty the buffer */
|
||||
if (database != null) {
|
||||
database.close();
|
||||
}
|
||||
try {
|
||||
this.database.getConnection().close();
|
||||
database.getConnection().close();
|
||||
} catch (final SQLException e) {
|
||||
}
|
||||
}
|
||||
if (configManager != null) {
|
||||
configManager.getWarnings().clear();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
@ -163,7 +163,7 @@ public class Util {
|
||||
public static String getName(final ItemStack i) {
|
||||
// final String vanillaName = getDataName(i.getType(), i.getDurability());
|
||||
final String vanillaName = LocalUtil.getItemName(i);
|
||||
return prettifyText(vanillaName);
|
||||
return vanillaName;
|
||||
}
|
||||
|
||||
// Let's make very long names shorter for our sign
|
||||
@ -532,28 +532,6 @@ public class Util {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a name like IRON_INGOT into Iron Ingot to improve readability
|
||||
*
|
||||
* @param ugly
|
||||
* The string such as IRON_INGOT
|
||||
* @return A nicer version, such as Iron Ingot
|
||||
*
|
||||
*/
|
||||
public static String prettifyText(final String ugly) {
|
||||
final String[] nameParts = ugly.split("_");
|
||||
if (nameParts.length == 1) {
|
||||
return firstUppercase(ugly);
|
||||
}
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
for (final String part : nameParts) {
|
||||
sb.append(firstUppercase(part) + " ");
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static String serialize(final ItemStack iStack) {
|
||||
final YamlConfiguration cfg = new YamlConfiguration();
|
||||
cfg.set("item", iStack);
|
||||
|
Loading…
Reference in New Issue
Block a user