MinecraftMcp

class MinecraftMcp : JavaPlugin, Listener

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

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
@Nullable
open fun getCommand(@NotNull name: @NotNull String): @Nullable PluginCommand?
Link copied to clipboard
@Nullable
open fun getDefaultBiomeProvider(@NotNull worldName: @NotNull String, @Nullable id: @Nullable String?): @Nullable BiomeProvider?
Link copied to clipboard
@Nullable
open fun getDefaultWorldGenerator(@NotNull worldName: @NotNull String, @Nullable id: @Nullable String?): @Nullable ChunkGenerator?
Link copied to clipboard
@Nullable
open fun getResource(@NotNull filename: @NotNull String): @Nullable InputStream?
Link copied to clipboard
@Nullable
protected fun getTextResource(@NotNull file: @NotNull String): @Nullable Reader?
Link copied to clipboard
fun init(@NotNull loader: @NotNull PluginLoader, @NotNull server: @NotNull Server, @NotNull description: @NotNull PluginDescriptionFile, @NotNull dataFolder: @NotNull File, @NotNull file: @NotNull File, @NotNull classLoader: @NotNull ClassLoader)
fun init(@NotNull server: @NotNull Server, @NotNull description: @NotNull PluginDescriptionFile, @NotNull dataFolder: @NotNull File, @NotNull file: @NotNull File, @NotNull classLoader: @NotNull ClassLoader, @Nullable configuration: @Nullable PluginMeta?, @NotNull 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 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 behavior; wrong high costs a script importing a plugin that attached its urls after this.

Link copied to clipboard
open fun onCommand(@NotNull sender: @NotNull CommandSender, @NotNull command: @NotNull Command, @NotNull label: @NotNull String, @NotNull 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
fun onServerTickEnd(event: ServerTickEndEvent)

Server-lane heartbeat, standing in for the mod path's tickServer RETURN injection.

Link copied to clipboard
@Nullable
open fun onTabComplete(@NotNull sender: @NotNull CommandSender, @NotNull command: @NotNull Command, @NotNull alias: @NotNull String, @NotNull 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(@NotNull resourcePath: @NotNull String, replace: Boolean)