Removed this strange moveable stuff.
This commit is contained in:
parent
d8bcb4b9a7
commit
635d20f8d9
|
@ -377,15 +377,8 @@ public class KitEditorGui extends DoubleGui {
|
||||||
if (itemStack.getItemMeta().hasLore()) {
|
if (itemStack.getItemMeta().hasLore()) {
|
||||||
ItemMeta meta = itemStack.getItemMeta();
|
ItemMeta meta = itemStack.getItemMeta();
|
||||||
List<String> newLore = new ArrayList<>();
|
List<String> newLore = new ArrayList<>();
|
||||||
for (String line : meta.getLore()) {
|
for (String line : meta.getLore())
|
||||||
if (line.contains("Moveable")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (line.equals(TextUtils.formatText("&8----"))) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
newLore.add(line);
|
newLore.add(line);
|
||||||
}
|
|
||||||
meta.setLore(newLore);
|
meta.setLore(newLore);
|
||||||
itemStack.setItemMeta(meta);
|
itemStack.setItemMeta(meta);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,14 +80,10 @@ public class Kit implements Cloneable {
|
||||||
List<KitItem> list = new ArrayList<>();
|
List<KitItem> list = new ArrayList<>();
|
||||||
for (ItemStack is : items) {
|
for (ItemStack is : items) {
|
||||||
if (is != null && is.getType() != Material.AIR) {
|
if (is != null && is.getType() != Material.AIR) {
|
||||||
|
|
||||||
if (is.getItemMeta().hasLore()) {
|
if (is.getItemMeta().hasLore()) {
|
||||||
ItemMeta meta = is.getItemMeta();
|
ItemMeta meta = is.getItemMeta();
|
||||||
List<String> newLore = new ArrayList<>();
|
List<String> newLore = new ArrayList<>();
|
||||||
for (String line : meta.getLore()) {
|
for (String line : meta.getLore()) {
|
||||||
if (line.contains("Moveable")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (line.equals(TextUtils.formatText("&8----"))) {
|
if (line.equals(TextUtils.formatText("&8----"))) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,15 +195,9 @@ public class KitItem implements Cloneable {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ItemStack item = this.content.getItemForDisplay().clone();
|
ItemStack item = this.content.getItemForDisplay().clone();
|
||||||
ItemMeta meta = item.getItemMeta();
|
NBTItem nbtItem = new NBTItem(item);
|
||||||
List<String> lore = meta.hasLore() && meta.getLore().get(0).equals(TextUtils.formatText("&8&oMoveable"))
|
nbtItem.setBoolean("moveable", true);
|
||||||
? new ArrayList<>() : new ArrayList<>(Collections.singletonList(TextUtils.formatText("&8&oMoveable")));
|
return compileOptions(nbtItem.getItem());
|
||||||
if (meta.hasLore()) {
|
|
||||||
lore.addAll(meta.getLore());
|
|
||||||
}
|
|
||||||
meta.setLore(lore);
|
|
||||||
item.setItemMeta(meta);
|
|
||||||
return compileOptions(item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getItemForDisplay(Kit kit) {
|
public ItemStack getItemForDisplay(Kit kit) {
|
||||||
|
|
Loading…
Reference in New Issue