Code:
on break of any log:
if {timber::%player%} is true:
if player is holding axe:
loop blocks upwards:
if loop-block is any log:
drop loop-block-1 at event-block
set loop-block to air
loop blocks in radius 3 around loop-block:
if loop-block-2 is any log:
drop loop-block-2 at event-block
set loop-block-2 to air
add 2 to the player's held item's damage
loop blocks below:
if loop-block is any log:
drop loop-block-1 at event-block
set loop-block to air
loop blocks in radius 3 around loop-block:
if loop-block-2 is log:
drop loop-block-2 at event-block
set loop-block-2 to air
on break of any wood:
if {timber::%player%} is true:
if player is holding axe:
loop blocks upwards:
if loop-block is any log:
drop loop-block-1 at event-block
set loop-block to air
loop blocks in radius 3 around loop-block:
if loop-block-2 is any log:
drop loop-block-2 at event-block
set loop-block-2 to air
add 2 to the player's held item's damage
loop blocks below:
if loop-block is any log:
drop loop-block-1 at event-block
set loop-block to air
loop blocks in radius 3 around loop-block:
if loop-block-2 is log:
drop loop-block-2 at event-block
set loop-block-2 to air
These are my current arguments for when a player goes up to a tree to use the plugin, currently what seems to happen is when the player has timber mode on, it will allow their axe to go into negative durability, but once they disable timber and try to break a tree the axe disappears.
Would greatly appreciate any kind of code line that can help me get the tool to break if it reaches 0 durability.