PaperPlatformHelper

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val cacheDir: Path
Link copied to clipboard
open override val configPath: Path
Link copied to clipboard
open override val isDedicatedServer: Boolean

CraftBukkit and every fork of it only ever run a dedicated server, so this is a constant here.

Link copied to clipboard
open override val minecraftVersion: String
Link copied to clipboard
open override val modVersion: String

getPluginMeta(), which deprecates this, does not exist on 1.18. getDescription() binds on every node in range, and its deprecation carries no forRemoval, so a removal would surface as a compile error.

Link copied to clipboard
open override val platformId: String

Forks override both halves: getName() is "Purpur"/"Folia", getVersion() carries the build. NOT getBukkitVersion() — that reads "1.20.1-R0.1-SNAPSHOT" on every fork of every build.

Link copied to clipboard
private val self: JavaPlugin

ServiceLoader builds this with a no-arg ctor, so the plugin instance is resolved from our own class.

Functions

Link copied to clipboard
private fun codeSource(cl: Class<*>): Path?
Link copied to clipboard
open override fun isModLoaded(modId: String): Boolean
Link copied to clipboard
open override fun isServerRunning(handle: Any?): Boolean

The lane's self token here is the Bukkit Server, not a MinecraftServer: Paper's runtime is only mojmap-named from 1.20.5, so the inherited default would not link on the 1.18 node.

Link copied to clipboard
open override fun modCodePaths(): List<ModCode>

The server jar — where net.minecraft.* and the CraftBukkit implementation both live, so that one entry covers what minecraft + the loader jars cover on a mod host. Plugins come through pluginCodePaths.

Link copied to clipboard
open override fun pluginCodePaths(): List<Path>

Every loaded plugin's jar, off the plugin's CodeSource — JavaPlugin#getFile is protected and PluginDescriptionFile never carries the path.

Link copied to clipboard
open override fun runCommands(handle: Any, command: String): String