Config setup
How to setup your config!
Where is the config? plugins\ClearLag\config.yml
Configuring Entity Filter/Remover Lists
Entity lists in clearlagg are highly configurable. You're able to filter based on many attributes such as name, livetime, and whether the entity is actively mounted. These filters are available for all entity lists!
These attributes can be reversed by putting a ! in front of it. So for example, !isMounted would be "Is NOT mounted", while isMounted would be "IS mounted".
Attribute Filters:
- hasName - This will filter any entity that has a custom name
- liveTime=100 - This will filter any entity that has lived for 100 ticks
- isMounted - This will filter any entity that is currently mounted
- name="Bob" - This will filter any entity with the name Bob
- id=1 - This will filter any ITEM entity with the ID of 1 (stone)
- onGround - This filter will filter any entity on the ground
- hasMeta="Yup" - This filter will filter any entity containing the meta Yup
Examples:
The following config section will filter any Minecart that IS currently mounted from being removed by /lagg area
area-filter: - Minecart isMounted
This will remove any Pig named Testing, any Zombie WITH a name, and any Minecart that IS NOT mounted
chunk-entity-limiter: enabled: true limit: 10 entities: - Pig name="Testing" - Zombie hasName - Minecart !isMounted
You're able to define more then one entity of the same type, like so:
entities:
- Item id=1
- Item id=2
- Pig name="bob7l"
- Pig name="Joe"
Configuring Custom Entity Removal
The "custom-trigger-removal" section of the configuration allows you to get more technical, and custom with the way you want to handle certain conditions of your server such as TPS levels, and entity counts. Being that this is the initial release, there isn't too many options yet. I plan to add onto this in time.
How to specify a trigger:
A trigger is what executes your jobs. You may specify UNLIMITED triggers, BUT all must have a UNIQUE name due to how YAML parses the config file. By default, I specify each with trigger1, trigger2, ect. How you name them is entirely up to you as long as they're valid YAML keys (No spaces)
"run-interval" specifies, in seconds, how often that trigger's conditions should be checked.
To specify a trigger (REQUIRED), you must put the trigger type under "trigger-type:". Each trigger requires different variables to operate correctly so make sure you specify them under the trigger type.
Trigger types:
tps-trigger: This trigger will execute your jobs once your TPS hits below your specified "tps-trigger" target, and will disable upon reaching your "tps-recover" target.
entity-limit-trigger: This trigger executes all your jobs once the specified entity limits are reached. For this to function, you must specify a "limit", a list of entities to be counted "entity-limits", and you may optionally specify worlds to be filtered (Not checked) using "world-filter:". Examples of all of this are shown below.
Jobs:
Jobs are what execute after a trigger's conditions are met. Some jobs will prevent the trigger's from releasing (Warning's). You may specify multiple jobs as long as they're different types. You cannot specify multiple jobs of the same type.
ALL jobs may be given warning countdowns - or just delay's if you decide not to specify any warnings. All you need to do is add "execute-job-time", and put the time in seconds it should take until the job is executed. Then, if you'd like warning messages, just like auto-removal - you need to add "warnings:", and put your warnings below. An example of this is started below.
Job types:
entity-clearer: This cleaner job removes the entities you specify under "remove-entities". In order to filter out worlds (NOT remove from), you need to specify their names under "world-filter:".
command-executor: This job executes all the commands under "commands:" you want to be executed after the trigger's conditions are met. After the trigger recovers, all the commands under "recover-commands" are then executed.
Examples:
(Sorry for format, dev.bukkit.org is very buggy/broken)
custom-trigger-removal: <---- The root. Don't change this enabled: true <---- Should this whole thing even be enabled? By default, disabled triggers: <---- Specifies your list of triggers. Don't change this name trigger1: <--- Our first trigger. We want to kill mobs when the TPS hits 19.4! trigger-type: tps-trigger <---- Specifying our trigger-type run-interval: 5 <----- We want this to run every 5 seconds tps-trigger: 19.4 <----- Run the job(s) at 19.4 TPS! tps-recover: 19.97 <----- Disable the jobs at 19.97 TPS jobs: <----- Root name for job listings. Don't rename command-executor: <----- We're using job type "command-executor" commands: <----- Specifying what commands we wanna run! - 'lagg killmobs' recover-commands: [] <----- We don't want to run recovery commands entity-clearer: <----- We're using job type "entity-clearer" as a second job execute-job-time: 21 <----- Let's give players a 21 second warning before removing items warnings: <----- Specify our warnings. time = how many seconds it's been - 'time:5 msg:&4[ClearLag] &cEntities/drops will be purged in &7+remaining &cseconds!' - 'time:15 msg:&4[ClearLag] &cEntities/drops will be purged in &720 &cseconds!' - 'time:20 msg:&4[ClearLag] &cEntities/drops will be purged in &710 &cseconds!' world-filter: - world <----- This world will be ignored during removal remove-entities: <----- What entities to remove - item - zombie !hasName <----- Remove zombies WITHOUT a name myOtherTriggerYup: <----- Neat name? As I've said, can be any valid YAML key name trigger-type: entity-limit-trigger <----- Setting trigger type run-interval: 5 <----- Run every 5 seconds limit: 10 <----- Limit our "entity-limits" types to 10 total world-filter: [] <----- We don't wanna filter any worlds entity-limits: <----- Which entities should be counted towards limit? - zombie - skeleton - enderman jobs: <----- Specifying our jobs entity-clearer: <----- Using job type "entity-clearer" world-filter: [] <----- We don't wanna filter any worlds remove-entities: <----- Which entities should we remove? - zombie - armorstand - enderman trigger3: <----- This trigger we're going to remove arrows in the ground trigger-type: entity-limit-trigger run-interval: 5 limit: 5 <----- Limit is 5 arrows in the ground before entity-clearer is executed world-filter: - world entity-limits: - arrow inGround <----- Only arrows in the ground jobs: entity-clearer: world-filter: [] remove-entities: - arrow inGround
Can someone explain what arrow-killtime is?
At the moment I am using http://dev.bukkit.org/bukkit-plugins/chunkspawnerlimiter/ but there seems to be more potential in this one.
I don't quite understand how I should add chickens or cows in ClearLagg's config to limit their spawn?
In Chunk Spawner Limiter it is specified as:
Also, do the interval changes in ClearLagg override limits in Bukkit.yml?
@Supershadow95
Is there a way to disable the Warnings spamming the console?
Can I use this plugin to only limit the frames / chests per chunk?
In Auto Removal msg can i edit the msg as i like and in the new update its like 400 from 460 so the msg will be shown plz help abouth this section
can you plz add this option:
console-messages : true / false # will also post messages on the console to see clearlag has been activated
very annoying to see if people have been active over night, and see that there is a list of clearlag spamming my console with over 500 messages, be nice to see it in game, but not the console
I am running a server with kcauldron 1.7.10 1448. I have tried multiple versions of clearlag, but the commands dont seem to be working, is there and particular version for me?
@liammoroney
Why are you on bukkit? KCauldron is not bukkit
@miki88mouse
i think in the "remove:" section under either (or both) "item-filter:" or "remove-mobs:" add "- ARMOR_STAND"
From some quick testing, I found that the config above does not match the actual config I have (unsure if it's the same for everyone). In my config, there is an "item-filter" section for /lagg clear and auto removal that does NOT kill/remove the items listed there. However, the "mobs" section actually removes the mobs listed.
If you're having issues with mobs being removed you put in the mobs section, try removing those mobs from the list.
Works good error free been using this plugin for years , it's currently running on Bukkit 1.8.8-R0.1-SNAPSHOT with no problems ....Thanks Good plugin !
Someone please update this page with accurate information. It's grown too outdated for safe use in the new config layout.
@Dooley_labs
appears this has been updated a day ago.. just fyi
I love the filtering, but im curious if more than one filter can be applied at a time? for example: (using the above)
remove any pig name "testing" that has lived 100 ticks and any minecart that IS NOT mounted and has lived for a 100 ticks???
if not, can they be listed repeatedly but with different filters... and if so, i wonder if the order would matter much... ???
---------chunk-entity-limiter:
enabled: true
limit: 10
entities:
- Pig name="Testing" liveTime=100
- Zombie hasName
- Minecart !isMounted liveTime=100
wonderful plugin!
is it possible to configure to autoremove wildhorses only? (not tammed horses)
thanks
Is it possible to tell ClearLagg not to remove any entities added by a specific mod?
I have this issue
[15:39:16 WARN]: [ClearLag] Task #343 for ClearLag v3.0.2 generated an exception
java.lang.NullPointerException: null
at me.minebuilders.clearlag.tasks.ClearTask.run(ClearTask.java:43) ~[?:?]
at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.13.2.jar:git-Paper-621]
at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:449) ~[patched_1.13.2.jar:git-Paper-621]
at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1010) ~[patched_1.13.2.jar:git-Paper-621]
at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[patched_1.13.2.jar:git-Paper-621]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:940) ~[patched_1.13.2.jar:git-Paper-621]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:837) ~[patched_1.13.2.jar:git-Paper-621]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
[15:39:17 WARN]: [ClearLag] Task #343 for ClearLag v3.0.2 generated an exception
java.lang.NullPointerException: null
at me.minebuilders.clearlag.tasks.ClearTask.run(ClearTask.java:43) ~[?:?]
at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.13.2.jar:git-Paper-621]
at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:449) ~[patched_1.13.2.jar:git-Paper-621]
at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1010) ~[patched_1.13.2.jar:git-Paper-
Hello, I have a problem, how do I solve the fact that the wagons get deleted? This only happens when a mob enters it, when it is empty and the specific cleaning time passes, it does not delete it, only when there is a mob, how do I configure it? so that the wagon does not leave?
Hi.
I have a problem on my server.
I set Clearlag to 1200. Of course, I also want to come warnings.
However, the already at 1100 and 1060, then no longer.
I went through the config several times, but have not found out when I can adjust the warnings, that is how much seconds.
Can someone give me a tip where I can adapt warning times?
Is there a way with custom entity removal to have enchanted items be ignored?