Removed this strange moveable stuff.

This commit is contained in:
Brianna O'Keefe 2024-03-31 18:22:39 -05:00
parent d8bcb4b9a7
commit 635d20f8d9
3 changed files with 4 additions and 21 deletions

View File

@ -377,15 +377,8 @@ public class KitEditorGui extends DoubleGui {
if (itemStack.getItemMeta().hasLore()) {
ItemMeta meta = itemStack.getItemMeta();
List<String> newLore = new ArrayList<>();
for (String line : meta.getLore()) {
if (line.contains("Moveable")) {
continue;
}
if (line.equals(TextUtils.formatText("&8----"))) {
break;
}
for (String line : meta.getLore())
newLore.add(line);
}
meta.setLore(newLore);
itemStack.setItemMeta(meta);
}

View File

@ -80,14 +80,10 @@ public class Kit implements Cloneable {
List<KitItem> list = new ArrayList<>();
for (ItemStack is : items) {
if (is != null && is.getType() != Material.AIR) {
if (is.getItemMeta().hasLore()) {
ItemMeta meta = is.getItemMeta();
List<String> newLore = new ArrayList<>();
for (String line : meta.getLore()) {
if (line.contains("Moveable")) {
continue;
}
if (line.equals(TextUtils.formatText("&8----"))) {
break;
}

View File

@ -195,15 +195,9 @@ public class KitItem implements Cloneable {
return null;
}
ItemStack item = this.content.getItemForDisplay().clone();
ItemMeta meta = item.getItemMeta();
List<String> lore = meta.hasLore() && meta.getLore().get(0).equals(TextUtils.formatText("&8&oMoveable"))
? new ArrayList<>() : new ArrayList<>(Collections.singletonList(TextUtils.formatText("&8&oMoveable")));
if (meta.hasLore()) {
lore.addAll(meta.getLore());
}
meta.setLore(lore);
item.setItemMeta(meta);
return compileOptions(item);
NBTItem nbtItem = new NBTItem(item);
nbtItem.setBoolean("moveable", true);
return compileOptions(nbtItem.getItem());
}
public ItemStack getItemForDisplay(Kit kit) {