1
1
mirror of https://github.com/geekfrog/PermissionsTime.git synced 2024-11-25 09:58:50 +00:00
This commit is contained in:
GeekFrog 2017-07-16 17:20:03 +08:00
parent b6c73470a4
commit ec32e609ec
2 changed files with 5 additions and 7 deletions

View File

@ -90,13 +90,12 @@ public class PackagesCfg extends PluginConfig {
ItemStack items = new ItemStack(type, 1, (short) 0, (byte) exid); ItemStack items = new ItemStack(type, 1, (short) 0, (byte) exid);
ItemMeta meta = items.getItemMeta(); ItemMeta meta = items.getItemMeta();
meta.setDisplayName(StrUtil.messageFormat(ppb.getDisplayName() + "&r(" + name + ")")); meta.setDisplayName(StrUtil.messageFormat(ppb.getDisplayName() + "&r(" + name + ")"));
if (ppb.getLores().size() > 0) {
List<String> lores = new ArrayList<String>(); List<String> lores = new ArrayList<String>();
for (String lore : ppb.getLores()) { for (String lore : ppb.getLores()) {
lores.add(StrUtil.messageFormat(lore)); lores.add(StrUtil.messageFormat(lore));
} }
lores.add("");
meta.setLore(lores); meta.setLore(lores);
}
items.setItemMeta(meta); items.setItemMeta(meta);
return items; return items;
} }

View File

@ -22,7 +22,6 @@ public class PlayerPermissionShow {
if (item != null) { if (item != null) {
ItemMeta meta = item.getItemMeta(); ItemMeta meta = item.getItemMeta();
List<String> lores = meta.getLore(); List<String> lores = meta.getLore();
lores.add("");
lores.add(StrUtil.messageFormat(LangCfg.EXPIRATION_DATE, StrUtil.timestampToString(pdb.getExpire()))); lores.add(StrUtil.messageFormat(LangCfg.EXPIRATION_DATE, StrUtil.timestampToString(pdb.getExpire())));
meta.setLore(lores); meta.setLore(lores);
item.setItemMeta(meta); item.setItemMeta(meta);