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

cn.handyplus.lib.command.IHandyCommandEvent Maven / Gradle / Ivy

The newest version!
package cn.handyplus.lib.command;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

/**
 * 子命令处理接口
 *
 * @author handy
 */
public interface IHandyCommandEvent {

    /**
     * 子命令
     *
     * @return 子命令
     */
    String command();

    /**
     * 权限
     *
     * @return 权限
     */
    String permission();

    /**
     * 执行命令
     *
     * @param sender 发送人
     * @param cmd    命令
     * @param label  别名
     * @param args   参数
     */
    void onCommand(CommandSender sender, Command cmd, String label, String[] args);

    /**
     * 是否异步执行
     *
     * @return true是
     * @since 3.7.7
     */
    default boolean isAsync() {
        return false;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy