mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 04:03:22 +08:00
folder check
This commit is contained in:
parent
1be01b5263
commit
f6df468e47
@ -129,6 +129,12 @@ public class ResourceLoader {
|
|||||||
private static void loadScenePoints() {
|
private static void loadScenePoints() {
|
||||||
Pattern pattern = Pattern.compile("(?<=scene)(.*?)(?=_point.json)");
|
Pattern pattern = Pattern.compile("(?<=scene)(.*?)(?=_point.json)");
|
||||||
File folder = new File(Grasscutter.getConfig().RESOURCE_FOLDER + "BinOutPut/Scene/Point");
|
File folder = new File(Grasscutter.getConfig().RESOURCE_FOLDER + "BinOutPut/Scene/Point");
|
||||||
|
|
||||||
|
if (!folder.isDirectory() || !folder.exists() || folder.listFiles() == null) {
|
||||||
|
Grasscutter.getLogger().error("Scene point files cannot be found, you cannot use teleport waypoints!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
List<ScenePointEntry> scenePointList = new ArrayList<>();
|
List<ScenePointEntry> scenePointList = new ArrayList<>();
|
||||||
for (File file : folder.listFiles()) {
|
for (File file : folder.listFiles()) {
|
||||||
ScenePointConfig config = null;
|
ScenePointConfig config = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user