Merge pull request #8708 from Lucwousin/aggro

Aggro area: only add a timer if the time left isn't negative
This commit is contained in:
Tomas Slusny
2019-05-03 12:12:40 +02:00
committed by GitHub

View File

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