Add Missile Lore #18
@ -149,18 +149,6 @@ public class Missile extends SpecialItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
File missileFolder = new File(MissileWars.getPlugin().getDataFolder(), "default-missiles");
|
|
||||||
if (!missileFolder.exists() || !missileFolder.canRead() || !missileFolder.isDirectory()) {
|
|
||||||
throw new SecurityException("Missiles could not be loaded");
|
|
||||||
}
|
|
||||||
for (File missileFile : Objects.requireNonNull(missileFolder.listFiles())) {
|
|
||||||
if (!missileFile.canRead() || !missileFile.isFile()) continue;
|
|
||||||
new Missile(missileFile);
|
|
||||||
}
|
|
||||||
otherInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void otherInit() {
|
|
||||||
File missileFolder = new File(MissileWars.getPlugin().getDataFolder(), "missiles");
|
File missileFolder = new File(MissileWars.getPlugin().getDataFolder(), "missiles");
|
||||||
if (!missileFolder.exists() || !missileFolder.canRead() || !missileFolder.isDirectory()) {
|
if (!missileFolder.exists() || !missileFolder.canRead() || !missileFolder.isDirectory()) {
|
||||||
throw new SecurityException("Missiles could not be loaded");
|
throw new SecurityException("Missiles could not be loaded");
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren