Search in sources :

Example 1 with NukkitAFKListener

use of com.djrapitops.plan.gathering.listeners.nukkit.NukkitAFKListener in project Plan by plan-player-analytics.

the class NukkitAFKListenerTest method setUp.

@BeforeAll
static void setUp() {
    PlanConfig config = Mockito.mock(PlanConfig.class);
    when(config.get(TimeSettings.AFK_THRESHOLD)).thenReturn(TimeUnit.MINUTES.toMillis(3));
    errorLogger = Mockito.mock(ErrorLogger.class);
    underTest = new NukkitAFKListener(config, errorLogger);
    new SessionCache().cacheSession(TestConstants.PLAYER_ONE_UUID, new ActiveSession(null, null, 0, null, null));
    new SessionCache().cacheSession(TestConstants.PLAYER_TWO_UUID, new ActiveSession(null, null, 0, null, null));
}
Also used : ActiveSession(com.djrapitops.plan.gathering.domain.ActiveSession) NukkitAFKListener(com.djrapitops.plan.gathering.listeners.nukkit.NukkitAFKListener) SessionCache(com.djrapitops.plan.gathering.cache.SessionCache) PlanConfig(com.djrapitops.plan.settings.config.PlanConfig) ErrorLogger(com.djrapitops.plan.utilities.logging.ErrorLogger) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

SessionCache (com.djrapitops.plan.gathering.cache.SessionCache)1 ActiveSession (com.djrapitops.plan.gathering.domain.ActiveSession)1 NukkitAFKListener (com.djrapitops.plan.gathering.listeners.nukkit.NukkitAFKListener)1 PlanConfig (com.djrapitops.plan.settings.config.PlanConfig)1 ErrorLogger (com.djrapitops.plan.utilities.logging.ErrorLogger)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1