variables:
{%player%.compress} = true
command autocompressortoggle:
aliases: /act, /autocompt, /comptoggle, /toggleac
permission: autocomp.comp
permission message: &cBuy the voucher in shops!
cooldown: 3 seconds
cooldown bypass: op
cooldown message: &cPlease wait %remaining time% before using this command again!
trigger:
if {%player%.compress} is true:
set {%player%.compress} to false
send "&cAuto-Compressor is now set to %{%player%.compress}%!"
else if {%player%.compress} is false:
set {%player%.compress} to true
send "&aAuto-Compressor is now set to %{%player%.compress}%!"
every 0.1 second:
loop all players:
if loop-player has conduit named "&6Auto-Compressor":
if {%loop-player%.compress} is true:
if loop-player has 64 diamond:
remove 64 diamond from loop-player
give loop-player 1 diamond block of mending 1 with all flags hidden named "&6&lCompressed Diamonds" with lore "&7[Holds 64 diamonds]"
else if loop-player has 64 netherite ingot:
remove 64 netherite ingot from loop-player
give loop-player 1 netherite block of mending 1 with all flags hidden named "&6&lCompressed Netherite Ingots" with lore "&7[Holds 64 netherite ingots]"
else if loop-player has 64 iron ingot:
remove 64 iron ingot from loop-player
give loop-player 1 iron block of mending 1 with all flags hidden named "&6&lCompressed Iron Ingots" with lore "&7[Holds 64 iron ingots]"
else if loop-player has 64 gold ingot:
remove 64 gold ingot from loop-player
give loop-player 1 gold block of mending 1 with all flags hidden named "&6&lCompressed Gold Ingots" with lore "&7[Holds 64 gold ingots]"
else if loop-player has 64 emerald:
remove 64 emerald from loop-player
give loop-player 1 emerald block of mending 1 with all flags hidden named "&6&lCompressed Emeralds" with lore "&7[Holds 64 emeralds]"
else if loop-player has 64 lapis lazuli:
remove 64 lapis lazuli from loop-player
give loop-player 1 block of lapis lazuli of mending 1 with all flags hidden named "&6&lCompressed Lapis" with lore "&7[Holds 64 lapis lazuli]"
else if loop-player has 64 redstone:
remove 64 redstone from loop-player
give loop-player 1 redstone block of mending 1 with all flags hidden named "&6&lCompressed Redstone" with lore "&7[Holds 64 redstone]"