mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-08 03:29:46 +01:00
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()) {
|
||||
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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user