Prevent spammy messages when opening chests
This commit is contained in:
parent
051a0f8809
commit
45494b0d76
@ -31,6 +31,7 @@ import mineplex.core.common.util.UtilTextMiddle;
|
|||||||
import mineplex.core.hologram.Hologram;
|
import mineplex.core.hologram.Hologram;
|
||||||
import mineplex.core.hologram.Hologram.HologramTarget;
|
import mineplex.core.hologram.Hologram.HologramTarget;
|
||||||
import mineplex.core.hologram.HologramManager;
|
import mineplex.core.hologram.HologramManager;
|
||||||
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.core.treasure.types.Treasure;
|
import mineplex.core.treasure.types.Treasure;
|
||||||
import mineplex.core.treasure.types.TreasureType;
|
import mineplex.core.treasure.types.TreasureType;
|
||||||
import mineplex.core.treasure.ui.TreasureShop;
|
import mineplex.core.treasure.ui.TreasureShop;
|
||||||
@ -149,6 +150,11 @@ public class TreasureLocation implements Listener
|
|||||||
|
|
||||||
public boolean openChest(Player player, Treasure treasure)
|
public boolean openChest(Player player, Treasure treasure)
|
||||||
{
|
{
|
||||||
|
if (!Recharge.Instance.use(player, "Open Chest", 1000, false, false))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (inUse())
|
if (inUse())
|
||||||
{
|
{
|
||||||
player.sendMessage(F.main(getManager().getName(), "This station is already in use."));
|
player.sendMessage(F.main(getManager().getName(), "This station is already in use."));
|
||||||
|
Loading…
Reference in New Issue
Block a user