From 89e977526d02445df1e680855be8df024487342b Mon Sep 17 00:00:00 2001 From: XiaoMoMi <972454774@qq.com> Date: Wed, 13 Dec 2023 05:46:41 +0800 Subject: [PATCH] update libs --- build.gradle.kts | 3 ++- plugin/build.gradle.kts | 2 +- .../customfishing/gui/page/file/FileSelector.java | 7 ++++++- plugin/src/main/resources/config.yml | 1 - plugin/src/main/resources/plugin.yml | 3 ++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index a1418d9e..7f3cd7da 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,8 +20,8 @@ allprojects { } repositories { - maven("https://maven.aliyun.com/repository/public/") mavenCentral() + maven("https://maven.aliyun.com/repository/public/") maven("https://papermc.io/repo/repository/maven-public/") maven("https://oss.sonatype.org/content/groups/public/") maven("https://repo.dmulloy2.net/repository/public/") @@ -39,6 +39,7 @@ allprojects { maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") maven("https://repo.minebench.de/") maven("https://repo.xenondevs.xyz/releases/") + maven("https://repo.oraxen.com/releases") } } diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index f29f32bd..4b258c54 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -3,7 +3,7 @@ dependencies { compileOnly("dev.folia:folia-api:1.20.1-R0.1-SNAPSHOT") // command - compileOnly("dev.jorel:commandapi-bukkit-core:9.2.0") + compileOnly("dev.jorel:commandapi-bukkit-core:9.3.0") // packet compileOnly("com.comphenix.protocol:ProtocolLib:5.1.0") diff --git a/plugin/src/main/java/net/momirealms/customfishing/gui/page/file/FileSelector.java b/plugin/src/main/java/net/momirealms/customfishing/gui/page/file/FileSelector.java index 25b56781..8e9b93a5 100644 --- a/plugin/src/main/java/net/momirealms/customfishing/gui/page/file/FileSelector.java +++ b/plugin/src/main/java/net/momirealms/customfishing/gui/page/file/FileSelector.java @@ -38,7 +38,12 @@ public class FileSelector { if (file.isFile() && file.getName().endsWith(".yml")) { items.addLast(new FileItem(file)); } else if (file.isDirectory()) { - items.addFirst(new FolderItem(file)); + String path = file.getPath(); + String[] split = path.split("\\\\"); + String type = split[3]; + switch (type) { + case "item", "rod", "bait", "util", "hook" -> items.addFirst(new FolderItem(file)); + } } } } diff --git a/plugin/src/main/resources/config.yml b/plugin/src/main/resources/config.yml index 71a0273b..98a6bd3b 100644 --- a/plugin/src/main/resources/config.yml +++ b/plugin/src/main/resources/config.yml @@ -16,7 +16,6 @@ lang: english # Mechanic settings mechanics: - # Specifies the conditions required for the plugin mechanics to work. # Here, the type is !world, which implies the plugin won't work in # the world named 'blacklist_world'. diff --git a/plugin/src/main/resources/plugin.yml b/plugin/src/main/resources/plugin.yml index c90e8cdd..3b719b5b 100644 --- a/plugin/src/main/resources/plugin.yml +++ b/plugin/src/main/resources/plugin.yml @@ -27,4 +27,5 @@ softdepend: - Zaphkiel permissions: fishingbag.user: - default: true \ No newline at end of file + default: true + fishingbag.loot \ No newline at end of file