
walkmc.block.Click.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of walk-server Show documentation
Show all versions of walk-server Show documentation
A spigot fork to kotlin structure and news.
package walkmc.block
import org.bukkit.event.block.*
/**
* Represents a click type.
*
* Can be left click or right click.
*/
enum class Click {
LEFT,
RIGHT;
val isLeft get() = this == LEFT
val isRight get() = this == RIGHT
companion object {
fun from(action: Action) = when (action) {
Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK -> LEFT
else -> RIGHT
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy