1
0
mirror of https://github.com/LZStealth/armor-statues.git synced 2025-08-10 08:35:52 +01:00

Initial commit for armor statues

This commit is contained in:
MSpaceDev
2021-04-17 12:07:53 +02:00
parent 490890cd34
commit dafdb83c30
116 changed files with 3229 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
#
# Description: Removes all unused armor stands in loaded chunks
# Called by: armor_statues:admin via chat clickEvent
# Entity @s: Player
#
# Note: "Unused" stands are invisible, are not holding or wearing items, and are not part of a tool rack
#
# Store number of affected stands for reporting
#
execute store result score @s as_pose run execute if entity @e[type=armor_stand,nbt={Invisible:1b},nbt=!{HandItems:[{Count:1b}]},nbt=!{ArmorItems:[{Count:1b}]},nbt=!{DisabledSlots:4079166},nbt=!{Invulnerable:1b},nbt=!{Marker:1b}]
#
# Kill affected stands
#
execute as @e[type=armor_stand,nbt={Invisible:1b},nbt=!{HandItems:[{Count:1b}]},nbt=!{ArmorItems:[{Count:1b}]},nbt=!{DisabledSlots:4079166},nbt=!{Invulnerable:1b},nbt=!{Marker:1b}] run kill @s
#
# Report number affected
#
tellraw @p [{"score":{"name":"@s","objective":"as_pose"},"color":"aqua"},{"text":" unused armor stands deleted","color":"aqua"}]
#
scoreboard players reset @s as_pose