Add the jar extension if missing

This commit is contained in:
Xiaro 2021-03-06 01:08:43 -05:00
parent 4ccba282d8
commit 9f2860bc12
No known key found for this signature in database
GPG Key ID: 996D265D6E155377
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ object PluginCommand : ClientCommand(
literal("load") {
string("jar name") { nameArg ->
execute {
val name = nameArg.value
val name = "${nameArg.value.removeSuffix(".jar")}.jar"
val file = File("${PluginManager.pluginPath}$name")
if (!file.exists() || !file.extension.equals("jar", true)) {