MinecraftMcp

class MinecraftMcp : JavaPlugin, Listener

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard
private object Heartbeat : Listener

Server-lane heartbeat, standing in for the mod path's tickServer RETURN injection. Its own listener, so onEnable's registerEvents(this, this) doesn't register it early.

Properties

Link copied to clipboard
Link copied to clipboard
@get:NotNull
protected val classLoader: @NotNull ClassLoader
Link copied to clipboard
@get:NotNull
open val componentLogger: @NotNull ComponentLogger
Link copied to clipboard
@get:NotNull
open val config: @NotNull FileConfiguration
Link copied to clipboard
private var configFile: File?
Link copied to clipboard
@get:NotNull
val dataFolder: @NotNull File
Link copied to clipboard
@get:NotNull
val description: @NotNull PluginDescriptionFile
Link copied to clipboard
@get:NotNull
protected open val file: @NotNull File
Link copied to clipboard
@set:ApiStatus.Internal
var isEnabled: Boolean
Link copied to clipboard
Link copied to clipboard
private val lifecycleEventManager: LifecycleEventManager<Plugin?>?
Link copied to clipboard
val lifecycleManager: @NotNull LifecycleEventManager<Plugin?>
Link copied to clipboard
private var loader: PluginLoader?
Link copied to clipboard
@get:NotNull
open val log4JLogger: @NotNull Logger
Link copied to clipboard
@get:NotNull
open val logger: @NotNull Logger
Link copied to clipboard
private var naggable: Boolean
Link copied to clipboard
@get:NotNull
val name: @NotNull String
Link copied to clipboard
private var newConfig: FileConfiguration?
Link copied to clipboard
@get:NotNull
val pluginLoader: @NotNull PluginLoader
Link copied to clipboard
@get:NotNull
val pluginMeta: @NotNull PluginMeta
Link copied to clipboard
@get:NotNull
val server: @NotNull Server
Link copied to clipboard
@get:NotNull
open val slF4JLogger: @NotNull Logger

Functions

Link copied to clipboard
operator fun equals(obj: Any?): Boolean
Link copied to clipboard
open fun getCommand(name: @NotNull String): @Nullable PluginCommand?
Link copied to clipboard
open fun getDefaultBiomeProvider(worldName: @NotNull String, id: @Nullable String?): @Nullable BiomeProvider?
Link copied to clipboard
open fun getDefaultWorldGenerator(worldName: @NotNull String, id: @Nullable String?): @Nullable ChunkGenerator?
Link copied to clipboard
open fun getResource(filename: @NotNull String): @Nullable InputStream?
Link copied to clipboard
protected fun getTextResource(file: @NotNull String): @Nullable Reader?
Link copied to clipboard
fun hashCode(): Int
Link copied to clipboard
fun init(loader: @NotNull PluginLoader, server: @NotNull Server, description: @NotNull PluginDescriptionFile, dataFolder: @NotNull File, file: @NotNull File, classLoader: @NotNull ClassLoader)
fun init(server: @NotNull Server, description: @NotNull PluginDescriptionFile, dataFolder: @NotNull File, file: @NotNull File, classLoader: @NotNull ClassLoader, configuration: @Nullable PluginMeta?, logger: @NotNull Logger)
Link copied to clipboard

Hot-loaded into a running server (PlugMan et al) rather than booted with it — an UNSUPPORTED path, covered only because it is the one that breaks outright: onServerLoad is this host's sole opener of ReplBridge.pluginsLatch and starter of the heartbeat, and never fires there, hanging every eval rather than degrading one. Heuristic and best-effort, sound only while plugin.yml says load: STARTUP — that is what puts onEnable ahead of world loading. Wrong low is the old hang, now without a heartbeat as well; wrong high costs a script importing a plugin that attached its urls after this, and doubles the heartbeat once ServerLoadEvent fires too.

Link copied to clipboard
open fun onCommand(sender: @NotNull CommandSender, command: @NotNull Command, label: @NotNull String, args: Array<out @NotNull String>?): Boolean
Link copied to clipboard
open override fun onDisable()
Link copied to clipboard
open override fun onEnable()
Link copied to clipboard
open fun onLoad()
Link copied to clipboard
fun onServerLoad(event: ServerLoadEvent)

Plugin gate, standing in for the mod path's MixinDedicatedServer#initServer RETURN — fired right after enablePlugins(POSTWORLD), so every plugin's onEnable has returned and the urls it attached to its own loader are on it (see ReplBridge.pluginsLatch). MONITOR is the last priority BUCKET, not last outright: order within it is registration order, and nothing bounds a plugin that attaches later still.

Link copied to clipboard
open fun onTabComplete(sender: @NotNull CommandSender, command: @NotNull Command, alias: @NotNull String, args: Array<out @NotNull String>?): @Nullable List<String?>??
Link copied to clipboard
open fun reloadConfig()
Link copied to clipboard
open fun saveConfig()
Link copied to clipboard
Link copied to clipboard
open fun saveResource(resourcePath: @NotNull String, replace: Boolean)
Link copied to clipboard
private fun serverLoaded()

The server has finished loading: onServerLoad, or the hot-load branch in onEnable — exclusive under load: STARTUP, so this runs once. Opens the plugin gate and starts the heartbeat.

Link copied to clipboard
@NotNull
open fun toString(): @NotNull String