diff --git a/inv-durability/data/durability/functions/display_msg.mcfunction b/inv-durability/data/durability/functions/display_msg.mcfunction index 6069002..122b6aa 100644 --- a/inv-durability/data/durability/functions/display_msg.mcfunction +++ b/inv-durability/data/durability/functions/display_msg.mcfunction @@ -1 +1 @@ -title @s actionbar [{"score":{"name":"@s","objective":"itm.output"}}, {"text":" Warning low durability of elytra/armor!","color":"red", "bold":true}] \ No newline at end of file +title @s actionbar [{"score":{"name":"@s","objective":"itm.output"}}, {"text":" Warning low durability of elytra/armour!","color":"red", "bold":true}] \ No newline at end of file diff --git a/inv-durability/data/durability/functions/init.mcfunction b/inv-durability/data/durability/functions/init.mcfunction index d648025..2ef2541 100644 --- a/inv-durability/data/durability/functions/init.mcfunction +++ b/inv-durability/data/durability/functions/init.mcfunction @@ -2,4 +2,4 @@ scoreboard objectives add itm.info dummy scoreboard objectives add itm.id dummy scoreboard objectives add itm.output dummy scoreboard objectives add itm.min dummy -scoreboard players set @s itm.min 20 \ No newline at end of file +scoreboard players set @a itm.min 20 \ No newline at end of file diff --git a/inv-durability/data/durability/functions/main.mcfunction b/inv-durability/data/durability/functions/main.mcfunction index 70c03da..6614e6c 100644 --- a/inv-durability/data/durability/functions/main.mcfunction +++ b/inv-durability/data/durability/functions/main.mcfunction @@ -1,6 +1,3 @@ execute as @a store result score @s itm.info run data get entity @s Inventory[{Slot:102b}].tag.Damage 1 execute as @a if data entity @s Inventory[{Slot:102b}].tag.Damage run function durability:update -# execute as @a if data entity @s Inventory[{Slot:102b}].tag.Damage run title @s actionbar [{"score":{"name":"@s","objective":"itm.output"}}] -#execute as @a if score @s itm.output < @s itm.min run function durability:display_msg -execute as @a if score @s itm.output < @s itm.min if data entity @s Inventory[{Slot:102b}].tag.Damage run function durability:display_msg -#execute as @a unless score @s itm.output < @s itm.min run title @s actionbar {"text":" "} \ No newline at end of file +execute as @a if score @s itm.output < @s itm.min if data entity @s Inventory[{Slot:102b}].tag.Damage run function durability:display_msg \ No newline at end of file diff --git a/inv-durability/pack.mcmeta b/inv-durability/pack.mcmeta index 09cc60e..e8fec32 100644 --- a/inv-durability/pack.mcmeta +++ b/inv-durability/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { "pack_format": 4, - "description": "Elytra Armor Durability" + "description": "Elytra Armour Durability" } } \ No newline at end of file