Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Mojang-Mapped Server NMS error #3

Description

@PhilCCMG

A server which uses mojang bindings rather than spigot bindings will not be able to load a plugin using commands through Lirand due to Lirand utilising reflection lookups.

It would be ideal to have a check to see if a method exists, and failing that (NPE would be thrown in the current case), attempt the mojang version.

// lirand.api.dsl.command.implementation.dispatcher.Dispatcher

// Before (L101)
		private val serverGetCommandDispatcherMethod = dedicatedServer::class.java.methods
			.find { it.returnType.simpleName == "CommandDispatcher" && it.parameterCount == 0 }!!

// MojMap Specific Fix (L101)
		private val serverGetCommandDispatcherMethod = dedicatedServer::class.java.methods
			.find { it.returnType.simpleName == "Commands" && it.parameterCount == 0 }!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions