timers: Remove cannon timer when cannon is destroyed

This commit is contained in:
Alexsuperfly
2021-01-24 17:26:50 -05:00
committed by Jordan Atwood
parent 8541ce6667
commit 5a529568d6

View File

@@ -89,6 +89,7 @@ public class TimersPlugin extends Plugin
private static final String CANNON_FURNACE_MESSAGE = "You add the furnace.";
private static final String CANNON_PICKUP_MESSAGE = "You pick up the cannon. It's really heavy.";
private static final String CANNON_REPAIR_MESSAGE = "You repair your cannon, restoring it to working order.";
private static final String CANNON_DESTROYED_MESSAGE = "Your cannon has been destroyed!";
private static final String CHARGE_EXPIRED_MESSAGE = "<col=ef1020>Your magical charge fades away.</col>";
private static final String CHARGE_MESSAGE = "<col=ef1020>You feel charged with magic power.</col>";
private static final String EXTENDED_ANTIFIRE_DRINK_MESSAGE = "You drink some of your extended antifire potion.";
@@ -517,7 +518,7 @@ public class TimersPlugin extends Plugin
cannonTimer.setTooltip(cannonTimer.getTooltip() + " - World " + client.getWorld());
}
if (config.showCannon() && message.equals(CANNON_PICKUP_MESSAGE))
if (config.showCannon() && (message.equals(CANNON_PICKUP_MESSAGE) || message.equals(CANNON_DESTROYED_MESSAGE)))
{
removeGameTimer(CANNON);
}