Merge pull request #164 from Lucwousin/imagine_counting_down_from_-1000

Stop aggroarea from creating a timer if the duration is negative
This commit is contained in:
Ganom
2019-05-01 15:40:40 -04:00
committed by GitHub

View File

@@ -404,7 +404,7 @@ public class NpcAggroAreaPlugin extends Plugin
lastPlayerLocation = configManager.getConfiguration(NpcAggroAreaConfig.CONFIG_GROUP, NpcAggroAreaConfig.CONFIG_LOCATION, WorldPoint.class);
Duration timeLeft = configManager.getConfiguration(NpcAggroAreaConfig.CONFIG_GROUP, NpcAggroAreaConfig.CONFIG_DURATION, Duration.class);
if (timeLeft != null)
if (timeLeft != null && !timeLeft.isNegative())
{
createTimer(timeLeft);
}