Search in sources :

Example 1 with BukkitAFKListener

use of com.djrapitops.plan.gathering.listeners.bukkit.BukkitAFKListener in project Plan by plan-player-analytics.

the class BukkitAFKListenerTest 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 BukkitAFKListener(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) BukkitAFKListener(com.djrapitops.plan.gathering.listeners.bukkit.BukkitAFKListener) 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 BukkitAFKListener (com.djrapitops.plan.gathering.listeners.bukkit.BukkitAFKListener)1 PlanConfig (com.djrapitops.plan.settings.config.PlanConfig)1 ErrorLogger (com.djrapitops.plan.utilities.logging.ErrorLogger)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1