com.skillw.pouvoir.api.plugin.map.SingleExecMap.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Pouvoir Show documentation
Show all versions of Pouvoir Show documentation
Bukkit Script Engine Plugin.
package com.skillw.pouvoir.api.plugin.map
/**
* Single exec map
*
* @constructor Create empty Single exec map
*/
open class SingleExecMap : LowerMap<() -> Unit>() {
/** Invoke */
fun invoke() {
values.forEach { function -> function.invoke() }
}
/**
* Run
*
* @param thing
*/
open fun run(thing: String) {
this[thing]?.run { invoke() }
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy