1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-08 01:08:23 +01:00

Update CMIItemStack.java

This commit is contained in:
montlikadani 2018-08-16 18:48:26 +02:00 committed by GitHub
parent 55cc050e5e
commit 6dda14f41f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,7 @@ public class CMIItemStack {
ItemMeta meta = this.getItemStack().getItemMeta(); ItemMeta meta = this.getItemStack().getItemMeta();
List<String> lore = meta.getLore(); List<String> lore = meta.getLore();
if (lore == null) if (lore == null)
lore = new ArrayList<String>(); lore = new ArrayList<>();
lore.add(ChatColor.translateAlternateColorCodes('&', string)); lore.add(ChatColor.translateAlternateColorCodes('&', string));
meta.setLore(lore); meta.setLore(lore);
this.getItemStack().setItemMeta(meta); this.getItemStack().setItemMeta(meta);
@ -116,7 +116,7 @@ public class CMIItemStack {
public CMIItemStack clearLore() { public CMIItemStack clearLore() {
ItemMeta meta = this.getItemStack().getItemMeta(); ItemMeta meta = this.getItemStack().getItemMeta();
List<String> t = new ArrayList<String>(); List<String> t = new ArrayList<>();
meta.setLore(t); meta.setLore(t);
this.getItemStack().setItemMeta(meta); this.getItemStack().setItemMeta(meta);
return this; return this;
@ -126,7 +126,7 @@ public class CMIItemStack {
if (lore == null || lore.isEmpty()) if (lore == null || lore.isEmpty())
return this; return this;
ItemMeta meta = this.getItemStack().getItemMeta(); ItemMeta meta = this.getItemStack().getItemMeta();
List<String> t = new ArrayList<String>(); List<String> t = new ArrayList<>();
for (String one : lore) { for (String one : lore) {
t.add(ChatColor.translateAlternateColorCodes('&', one)); t.add(ChatColor.translateAlternateColorCodes('&', one));
} }
@ -165,7 +165,7 @@ public class CMIItemStack {
if (meta != null) { if (meta != null) {
List<String> lore = meta.getLore(); List<String> lore = meta.getLore();
if (lore == null) { if (lore == null) {
lore = new ArrayList<String>(); lore = new ArrayList<>();
meta.setLore(lore); meta.setLore(lore);
} }