aikar / commands

Java Command Dispatch Framework - (Bukkit, Spigot, Paper, Sponge, Bungee, JDA, Velocity supported, generically usable anywhere)
https://acfspigot.emc.gs
MIT License
562 stars 147 forks source link

Another plugin has hijacked the command map #25

Closed benjaminforras closed 7 years ago

benjaminforras commented 7 years ago
[17:06:34] [Server thread/ERROR]: Failed to get Command Map. ACF will not function.
[17:06:34] [Server thread/ERROR]: Error occurred while enabling AdvancedKitsReloaded v1.1.2 (Is it up to date?)
java.lang.NoSuchFieldException: knownCommands
at java.lang.Class.getDeclaredField(Class.java:2070) ~[?:1.8.0_72]
at hu.tryharddevs.advancedkits.utils.afc.BukkitCommandManager.(BukkitCommandManager.java:59) ~[?:?]
at hu.tryharddevs.advancedkits.utils.afc.ACF.createManager(ACF.java:44) ~[?:?]
at hu.tryharddevs.advancedkits.AdvancedKitsMain.onEnable(AdvancedKitsMain.java:79) ~[?:?]

spigot-1.11.2.jar:git-Spigot-7d78b81-e232e15

aikar commented 7 years ago

Are you using any other plugins that deal with commands?

This looks like a plugin is messing with your command map.

I will add some debug tonight to identify if another plugin has injected the command map.

benjaminforras commented 7 years ago

An user sent it to me, I'll ask him. Thanks!

aikar commented 7 years ago

If you can identify what plugin is doing it, I would think that if you add your plugin as 'loadbefore' that plugin, and let ACF get the opportunity to register commands BEFORE they hijack the command map, it should work.

aikar commented 7 years ago

note to self - if we identify someone has hijacked the command map, hijack it back ourselves with a new proxying command map that tries both.

benjaminforras commented 7 years ago

I was thinking the same. Thanks! :)

aikar commented 7 years ago

Even if you fix this yourself, don't close this, as I want to try to resolve this in ACF as said above

aikar commented 7 years ago

@TryHardDood can you try on latest build and see if it fixes it for that user?

Totally untested, but it should identify what plugin is doing it and try to work around it.

benjaminforras commented 7 years ago

Haven't heard anything from that user since I opened this ticket. I'll let you know when I have something.

aikar commented 7 years ago

Going to close this now then. We can open a new issue for any bugs in my fix.

aikar commented 7 years ago

@TryHardDood recompile with latest. Should be fixed now.