mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-23 16:59:33 +00:00
Fix tests
This commit is contained in:
@@ -44,6 +44,7 @@ import org.geysermc.geyser.entity.type.player.SessionPlayerEntity;
|
|||||||
import org.geysermc.geyser.session.GeyserSession;
|
import org.geysermc.geyser.session.GeyserSession;
|
||||||
import org.geysermc.geyser.session.cache.EntityCache;
|
import org.geysermc.geyser.session.cache.EntityCache;
|
||||||
import org.geysermc.geyser.session.cache.WorldCache;
|
import org.geysermc.geyser.session.cache.WorldCache;
|
||||||
|
import org.geysermc.geyser.session.cache.waypoint.WaypointCache;
|
||||||
import org.mockito.stubbing.Answer;
|
import org.mockito.stubbing.Answer;
|
||||||
|
|
||||||
public class GeyserMockContextScoreboard {
|
public class GeyserMockContextScoreboard {
|
||||||
@@ -81,6 +82,9 @@ public class GeyserMockContextScoreboard {
|
|||||||
var worldCache = context.spy(new WorldCache(session));
|
var worldCache = context.spy(new WorldCache(session));
|
||||||
when(session.getWorldCache()).thenReturn(worldCache);
|
when(session.getWorldCache()).thenReturn(worldCache);
|
||||||
|
|
||||||
|
var waypointCache = context.spy(new WaypointCache(session));
|
||||||
|
when(session.getWaypointCache()).thenReturn(waypointCache);
|
||||||
|
|
||||||
// disable global scoreboard updater
|
// disable global scoreboard updater
|
||||||
when(worldCache.increaseAndGetScoreboardPacketsPerSecond()).thenReturn(0);
|
when(worldCache.increaseAndGetScoreboardPacketsPerSecond()).thenReturn(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user