From 55e6ca2d41c0758d13a56ab8844aa1fa6e177187 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 19 Jan 2023 13:36:16 -0500 Subject: [PATCH] Error message when claiming a mine fails. --- src/engine/powers/poweractions/ClaimMinePowerAction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/powers/poweractions/ClaimMinePowerAction.java b/src/engine/powers/poweractions/ClaimMinePowerAction.java index a56c301e..0742bc7d 100644 --- a/src/engine/powers/poweractions/ClaimMinePowerAction.java +++ b/src/engine/powers/poweractions/ClaimMinePowerAction.java @@ -10,6 +10,7 @@ package engine.powers.poweractions; import engine.Enum; +import engine.gameManager.ChatManager; import engine.math.Vector3fImmutable; import engine.objects.*; import engine.powers.ActionsBase; @@ -46,7 +47,8 @@ public class ClaimMinePowerAction extends AbstractPowerAction { if (mine == null) return; - mine.claimMine((PlayerCharacter) source); + if (mine.claimMine((PlayerCharacter) source) == false) + ChatManager.sendSystemMessage( (PlayerCharacter) source, "Your attempt for to claim this mine failed."); } @Override