Add Missile Lore #18
@ -77,7 +77,7 @@ public class Missile extends SpecialItem {
|
|||||||
BlockTypeMask blockTypeMask = new BlockTypeMask(clipboard, BlockTypes.TNT);
|
BlockTypeMask blockTypeMask = new BlockTypeMask(clipboard, BlockTypes.TNT);
|
||||||
lore.add("§7TNT §8: §e" + e.countBlocks(clipboard.getRegion(), blockTypeMask));
|
lore.add("§7TNT §8: §e" + e.countBlocks(clipboard.getRegion(), blockTypeMask));
|
||||||
|
|
||||||
item = createItem(itemType, "§c" + name, 1, lore, false);
|
item = createItem(itemType, "§c" + name, 1, lore);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lore(List<String> lore, String[] args, int index, String tag) {
|
private void lore(List<String> lore, String[] args, int index, String tag) {
|
||||||
|
@ -42,10 +42,10 @@ public abstract class SpecialItem {
|
|||||||
public abstract boolean handleUse(Player p);
|
public abstract boolean handleUse(Player p);
|
||||||
|
|
||||||
public ItemStack createItem(Material material, String name, int amount) {
|
public ItemStack createItem(Material material, String name, int amount) {
|
||||||
return createItem(material, name, amount, new ArrayList<>(), false);
|
return createItem(material, name, amount, new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack createItem(Material material, String name, int amount, List<String> lore, boolean special) {
|
public ItemStack createItem(Material material, String name, int amount, List<String> lore) {
|
||||||
ItemStack item = new ItemStack(material, amount);
|
ItemStack item = new ItemStack(material, amount);
|
||||||
ItemMeta meta = item.getItemMeta();
|
ItemMeta meta = item.getItemMeta();
|
||||||
assert meta != null;
|
assert meta != null;
|
||||||
@ -53,7 +53,6 @@ public abstract class SpecialItem {
|
|||||||
meta.setLore(lore);
|
meta.setLore(lore);
|
||||||
meta.setDisplayName(name);
|
meta.setDisplayName(name);
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
if (special) item.addUnsafeEnchantment(Enchantment.PROTECTION_FALL, 1);
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren