All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.parzivalExe.guiApi.commands.GetAmountCommand.kt Maven / Gradle / Ivy

Go to download

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
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy