File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
src/main/java/com/github/pozzoo/quicktree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ public void onBlockBreak(BlockBreakEvent event) {
2323 Location location = event .getBlock ().getLocation ();
2424
2525 QuickTree .getInstance ().getWoodManager ().checkAround (location );
26+
27+ event .getPlayer ().getInventory ().getItemInMainHand ().damage (QuickTree .getInstance ().getWoodManager ().getTreeModelSet ().size (), event .getPlayer ());
28+
29+ QuickTree .getInstance ().getWoodManager ().destroyTree ();
2630 }
2731
2832}
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ private void warmupCoords() {
5151 coordsVector .add (new Vector (-1 , 0 , 1 ));
5252 }
5353
54+ public Set <Location > getTreeModelSet () {return treeModel ; }
55+
5456 public boolean isWoodenLogs (Material material ) {
5557 return this .woods .contains (material );
5658 }
@@ -133,8 +135,6 @@ public void run() {
133135 }
134136 }
135137 }.runTaskTimer (QuickTree .getInstance (), 0 , 1 );
136-
137- destroyTree ();
138138 }
139139
140140 private void explodeBlocks () {
You can’t perform that action at this time.
0 commit comments