Paste #72788: Clear Lag 1.1

Date: 2020/07/22 16:41:29 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


#==========================================================#
# Script by Chano
# Zen ClearLag
# Clears Lag on an Interval
# Version 1.1
# July 19, 2020
#==========================================================#

#==========================================================#
# Config:

config:
    type: data
    # World name of the world for Entities and Items to be cleared in:
    world: island_normal_world
    # Remove Both Items and Mobs/Animals? Or just Items? (Yes for Both, no for Just Items)
    entities: yes

clearlag_interval:
    type: world
    debug: false
    events:
        after system time minutely every:15:
        - actionbar "<&6><&l>Entities and Ground Items will be removed in..." targets:<world[<script[config].data_key[world]>].players>
        - wait 1s
        - actionbar "<&6><&l>4 <&7> Seconds" targets:<world[<script[config].data_key[world]>].players>
        - wait 1s
        - actionbar "<&6><&l>3 <&7> Seconds" targets:<world[<script[config].data_key[world]>].players>
        - wait 1s
        - actionbar "<&6><&l>2 <&7> Seconds" targets:<world[<script[config].data_key[world]>].players>
        - wait 1s
        - actionbar "<&6><&l>1 <&7> Seconds" targets:<world[<script[config].data_key[world]>].players>
        - wait 1s
        - actionbar "<&b><&l>Removed Ground Items and Entities!" targets:<world[<script[config].data_key[world]>].players>
        - playsound <world[<script[config].data_key[world]>].players> sound:ENTITY_EXPERIENCE_ORB_PICKUP volume:1 pitch:1
        - if <script[config].data_key[entities]> = yes:
          - remove Arrow|DROPPED_ITEM|Skeleton|Zombie|Creeper|Ghast|Pig_Zombie|WITHER_SKELETON|SPIDER|SLIME|BLAZE|ENDERMAN|IRON_GOLEM|WITHER world:<script[config].data_key[world]>
        - if <script[config].data_key[entities]> = no:
          - remove Arrow|DROPPED_ITEM world:<script[config].data_key[world]>
        - wait 2s
        - actionbar "<&3><&l>Entities and Ground Items have been cleared. Next Clear in <&6><&l>15 Minutes" targets:<world[<script[config].data_key[world]>].players>
        - stop