Aggro area: only add a timer if the time left isn't negative

This commit is contained in:
Lucas
2019-05-02 22:00:17 +02:00
committed by Lucas
parent c0a72da84a
commit 6eea009094

View File

@@ -394,7 +394,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);
}