A
Admincraftβ€’2w ago
Snakeaim

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
Admincraft Meta
Admincraft Metaβ€’2w ago
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
Snakeaim
SnakeaimOPβ€’2w ago
Maybe through a chat limiter?
Skullians
Skulliansβ€’2w ago
If they’re spamming the command that quickly paper should kick them You can configure their spam / packet limiter
Snakeaim
SnakeaimOPβ€’2w ago
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
Snakeaim
SnakeaimOPβ€’2w ago
I have this but it seems to not work in this case lol
No description
Snakeaim
SnakeaimOPβ€’2w ago
Skullians
Skulliansβ€’2w ago
Edit config/paper-global.yml ensure the action is KICK and edit to your liking
Snakeaim
SnakeaimOPβ€’2w ago
No description
Snakeaim
SnakeaimOPβ€’2w ago
Do you mean this?
Skullians
Skulliansβ€’2w ago
yeah you can decrease the max packet rate if you want
Snakeaim
SnakeaimOPβ€’2w ago
I have it set up like that but the guy still wasnt kicked?
Snakeaim
SnakeaimOPβ€’2w ago
No description
Snakeaim
SnakeaimOPβ€’2w ago
I saw this in the middle of the log maybe its something from chatcontrol?
Skullians
Skulliansβ€’2w ago
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
Snakeaim
SnakeaimOPβ€’2w ago
And this is when it ended
No description
Skullians
Skulliansβ€’2w ago
interesting It’s the lag from the commands making chatcontrol stuff taking a while and so it complains
Snakeaim
SnakeaimOPβ€’2w ago
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 :/
Skullians
Skulliansβ€’2w ago
strange
Snakeaim
SnakeaimOPβ€’2w ago
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
Snow Kit
Snow Kitβ€’2w ago
what are you currently using?
Snakeaim
SnakeaimOPβ€’2w ago
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
Snow Kit
Snow Kitβ€’2w ago
just like /spawn or if you really want to die, jump in a pit of lava or fall off a cliff
ProGamingDk
ProGamingDkβ€’2w ago
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
Snow Kit
Snow Kitβ€’2w ago
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
ProGamingDk
ProGamingDkβ€’2w ago
Ah
Snow Kit
Snow Kitβ€’2w ago
you'd add something like
commands:
kill:
description: Kills yourself
usage: /kill
aliases:
- suicide
commands:
kill:
description: Kills yourself
usage: /kill
aliases:
- suicide
aliases may not work because they're not registering an executor and just listening for someone to run a command named /kill
Skullians
Skulliansβ€’2w ago
If you use essentials or CMI they have a suicide cmd iirc
Snow Kit
Snow Kitβ€’2w ago
essentials definitely does
Skullians
Skulliansβ€’2w ago
just make an alias for that or something yeah fairly sure CMI does would be shocked if it didn’t

Did you find this page helpful?