Clear Lag (Configurable) V1.1

Share scripts you wrote for Denizen-Bukkit here!
Post Reply
ZNChano
New
New
Posts: 8
Joined: June 6th, 2020, 5:14 pm

Clear Lag (Configurable) V1.1

Post by ZNChano » July 21st, 2020, 11:09 am

Clear Lag V1.1
- Chano
This Script will Remove all Entities and Ground Items from a specific world or the entire server every 15 Minutes.

There are now two new Config options within the script!
Simply change the World value to the world you want to clear on, and chance Entities value to switch between clearing removing all mobs and animals + items OR just items!
If you would like to change the interval, simply change the number within the event script.

Updated July 22st 7:45 PM
Haste Link: https://one.denizenscript.com/haste/72788
Last edited by ZNChano on July 22nd, 2020, 4:45 pm, edited 2 times in total.

User avatar
mcmonkey
Site Admin
Site Admin
Posts: 289
Joined: August 5th, 2016, 7:27 pm
Location: Los Angeles, California, USA
Contact:

Re: Clear Lag

Post by mcmonkey » July 21st, 2020, 3:11 pm

Destroying all mobs seems a bit excessive.

The inconsistent capitalization is ... weird.

You have a few island_normal_world still instead of your INSERTWORLDHERE

You should probably have a debug: false on that.
Denizen lead developer. On Discord as mcmonkey#6666.

ZNChano
New
New
Posts: 8
Joined: June 6th, 2020, 5:14 pm

Re: Clear Lag

Post by ZNChano » July 21st, 2020, 4:07 pm

Thanks, will add that. And the reason it removes mobs is because it’s used on a skyblock server with large mob grinders and such. But I’ll add a tagged out message telling the user it can be removed if needed :)

ZNChano
New
New
Posts: 8
Joined: June 6th, 2020, 5:14 pm

Re: Clear Lag

Post by ZNChano » July 21st, 2020, 6:04 pm

Updated!

User avatar
bear
Regular
Regular
Posts: 14
Joined: January 26th, 2019, 2:39 pm

Re: Clear Lag (Configurable) V1.1

Post by bear » July 22nd, 2020, 5:06 pm

Chano wrote:
July 22nd, 2020, 4:46 pm
thoughts?
From the Discord earlier ^, my feedback:

In terms of consistency in configurations for Minecraft, I'd recommend standard usage of true/false over yes/no.

You could also specify a list of worlds instead of a single world. Specifying a list of worlds would help with anyone editing it to know exactly how it should be formatted. Do note that if you did intend to implement this, the remove command does not currently show that it supports a list of worlds, so you would have to foreach that list of worlds.

Would also recommend that if it's supposed to be edited at all, that you move it to an external YAML file and load it on server start. Optimally, a command to reload that YAML after edits would be ideal as well, as opposed to reloading your scripts. Generally, if this were intended for "Drop-in-ready" usage excluding the configuration file, editing that would require reloading scripts. Which, if you can avoid, you don't want just anyone touching your scripts. If that YAML returned invalid for some reason, it would not load the entire file and those scripts wouldn't load on reload

edit:
Also, your date timestamp in the haste is still showing from three days ago.

ZNChano
New
New
Posts: 8
Joined: June 6th, 2020, 5:14 pm

Re: Clear Lag (Configurable) V1.1

Post by ZNChano » July 22nd, 2020, 7:30 pm

bear wrote:
July 22nd, 2020, 5:06 pm
Chano wrote:
July 22nd, 2020, 4:46 pm
thoughts?
From the Discord earlier ^, my feedback:

In terms of consistency in configurations for Minecraft, I'd recommend standard usage of true/false over yes/no.

You could also specify a list of worlds instead of a single world. Specifying a list of worlds would help with anyone editing it to know exactly how it should be formatted. Do note that if you did intend to implement this, the remove command does not currently show that it supports a list of worlds, so you would have to foreach that list of worlds.

Would also recommend that if it's supposed to be edited at all, that you move it to an external YAML file and load it on server start. Optimally, a command to reload that YAML after edits would be ideal as well, as opposed to reloading your scripts. Generally, if this were intended for "Drop-in-ready" usage excluding the configuration file, editing that would require reloading scripts. Which, if you can avoid, you don't want just anyone touching your scripts. If that YAML returned invalid for some reason, it would not load the entire file and those scripts wouldn't load on reload

edit:
Also, your date timestamp in the haste is still showing from three days ago.
I changed to True & False, Thanks!
But about the world list, are you referring to allowing the user to add a list of worlds? or me adding examples? Because Examples would be useless as I have no clue what their world would be named. Ill add the ability for multiple lists though definitely.
Ill work on the yaml later too! Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests