Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mojang-Mapped Server NMS error #3

Open
PhilCCMG opened this issue Feb 12, 2024 · 1 comment · May be fixed by #4
Open

Mojang-Mapped Server NMS error #3

PhilCCMG opened this issue Feb 12, 2024 · 1 comment · May be fixed by #4

Comments

@PhilCCMG
Copy link

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 }!!
@gabber235 gabber235 linked a pull request Feb 13, 2024 that will close this issue
@liray-dev
Copy link

Just fork it, the library is abandoned :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants