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() {
|
public boolean loadEcon() {
|
||||||
final EconomyCore core = new Economy_Vault();
|
final EconomyCore core = new Economy_Vault();
|
||||||
if (!core.isValid()) {
|
if (!core.isValid()) {
|
||||||
// getLogger().severe("Economy is not valid!");
|
|
||||||
getLogger().warning("无法找到经济管理类插件...");
|
getLogger().warning("无法找到经济管理类插件...");
|
||||||
getLogger().warning("卸载插件!!!");
|
getLogger().warning("卸载插件!!!");
|
||||||
this.getPluginLoader().disablePlugin(this);
|
this.getPluginLoader().disablePlugin(this);
|
||||||
// if(econ.equals("Vault"))
|
|
||||||
// getLogger().severe("(Does Vault have an Economy to hook into?!)");
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
this.economy = new Economy(core);
|
this.economy = new Economy(core);
|
||||||
@ -186,12 +183,14 @@ public class QuickShop extends JavaPlugin {
|
|||||||
/* Empty the buffer */
|
/* Empty the buffer */
|
||||||
if (database != null) {
|
if (database != null) {
|
||||||
database.close();
|
database.close();
|
||||||
|
try {
|
||||||
|
database.getConnection().close();
|
||||||
|
} catch (final SQLException e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
try {
|
if (configManager != null) {
|
||||||
this.database.getConnection().close();
|
configManager.getWarnings().clear();
|
||||||
} catch (final SQLException e) {
|
|
||||||
}
|
}
|
||||||
configManager.getWarnings().clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -163,7 +163,7 @@ public class Util {
|
|||||||
public static String getName(final ItemStack i) {
|
public static String getName(final ItemStack i) {
|
||||||
// final String vanillaName = getDataName(i.getType(), i.getDurability());
|
// final String vanillaName = getDataName(i.getType(), i.getDurability());
|
||||||
final String vanillaName = LocalUtil.getItemName(i);
|
final String vanillaName = LocalUtil.getItemName(i);
|
||||||
return prettifyText(vanillaName);
|
return vanillaName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let's make very long names shorter for our sign
|
// 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) {
|
public static String serialize(final ItemStack iStack) {
|
||||||
final YamlConfiguration cfg = new YamlConfiguration();
|
final YamlConfiguration cfg = new YamlConfiguration();
|
||||||
cfg.set("item", iStack);
|
cfg.set("item", iStack);
|
||||||
|
Loading…
Reference in New Issue
Block a user