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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user