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

Unknown command spam in console #118

Closed
bloggy opened this issue Jul 6, 2016 · 16 comments
Closed

Unknown command spam in console #118

bloggy opened this issue Jul 6, 2016 · 16 comments
Labels
investigating The core developers are currently investigating this issue. Usually used for complex cases.

Comments

@bloggy
Copy link

bloggy commented Jul 6, 2016

Whenever I execute a console command (via console) I get the "unknown command" warning in the console which spams my server.

This is the script command I am executing:
http://hastebin.com/uheqifowuv.vbs

I am on spigot 1.9.4.

@bensku
Copy link
Member

bensku commented Jul 8, 2016

Does using /skript: work?

@bloggy
Copy link
Author

bloggy commented Jul 10, 2016

Yes, it works and there is no console spam with /skript: before the command. But that is not a good solution. I don't want to change all my console commands to /skript:MYCOMMAND ... this wasn't necessary in the past. How can this be fixed?

@bensku
Copy link
Member

bensku commented Jul 10, 2016

Could it be that some other plugin has command with exactly same name? I.e. could you try if that command exists when you're running server without that script?

@bensku bensku added the investigating The core developers are currently investigating this issue. Usually used for complex cases. label Jul 10, 2016
@TheBentoBox
Copy link
Member

I can confirm that I've always had this issue (since long before this fork, but it persists in the fork). Running commands from console tends to work just fine, but it also sends an unknown command message, even if the command isn't registered in a different plugin. e.g. here's me running my Skripted /playtime command on a player

12.07 09:45:29 [Server] INFO Faelisa's total time online is 5 day(s) 4 hour(s) 35 minute(s) 23 second(s).
12.07 09:45:29 [Server] INFO Unknown command. Type "/help" for help.

The Unknown command shows up after the command result, even though it worked just fine.

@Pilvinen
Copy link

Yes, I can confirm, I also have this. It's been around for a very long time. Doesn't really break any functionality, just an oddity.

@Nicofisi
Copy link
Member

Nicofisi commented Jul 12, 2016

This has been a known bug since the beginning of Skript, and as far as I know Njol finally said that this won't be fixed (by him).
Njol/Skript#194

Edit: The MassiveCraft team has achieved it anyway somehow: https://github.com/MassiveCraft/MassiveCore/blob/master/src/com/massivecraft/massivecore/command/MassiveCommand.java#L40-L54

You can change the command aliases of their plugins while the server is running (and what's fancy in general but wouldn't work with Skript is that all commands are unregistered and re-registered automatically every second without impact on server's performance)

But can't we just set some kind of a console filter to catch these messages and block them? It would be a bit tricky but for sure easier (less advanced) than what they do in their plugins.. just look at that repo xD

@28andrew
Copy link
Contributor

I just saw this. https://www.spigotmc.org/threads/small-easy-register-command-without-plugin-yml.38036/ It uses NMS but could easily be changed to use Reflection to access NMS (for cross-version compatability)

@bloggy
Copy link
Author

bloggy commented Jul 26, 2016

This still exists, any solutions yet? At least if we could stop the console spam^^

@bensku
Copy link
Member

bensku commented Jul 30, 2016

You can use logfilters to get rid of messages. And msybe I will fix this at some point, but low priority.

@28andrew
Copy link
Contributor

28andrew commented Apr 8, 2017

It's not closed..

@Adrihun
Copy link

Adrihun commented Apr 10, 2017

Please fix this asap.. Please?

@TheBentoBox
Copy link
Member

Why ASAP ...? It's not really a huge issue, just a minor annoyance. There are far more important bugs to worry about than this one.

@Adrihun
Copy link

Adrihun commented Apr 10, 2017

Important bugs?
Show me xd

@TheBentoBox
Copy link
Member

#485, or #483, or #482? Those are just from the latest release alone.

@Snow-Pyon
Copy link

Snow-Pyon commented Dec 13, 2017

This can be closed once #1013 is merged. Also, for 1.9.0 users, make sure you have the latest build made for that version, such as there is a specific build where ServerCommandEvent#setCancelled is ignored, and that's what my PR uses to fix this.

By the way, it's kinda hilarious how the such easily fixeable bug been all this time without getting fixed. And actually, it was fixed on #77 but due to how Skript handled command execution, which was executing the command separatedly and then setting the actual executed command to "", the error persisted.

Oh well, I think the 5 hours I spent finding the root cause of this weren't for nothing.

@bensku bensku closed this as completed Jan 6, 2018
@SlimeDog
Copy link

SlimeDog commented Jan 6, 2018

Thanks. I've been using a console filter for years to elide that message. All better now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating The core developers are currently investigating this issue. Usually used for complex cases.
Projects
None yet
Development

No branches or pull requests

9 participants