SteamWar/MissileWars
Archiviert
13
0

Add TNT count after Missile Name

Dieser Commit ist enthalten in:
jojo 2020-09-19 11:23:09 +02:00
Ursprung 290180309c
Commit 3ca0ee519a

Datei anzeigen

@ -56,6 +56,7 @@ public class Missile extends SpecialItem {
private final Clipboard clipboard; private final Clipboard clipboard;
private final ItemStack item; private final ItemStack item;
private final int tntCount;
private Missile(File missileFile, boolean special) { private Missile(File missileFile, boolean special) {
String[] strings = missileFile.getName().split("\\."); String[] strings = missileFile.getName().split("\\.");
@ -75,13 +76,16 @@ public class Missile extends SpecialItem {
List<String> lore = new ArrayList<>(); List<String> lore = new ArrayList<>();
lore(lore, strings, 2, " §7Speed"); lore(lore, strings, 2, " §7Speed");
lore(lore, strings, 3, " §7Size"); lore(lore, strings, 3, " §7Size");
int count;
try { try {
lore.add("§7TNT §8: §e" + count()); count = count();
} catch (Exception e) { } catch (Exception e) {
lore.add("§7TNT §8: §e?"); count = 0;
} }
tntCount = count;
lore.add("§7TNT §8: §e" + tntCount);
item = createItem(itemType, "§c" + name, 1, lore, special); item = createItem(itemType, "§c" + name + " §7(§c" + tntCount + "§7)", 1, lore, special);
if (special) specialMissiles.add(name); if (special) specialMissiles.add(name);
} }