mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Some location not use translation
Former-commit-id: 175249837c4fa8141f9638846dd6ad4fdfe263c0 [formerly 2c4a4bbed358784b4a569a4a2287fa21c38c48d1] Former-commit-id: fd4552ed63cc048dbd39b92949f303e76b0859f7
This commit is contained in:
1 parent
7cf82b41b4
commit
6a738db347
2 files changed
+13
-9
No files matched your search
@@ -430,7 +430,7 @@ public class QS implements CommandExecutor{
|
||||
shop.setSignText();
|
||||
shop.update();
|
||||
MsgUtil.sendControlPanelInfo(sender, shop);
|
||||
sender.sendMessage(MsgUtil.getMessage("command.now-buying", shop.getDataName()));
|
||||
sender.sendMessage(MsgUtil.getMessage("command.now-buying", MsgUtil.getItemi18n(shop.getItem().getType().name())));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -447,7 +447,7 @@ public class QS implements CommandExecutor{
|
||||
shop.setShopType(ShopType.BUYING);
|
||||
shop.setSignText();
|
||||
shop.update();
|
||||
sender.sendMessage(MsgUtil.getMessage("command.now-buying", shop.getDataName()));
|
||||
sender.sendMessage(MsgUtil.getMessage("command.now-buying", MsgUtil.getItemi18n(shop.getItem().getType().name())));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -466,7 +466,7 @@ public class QS implements CommandExecutor{
|
||||
shop.setSignText();
|
||||
shop.update();
|
||||
MsgUtil.sendControlPanelInfo(sender, shop);
|
||||
sender.sendMessage(MsgUtil.getMessage("command.now-selling", shop.getDataName()));
|
||||
sender.sendMessage(MsgUtil.getMessage("command.now-selling", MsgUtil.getItemi18n(shop.getItem().getType().name())));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -484,7 +484,7 @@ public class QS implements CommandExecutor{
|
||||
shop.setShopType(ShopType.SELLING);
|
||||
shop.setSignText();
|
||||
shop.update();
|
||||
sender.sendMessage(MsgUtil.getMessage("command.now-selling", shop.getDataName()));
|
||||
sender.sendMessage(MsgUtil.getMessage("command.now-selling", MsgUtil.getItemi18n(shop.getItem().getType().name())));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,17 +425,21 @@ public class MsgUtil {
|
||||
* @return String Item's i18n name.
|
||||
*/
|
||||
public static String getItemi18n(String ItemBukkitName) {
|
||||
if(ItemBukkitName==null) {
|
||||
return "";
|
||||
}
|
||||
if(ItemBukkitName.isEmpty()){
|
||||
return "";
|
||||
}
|
||||
ItemBukkitName = ItemBukkitName.trim().replaceAll(" ", "_").toUpperCase(Locale.ROOT);
|
||||
|
||||
String Itemname_i18n = null;
|
||||
try {
|
||||
Itemname_i18n = itemi18n.getString("itemi18n."+ItemBukkitName).trim();
|
||||
}catch (Exception e) {
|
||||
//e.printStackTrace();
|
||||
Itemname_i18n = null;
|
||||
}
|
||||
if(ItemBukkitName==null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if(Itemname_i18n==null) {
|
||||
String material = null;
|
||||
try {
|
||||
@@ -443,7 +447,7 @@ public class MsgUtil {
|
||||
}catch (Exception e) {
|
||||
material = "ERROR";
|
||||
}
|
||||
return material;
|
||||
return Util.prettifyText(material);
|
||||
}else {
|
||||
return Itemname_i18n;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user