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

com.skillw.pouvoir.api.manager.sub.ConditionManager.kt Maven / Gradle / Ivy

The newest version!
package com.skillw.pouvoir.api.manager.sub

import com.skillw.pouvoir.api.feature.condition.BaseCondition
import com.skillw.pouvoir.api.feature.condition.ConditionData
import com.skillw.pouvoir.api.manager.Manager
import com.skillw.pouvoir.api.plugin.map.LowerKeyMap

/**
 * Condition manager
 *
 * @constructor Create empty Condition manager
 */
abstract class ConditionManager : LowerKeyMap(), Manager {

    /**
     * 匹配条件
     *
     * @param text String 字符串
     * @param slot String? 槽位
     * @return Collection 条件数据
     */
    abstract fun matchConditions(text: String, slot: String?): Collection

    /**
     * 匹配条件
     *
     * conditions例如:
     * ```
     *    conditions:
     *     - key: food
     *       value: 15
     *     - key: attribute
     *       name: 生命值
     *       value: 10
     *
     * ```
     *
     * @param conditions List> 条件列表
     * @param slot String? 槽位
     * @return Collection 条件数据
     */
    abstract fun matchConditions(conditions: List>, slot: String?): Collection
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy