From 45494b0d76d6dfcb17a3ac4770f6ea877ec47669 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 13 Oct 2017 19:21:02 +0100 Subject: [PATCH] Prevent spammy messages when opening chests --- .../src/mineplex/core/treasure/TreasureLocation.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java index 3028d4e42..9893ddcc2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java @@ -31,6 +31,7 @@ import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.hologram.Hologram; import mineplex.core.hologram.Hologram.HologramTarget; import mineplex.core.hologram.HologramManager; +import mineplex.core.recharge.Recharge; import mineplex.core.treasure.types.Treasure; import mineplex.core.treasure.types.TreasureType; import mineplex.core.treasure.ui.TreasureShop; @@ -149,6 +150,11 @@ public class TreasureLocation implements Listener public boolean openChest(Player player, Treasure treasure) { + if (!Recharge.Instance.use(player, "Open Chest", 1000, false, false)) + { + return false; + } + if (inUse()) { player.sendMessage(F.main(getManager().getName(), "This station is already in use."));