io.github.parzivalExe.guiApi.commands.GetAmountCommand.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of guiapi-mc1.8 Show documentation
Show all versions of guiapi-mc1.8 Show documentation
With GuiAPI you can create Guis for your Bukkit/Spigot-Plugin in seconds while at the same time saving many lines of code
The newest version!
package io.github.parzivalExe.guiApi.commands
import io.github.parzivalExe.guiApi.GuiManager
import io.github.parzivalExe.guiApi.components.ComponentManager
import org.bukkit.command.Command
import org.bukkit.command.CommandExecutor
import org.bukkit.command.CommandSender
class GetAmountCommand : CommandExecutor{
override fun onCommand(sender: CommandSender?, command: Command?, label: String?, args: Array?): Boolean {
if(command!!.name == "guiAmount") {
sender?.sendMessage("guis.size: ${GuiManager.getAllGuis().size}")
}else if(command.name == "componentAmount"){
sender?.sendMessage("components.size: ${ComponentManager.getAllComponents().size}")
}else if(command.name == "componentList") {
sender?.sendMessage("-------components--------")
ComponentManager.getAllComponents().forEach {
sender?.sendMessage("${it::class.simpleName} {${it.id}]: name = ${it.meta.title}, place = ${it.place}")
}
sender?.sendMessage("------------------------")
}
return true
}
}