Updated plugin.yml
This commit is contained in:
29
src/main/kotlin/club/mcscrims/speedhg/command/KitsCommand.kt
Normal file
29
src/main/kotlin/club/mcscrims/speedhg/command/KitsCommand.kt
Normal file
@@ -0,0 +1,29 @@
|
||||
package club.mcscrims.speedhg.command
|
||||
|
||||
import club.mcscrims.speedhg.SpeedHG
|
||||
import club.mcscrims.speedhg.kit.KitInventoryManager
|
||||
import org.bukkit.command.Command
|
||||
import org.bukkit.command.CommandExecutor
|
||||
import org.bukkit.command.CommandSender
|
||||
import org.bukkit.entity.Player
|
||||
|
||||
class KitsCommand(
|
||||
private val plugin: SpeedHG,
|
||||
private val kitInventoryManager: KitInventoryManager
|
||||
) : CommandExecutor {
|
||||
|
||||
override fun onCommand(
|
||||
sender: CommandSender,
|
||||
command: Command,
|
||||
label: String,
|
||||
args: Array<out String>
|
||||
): Boolean {
|
||||
if (sender !is Player) {
|
||||
sender.sendMessage("§cOnly players can use this command.")
|
||||
return true
|
||||
}
|
||||
|
||||
kitInventoryManager.openKitInventory(sender, 1)
|
||||
return true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user