mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-22 02:35:21 +01:00
Explicitly save panels from Jar.
This commit is contained in:
parent
626b215322
commit
f19ca99362
@ -1,5 +1,7 @@
|
||||
package world.bentobox.bentobox;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@ -465,6 +467,33 @@ public class BentoBox extends JavaPlugin implements Listener {
|
||||
return false;
|
||||
}
|
||||
|
||||
log("Saving default panels...");
|
||||
|
||||
if (!Files.exists(Path.of(this.getDataFolder().getPath(), "panels", "island_creation_panel.yml"))) {
|
||||
log("Saving default island_creation_panel...");
|
||||
this.saveResource("panels/island_creation_panel.yml", false);
|
||||
}
|
||||
|
||||
if (!Files.exists(Path.of(this.getDataFolder().getPath(), "panels", "language_panel.yml"))) {
|
||||
log("Saving default language_panel...");
|
||||
this.saveResource("panels/language_panel.yml", false);
|
||||
}
|
||||
|
||||
if (!Files.exists(Path.of(this.getDataFolder().getPath(), "panels", "island_homes_panel.yml"))) {
|
||||
log("Saving default island_homes_panel...");
|
||||
this.saveResource("panels/island_homes_panel.yml", false);
|
||||
}
|
||||
|
||||
if (!Files.exists(Path.of(this.getDataFolder().getPath(), "panels", "team_invite_panel.yml"))) {
|
||||
log("Saving default team_invite_panel...");
|
||||
this.saveResource("panels/team_invite_panel.yml", false);
|
||||
}
|
||||
|
||||
if (!Files.exists(Path.of(this.getDataFolder().getPath(), "panels", "team_panel.yml"))) {
|
||||
log("Saving default team_panel...");
|
||||
this.saveResource("panels/team_panel.yml", false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user