getWorld

open fun getWorld(name: String): McServerWorld?

Gets a world by name.

Return

The world or null.

Parameters

name

The world name


abstract fun getWorld(instance: Any): McServerWorld

Gets a world by server-specific instance.

The instance parameter represents the server-specific server instance:

  • For Bukkit org.bukkit.World

  • For modded servers (Fabric/Forge) net.minecraft.server.level.ServerLevel

Return

The world.

Parameters

instance

The server-specific world instance.