Question Clearlagg

  • After careful consideration and due to limited usage, we’ve made the decision to discontinue the PaperMC forums. Moving forward, we recommend using Hangar for plugin uploads, and for all other community discussions and support, please join us on Discord.

Drache

New member
Jul 29, 2023
4
0
1
Hey everyone,

I do have a simple question that nobody seems to be able to answer - at least not at the Spigot forum:

Why do we all get rid off clearlagg? (WAIT please continue to read):

In my server, we use clearlagg to simply delete all entties that are arrows or boats (cause they are cheap to create / build). So clearlagg does simply delete these entities to prevent someone from trying to slow down / crash the server.

A lot of people say we do not need clearlagg anymore now cause paper manages a lot of things. But how would paper manage this issue? For example, I teleported to a chunk yesterday with like 40 arrows around there which were there for weeks now. I know, as long as the chunk isn't loaded, it shouldn't cause a problem. But what if some "bad players" spawn 1000 boats / arrows to crash the server. So how would I prevent this or how to figure out they crashed the server that way?

Or in short: can paper fix this issue or do we still need to use clearlagg?

Thanks for your answers =)
 

Machine Maker

Paper Developer
Staff member
Dec 17, 2021
151
6
24
18
California
Well, that specific issue about spawning a large number of entities can be somewhat mitigated by using paper's chunk entity save limits. Basically it prevents more than a configured number of a specific entity from being saved in a chunk. So like if you set it to 4 for boats, then only 4 boats can be saved in a chunk. More can exist, but the moment that chunk is unloaded, and therefore saved, only 4 of them are saved.

You can also configure the despawn rate for each item individually or globally shortening it from 5 minutes if you want it to be something smaller.
There might be more strategies, but these 2 are the first that come to my mind.
 

Drache

New member
Jul 29, 2023
4
0
1
Well, that specific issue about spawning a large number of entities can be somewhat mitigated by using paper's chunk entity save limits. Basically it prevents more than a configured number of a specific entity from being saved in a chunk. So like if you set it to 4 for boats, then only 4 boats can be saved in a chunk. More can exist, but the moment that chunk is unloaded, and therefore saved, only 4 of them are saved.

You can also configure the despawn rate for each item individually or globally shortening it from 5 minutes if you want it to be something smaller.
There might be more strategies, but these 2 are the first that come to my mind.

To be fair, I never used the chunk limiter manually. So I think my setup should still be standard. Is there any suggestion you would tell me to do? Because right now it sounds like I could get rid off clearlagg, or?

So if I got it right: If trolls/griefers go into a chunk and spawn like 100000 boats, what exactly will happen? I mean, they could stay there which means the chunk is still loaded. Will they even be able to spawn so many boats or does paper prevent this already, like a limit or so ( I am trying to understand papers behavior in this specific situation to make sure that we really do not need the clearlagg boat / arrow / armorstands clear function )