
net.chestmc.common.extensions.Worlds.kt Maven / Gradle / Ivy
package net.chestmc.common.extensions
import net.chestmc.common.MinecraftWorld
import net.chestmc.common.extensions.constants.WORLD_REPOSITORY_FOLDER
import org.bukkit.World
import org.bukkit.craftbukkit.CraftWorld
/**
* Gets the repository file of this world. Note that this not creates the repository if not exists.
*/
inline val World.repository get() = file(WORLD_REPOSITORY_FOLDER, "${uid}.repository")
/**
* Gets the craft world handler of this world.
*/
val World.craftHandler: CraftWorld get() = this as CraftWorld
/**
* Gets the minecraft world handler of this world.
*/
val World.handler: MinecraftWorld get() = craftHandler.handle
© 2015 - 2025 Weber Informatics LLC | Privacy Policy