1
0
mirror of https://github.com/LZStealth/armor-statues.git synced 2025-08-12 21:15: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,11 @@
#
# Description: Disable option to get the book directly from the help menu
# Called by: armor_statues:admin via chat link
# Entity @s: player
#
execute store success score #as_success as_help run data modify storage customizable_armor_stands:settings as_admin.book_help set value "Disabled"
execute unless score #as_success as_help matches 1 run data modify storage customizable_armor_stands:settings as_admin.book_help set value "Enabled"
#
tellraw @s [{"text":"Getting the book from the help menu has been ","color":"aqua"},{"storage":"customizable_armor_stands:settings", "nbt":"as_admin.book_help"}]
#
function armor_statues:admin

View File

@@ -0,0 +1,11 @@
#
# Description: Enable option to get the book by crafting
# Called by: armor_statues:admin via chat link
# Entity @s: player
#
execute store success score #as_success as_help run data modify storage customizable_armor_stands:settings as_admin.book_craft set value "Disabled"
execute unless score #as_success as_help matches 1 run data modify storage customizable_armor_stands:settings as_admin.book_craft set value "Enabled"
#
tellraw @s [{"text":"Getting the book via crafting has been ","color":"aqua"},{"storage":"customizable_armor_stands:settings", "nbt":"as_admin.book_craft"}]
#
function armor_statues:admin

View File

@@ -0,0 +1,11 @@
#
# Description: Enable option to get allow item frame fixing from the book
# Called by: armor_statues:admin via chat link
# Entity @s: player
#
execute store success score #as_success as_help run data modify storage customizable_armor_stands:settings as_admin.fixed_item_frame set value "Disabled"
execute unless score #as_success as_help matches 1 run data modify storage customizable_armor_stands:settings as_admin.fixed_item_frame set value "Enabled"
#
tellraw @s [{"text":"Fixing item frame option has been ","color":"aqua"},{"storage":"customizable_armor_stands:settings", "nbt":"as_admin.fixed_item_frame"}]
#
function armor_statues:admin

View File

@@ -0,0 +1,24 @@
#
# This function is currently not used - see armor_statues:admin for details
#
#
# Description: Sets the Marker tag on all locked armor stands within 128 blocks
# Called by: armor_statues:admin via chat clickEvent
# Entity @s: Player
#
# Note: DisabledSlots tag is checked to exclude armor stands in tool racks
#
# Store number of affected stands for reporting
#
execute store result score @s as_pose run execute if entity @e[type=armor_stand,distance=..128,tag=as_locked,nbt=!{Marker:1b},nbt=!{DisabledSlots:4079166}]
#
# Set Marker tag on affected stands
#
execute as @e[type=armor_stand,distance=..128,tag=as_locked,nbt=!{Marker:1b},nbt=!{DisabledSlots:4079166}] run data merge entity @s {Marker:1b}
#
# Report number affected
#
tellraw @p [{"text":"Marker set on ","color":"aqua"},{"score":{"name":"@s","objective":"as_pose"},"color":"aqua"},{"text":" armor stands","color":"aqua"}]
#
scoreboard players reset @s as_pose

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

View File

@@ -0,0 +1,11 @@
#
# Description: Enable option to make locking match player uuids
# Called by: armor_statues:admin via chat link
# Entity @s: player
#
execute store success score #as_success as_help run data modify storage customizable_armor_stands:settings as_admin.uuid_lock set value "Disabled"
execute unless score #as_success as_help matches 1 run data modify storage customizable_armor_stands:settings as_admin.uuid_lock set value "Enabled"
#
tellraw @s [{"text":"UUID locking has been ","color":"aqua"},{"storage":"customizable_armor_stands:settings", "nbt":"as_admin.uuid_lock"}]
#
function armor_statues:admin