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