Code:
on block place:
If lore of player's tool is "&r ||&8&l> &7Player Block":
set {blockplace::%event-location%} to player
set action bar of player to "&4[PlayerBlocks] &7Block placed successfully"
Alrighty so i am trying to make it so when players place a block that block is then registered to them, this is working properly. Then i tried to make it so these specific registered blocks take more than 1 tnt to explode. This i got working with the example below:
Code:
on explosion:
loop exploded blocks:
if loop-block is glass:
if {explosion::%loop-block%} is not set:
cancel event
set {explosion::%loop-block%} to 1
else:
if {explosion::%loop-block%} < 10:
cancel event
add 1 to {explosion::%loop-block%}
else:
clear {explosion::%loop-block%}
delete {blockplace::%location of loop-block%}
But when i tried to add it in so its only the registered blocks take more than 1 tnt to explode it did not work... which is the example below:
Code:
on explosion:
loop exploded blocks:
if loop-block is glass:
if {blockplace::%event-location%} is set:
if {explosion::%loop-block%} is not set:
cancel event
set {explosion::%loop-block%} to 1
else:
if {explosion::%loop-block%} < 10:
cancel event
add 1 to {explosion::%loop-block%}
else:
clear {explosion::%loop-block%}
delete {blockplace::%location of loop-block%}