diff --git a/pom.xml b/pom.xml
index 99cfb53..567a0e0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.kamesuta
SchemUploader
- 1.5-SNAPSHOT
+ 1.6-SNAPSHOT
jar
SchemUploader
@@ -42,26 +42,6 @@
-
-
-
- com.squareup.okhttp
- com.kamesuta.schemuploader.lib.com.squareup.okhttp
-
-
- org.apache.commons.lang3
- com.kamesuta.schemuploader.lib.org.apache.commons.lang3
-
-
- okio
- com.kamesuta.schemuploader.lib.okio
-
-
- com.kamesuta.commandlib
- com.kamesuta.schemuploader.lib.commandlib
-
-
-
@@ -90,11 +70,6 @@
1.16.5-R0.1-SNAPSHOT
provided
-
- com.squareup.okhttp
- okhttp
- 2.7.5
-
com.google.code.gson
gson
diff --git a/src/main/java/com/kamesuta/schemuploader/CommandListener.java b/src/main/java/com/kamesuta/schemuploader/CommandListener.java
index 89bf43e..bc8d7d2 100644
--- a/src/main/java/com/kamesuta/schemuploader/CommandListener.java
+++ b/src/main/java/com/kamesuta/schemuploader/CommandListener.java
@@ -64,6 +64,13 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
sender.sendMessage(plugin.messages.error("error_invalid_folder"));
return true;
}
+
+ // Check if the file exists
+ if (!schemFile.exists()) {
+ sender.sendMessage(plugin.messages.error("error_not_found", schemFileName));
+ return true;
+ }
+
// Get the name and UUID of the sender
String senderName = sender.getName();
UUID senderUUID = (sender instanceof Player) ? ((Player) sender).getUniqueId() : null;
diff --git a/src/main/resources/messages_en.yml b/src/main/resources/messages_en.yml
index 9568cc2..420ae12 100644
--- a/src/main/resources/messages_en.yml
+++ b/src/main/resources/messages_en.yml
@@ -3,6 +3,7 @@ prefix: "[SchemUploader] "
error_invalid_folder: "You can only specify locations within the WorldEdit schematic folder"
error_http_status: "HTTP status code: %d"
error_io: "IO error: %s"
+error_not_found: "File %s does not exist"
error_not_schematic: "The file is not a schematic file"
error_already_exists: "%s already exists. Please specify -f to overwrite"
error_file_size_exceeded: "File size exceeds maximum limit (%d Bytes)"
diff --git a/src/main/resources/messages_ja.yml b/src/main/resources/messages_ja.yml
index 82abcab..c7986f6 100644
--- a/src/main/resources/messages_ja.yml
+++ b/src/main/resources/messages_ja.yml
@@ -3,6 +3,7 @@ prefix: "[SchemUploader] "
error_invalid_folder: "WorldEditのschematicフォルダー以外の場所を指定することはできません"
error_http_status: "HTTPステータスコード: %d"
error_io: "IOエラー: %s"
+error_not_found: "ファイル %s が存在しません"
error_not_schematic: "ファイルがschematicファイルではありません"
error_already_exists: "%s は既に存在します。上書きする場合は -f を指定してください"
error_file_size_exceeded: "ファイルサイズが大きすぎます (最大 %d Bytes)"