Skip to content

Commit 97fd6e3

Browse files
committed
schematicフォルダのパスを変更できるようにした
1 parent a7bfd72 commit 97fd6e3

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>net.kunmc.lab</groupId>
88
<artifactId>SchemUploader</artifactId>
9-
<version>1.3-SNAPSHOT</version>
9+
<version>1.4-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

1212
<name>SchemUploader</name>

src/main/java/net/kunmc/lab/schemuploader/PluginConfig.java

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public class PluginConfig {
4141
*/
4242
public static String downloadUrlErrorMessage;
4343

44+
/**
45+
* schematicsフォルダのパス
46+
*/
47+
public static String fileFolderPath;
48+
4449
/**
4550
* プラグインの設定を読み込む
4651
*
@@ -56,6 +61,7 @@ public static void loadConfig(Configuration config) {
5661
downloadUrlRestrictionEnabled = config.getBoolean("download.url-restriction.enabled", true);
5762
downloadUrlPrefix = config.getString("download.url-restriction.prefix");
5863
downloadUrlErrorMessage = config.getString("download.url-restriction.error-message", "エラー: URL制限");
64+
fileFolderPath = config.getString("file.folder-path", "plugins/WorldEdit/schematics");
5965
}
6066

6167
/**

src/main/java/net/kunmc/lab/schemuploader/SchemUploader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void onEnable() {
3939
}
4040

4141
// schematicフォルダ
42-
schematicFolder = new File(SCHEMATIC_FOLDER);
42+
schematicFolder = new File(PluginConfig.fileFolderPath);
4343

4444
// コマンドを登録する
4545
CommandListener.register();

src/main/resources/config.yml

+3
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ download:
1919
prefix: https://cdn.discordapp.com/attachments/xxxxxxxxxxxxxxxxxx/
2020
# ダウンロード用のURL制限に引っかかった場合に表示されるエラーメッセージ
2121
error-message: Discord内の「#schem置き場」チャンネルにあるschematicファイルのみダウンロードできます。誤ったリンクをコピーしている可能性があります。URLを見直してください。
22+
file:
23+
# schematicsフォルダのパス
24+
folder-path: plugins/WorldEdit/schematics

0 commit comments

Comments
 (0)