Add SpecialMissile Info in Sidebar
Dieser Commit ist enthalten in:
Ursprung
9e15b267fa
Commit
1ece39b75f
@ -84,7 +84,7 @@ public class Missile extends SpecialItem {
|
||||
}
|
||||
|
||||
item = createItem(itemType, "§c" + name, 1, lore, special);
|
||||
specialMissiles.add(name);
|
||||
if (special) specialMissiles.add(name);
|
||||
}
|
||||
|
||||
private void lore(List<String> lore, String[] args, int index, String tag) {
|
||||
@ -178,17 +178,14 @@ public class Missile extends SpecialItem {
|
||||
return;
|
||||
}
|
||||
File[] files = missileFolder.listFiles();
|
||||
if (files == null) {
|
||||
return;
|
||||
}
|
||||
if (files.length < 4) {
|
||||
return;
|
||||
}
|
||||
if (files == null) return;
|
||||
if (files.length < 4) return;
|
||||
List<File> pool = new ArrayList<>(files.length);
|
||||
pool.addAll(Arrays.asList(files));
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
File missileFile = pool.remove(r.nextInt(pool.size()));
|
||||
Bukkit.getLogger().log(Level.SEVERE, missileFile.getAbsolutePath());
|
||||
if (!missileFile.canRead() || !missileFile.isFile()) continue;
|
||||
new Missile(missileFile, true);
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren