Skip to content

Commit a2017ce

Browse files
committed
Backend: Move ReloadCommand.kt to moderation category
1 parent 738947b commit a2017ce

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/main/kotlin/com/example/exampleplugin/commands/ReloadCommand.kt renamed to src/main/kotlin/com/example/exampleplugin/commands/moderation/ReloadCommand.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
package com.example.exampleplugin.commands
1+
package com.example.exampleplugin.commands.moderation
22

3+
import com.example.exampleplugin.Main
34
import com.example.exampleplugin.registration.PluginCommand
45
import org.bukkit.command.CommandSender
56
import org.bukkit.plugin.java.JavaPlugin
@@ -16,7 +17,7 @@ class ReloadCommand(private val plugin: JavaPlugin) : PluginCommand(
1617
permission = "exampleplugin.reload"
1718
) {
1819
override fun execute(sender: CommandSender, args: Array<out String>): Boolean {
19-
val main = plugin as? com.example.exampleplugin.Main
20+
val main = plugin as? Main
2021
if (main == null) {
2122
sender.sendMessage("Error: Plugin instance type mismatch. Unable to reload configuration.")
2223
return true
@@ -25,4 +26,4 @@ class ReloadCommand(private val plugin: JavaPlugin) : PluginCommand(
2526
sender.sendMessage("Configuration reloaded!")
2627
return true
2728
}
28-
}
29+
}

0 commit comments

Comments
 (0)