From a766b780cb53035519273eeda92d99614f83a650 Mon Sep 17 00:00:00 2001 From: Esophose Date: Thu, 7 Feb 2019 01:19:38 -0700 Subject: [PATCH] Bump version to 1.0.11, minor fix --- .gitlab-ci.yml | 2 +- .../treefall/NoAnimationTreeDestroyer.java | 11 ----------- .../ultimatetimber/treefall/TreeFallAnimation.java | 5 +++-- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1bd1a5c..820d925 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "UltimateTimber" path: "/builds/$CI_PROJECT_PATH" - version: "1.0.10" + version: "1.0.11" build: stage: build diff --git a/src/main/java/com/songoda/ultimatetimber/treefall/NoAnimationTreeDestroyer.java b/src/main/java/com/songoda/ultimatetimber/treefall/NoAnimationTreeDestroyer.java index 5121e47..17624db 100644 --- a/src/main/java/com/songoda/ultimatetimber/treefall/NoAnimationTreeDestroyer.java +++ b/src/main/java/com/songoda/ultimatetimber/treefall/NoAnimationTreeDestroyer.java @@ -1,10 +1,8 @@ package com.songoda.ultimatetimber.treefall; import java.util.HashSet; -import java.util.Set; import java.util.stream.Collectors; -import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.inventory.ItemStack; @@ -22,15 +20,9 @@ class NoAnimationTreeDestroyer { } else if (!blocks.stream().filter(b -> b.getType() == Material.RED_MUSHROOM_BLOCK).collect(Collectors.toList()).isEmpty()) { leavesType = Material.RED_MUSHROOM_BLOCK; } - - // DEBUG ---- REMOVE - Set uniqueBlocks = new HashSet<>(); // Drop loot and plant a new sapling for (Block block : blocks) { - if (!uniqueBlocks.contains(block) && block.getType().name().contains("LOG")) - uniqueBlocks.add(block); - TreeLoot.dropTreeLoot(block.getBlockData(), block.getLocation().clone().add(0.5, 0.5, 0.5), hasBonusLoot, hasSilkTouch); if (leavesType != null) { @@ -39,9 +31,6 @@ class NoAnimationTreeDestroyer { TreeReplant.replaceOriginalBlock(block); } } - - // DEBUG ---- REMOVE - Bukkit.broadcastMessage(uniqueBlocks.size() + ""); } static ItemStack getItem(Material material) { diff --git a/src/main/java/com/songoda/ultimatetimber/treefall/TreeFallAnimation.java b/src/main/java/com/songoda/ultimatetimber/treefall/TreeFallAnimation.java index 56670ae..c3297d8 100644 --- a/src/main/java/com/songoda/ultimatetimber/treefall/TreeFallAnimation.java +++ b/src/main/java/com/songoda/ultimatetimber/treefall/TreeFallAnimation.java @@ -97,9 +97,10 @@ public class TreeFallAnimation implements Listener, Runnable { } private void unregisterTreeFallAnimation() { - if (this.fallingBlocks.isEmpty()) + if (this.fallingBlocks.isEmpty()) { treeFallAnimationInstances.remove(this); - Bukkit.getScheduler().cancelTask(this.fallingBlockTaskId); + Bukkit.getScheduler().cancelTask(this.fallingBlockTaskId); + } } /*