Lag from user spamming a bunch of commands
I have a suicide plugin which when you do /kill it kills your player. This for some reason doesn't show up on the tabcomplete so I use an alias for it to show up. I also added a 15 second cooldown to this command and I had a user spam probably 1000 /kill commands per second which brought down the TPS to 15. What's the best and simplest way to fix this issue?
31 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by snakeaim#0
Maybe through a chat limiter?
If theyβre spamming the command that quickly paper should kick them
You can configure their spam / packet limiter
Where can I do that?
Since paper didnt kick him
like look at this lol
this was all over a second
he did this for 25 seconds or so
I have this but it seems to not work in this case lol
https://mclo.gs/zwWNIEA full log
Edit config/paper-global.yml
ensure the action is KICK and edit to your liking
Do you mean this?
yeah
you can decrease the max packet rate if you want
I have it set up like that but the guy still wasnt kicked?
I saw this in the middle of the log maybe its something from chatcontrol?
If that isnβt doing you any favours then try https://www.spigotmc.org/resources/chat-cooldown-free.93399/
Itβs a stupidly simple plugin
And this is when it ended
interesting
Itβs the lag from the commands making chatcontrol stuff taking a while
and so it complains
I guess
Super fast commands
It literally froze the whole server for a sec
When I add a 1 second cooldown to commands through chatcontrol it seems to break some of my plugins :/
strange
Ohh
It seems to happen like that when someone types /kill + anything else
Huh
Might be something from the suicide plugin I use...
Do you happen to know a replacement for it, one which also has a cooldown π
Ive been looking for a while and this was the best I found but i guess it has memory leak or something
what are you currently using?
I used to use this and it worked fine no matter what but it didnt have a delay featuer https://www.spigotmc.org/resources/killyourself-1-13-1-19.98534/
now I use this one https://github.com/nothub/SuicideKill
GitHub
GitHub - nothub/SuicideKill: Minecraft oldschool /kill plugin
Minecraft oldschool /kill plugin. Contribute to nothub/SuicideKill development by creating an account on GitHub.
I dont really see how necessary suiciding is needed tbh
just like /spawn or if you really want to die, jump in a pit of lava
or fall off a cliff
^that
Looks to be the shitty coding
Its doing its action on any command preprocess and not any normal method of doing it
Might have become worse over time
Oh interesting
Add it to plugin.yml, can probably even do it with just 7zip or winrar
they're doing it because they want the vanilla /kill to still work
at that point though, they should just do
/suicide
instead of /kill
Ah
you'd add something like
aliases may not work because they're not registering an executor and just listening for someone to run a command named
/kill
If you use essentials or CMI they have a suicide cmd iirc
essentials definitely does
just make an alias for that or something
yeah
fairly sure CMI does
would be shocked if it didnβt