timer plugin: remove tb timer when opponent dies

This commit is contained in:
rlw0014
2019-07-29 15:43:34 -04:00
committed by Adam
parent ac8e0dd85d
commit 627b9904b5

View File

@@ -105,6 +105,7 @@ public class TimersPlugin extends Plugin
private static final String SUPER_ANTIFIRE_DRINK_MESSAGE = "You drink some of your super antifire potion";
private static final String SUPER_ANTIFIRE_EXPIRED_MESSAGE = "<col=7f007f>Your super antifire potion has expired.</col>";
private static final String SUPER_ANTIVENOM_DRINK_MESSAGE = "You drink some of your super antivenom potion";
private static final String KILLED_TELEBLOCK_OPPONENT_TEXT = "<col=4f006f>Your Tele Block has been removed because you killed ";
private static final Pattern DEADMAN_HALF_TELEBLOCK_PATTERN = Pattern.compile("<col=4f006f>A Tele Block spell has been cast on you by (.+)\\. It will expire in 1 minute, 15 seconds\\.</col>");
private static final Pattern FULL_TELEBLOCK_PATTERN = Pattern.compile("<col=4f006f>A Tele Block spell has been cast on you by (.+)\\. It will expire in 5 minutes, 0 seconds\\.</col>");
@@ -558,6 +559,10 @@ public class TimersPlugin extends Plugin
{
createGameTimer(DMM_HALFTB);
}
else if (event.getMessage().startsWith(KILLED_TELEBLOCK_OPPONENT_TEXT))
{
removeTbTimers();
}
}
if (config.showAntiFire() && event.getMessage().contains(SUPER_ANTIFIRE_DRINK_MESSAGE))