Mine

data class Mine(val id: String, val display: Component, val blocks: List<MineBlock>, val randomBounds: Int, val from: Location, val to: Location, val blockFrom: Location, val blockTo: Location, val spawn: Location, val blockCountReset: Int, val resetDelay: Long, val level: Int, val item: ItemStack)

A configured mine.

Author

MarkusTieger

Since

0.2.0

Parameters

id

The id of the mine

display

The display component of the mine

blocks

What blocks could generate in the blockArea

randomBounds

The bounds for the random generator, required for the block generation

from

The lowest location of the area

to

The highest location of the area

blockFrom

The lowest location of the blockArea

blockTo

The highest location of the blockArea

spawn

The spawn location of the mine

blockCountReset

The minimal block count at that the reset timer starts

resetDelay

The delay for the reset timer

level

The required level to go in the mine

item

The item representation of the mine, will be used in the Warp gui

See also

Constructors

Link copied to clipboard
constructor(id: String, display: Component, blocks: List<MineBlock>, randomBounds: Int, from: Location, to: Location, blockFrom: Location, blockTo: Location, spawn: Location, blockCountReset: Int, resetDelay: Long, level: Int, item: ItemStack)

Properties

Link copied to clipboard
var bar: BossBar?

The bossbar for the reset counter.

Link copied to clipboard
Link copied to clipboard
val blockFrom: Location
Link copied to clipboard
Link copied to clipboard
val blockTo: Location
Link copied to clipboard
val display: Component
Link copied to clipboard
val from: Location
Link copied to clipboard
val id: String
Link copied to clipboard
val item: ItemStack
Link copied to clipboard
val level: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val spawn: Location
Link copied to clipboard
val to: Location

Functions

Link copied to clipboard

Counts the amount of non-empty blocks in the blockArea and starts a reset timer if the value is smaller than the configured blockCountReset value

Link copied to clipboard
fun reset()

Resets the mine.

Link copied to clipboard
fun validate()

Validates the configured values.