From 0681a5052dbda05792d2735b6e4e01bb2152639a Mon Sep 17 00:00:00 2001 From: Brianna Date: Thu, 16 Apr 2020 03:50:00 -0400 Subject: [PATCH] Don't drop an inf anchor when "ALLOW_ANCHOR_BREAKING" is enabled. --- src/main/java/com/songoda/epicanchors/anchor/Anchor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/epicanchors/anchor/Anchor.java b/src/main/java/com/songoda/epicanchors/anchor/Anchor.java index 489bbaf..d6cc5d4 100644 --- a/src/main/java/com/songoda/epicanchors/anchor/Anchor.java +++ b/src/main/java/com/songoda/epicanchors/anchor/Anchor.java @@ -3,6 +3,7 @@ package com.songoda.epicanchors.anchor; import com.songoda.core.compatibility.ServerVersion; import com.songoda.core.hooks.EconomyManager; import com.songoda.epicanchors.EpicAnchors; +import com.songoda.epicanchors.settings.Settings; import org.bukkit.*; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; @@ -59,7 +60,7 @@ public class Anchor { public void bust() { EpicAnchors plugin = EpicAnchors.getInstance(); - if (plugin.getConfig().getBoolean("Main.Allow Anchor Breaking")) { + if (Settings.ALLOW_ANCHOR_BREAKING.getBoolean() && getTicksLeft() > 0) { ItemStack item = plugin.makeAnchorItem(getTicksLeft()); getLocation().getWorld().dropItemNaturally(getLocation(), item); }