mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-28 12:07:35 +01:00
Fixed build errors
This commit is contained in:
parent
edddccf329
commit
6758a56167
@ -136,6 +136,30 @@ public class PlayerPlaceHolders implements Placeholders {
|
|||||||
.orElse((long) 0))
|
.orElse((long) 0))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
registerPlaytimePlaceholders(placeholders, time);
|
||||||
|
|
||||||
|
placeholders.register("player_favorite_server",
|
||||||
|
player -> PerServerMutator.forContainer(player).favoriteServer()
|
||||||
|
.flatMap(serverUUID -> dbSystem.getDatabase().query(ServerQueries.fetchServerMatchingIdentifier(serverUUID)))
|
||||||
|
.map(Server::getName)
|
||||||
|
.orElse("-")
|
||||||
|
);
|
||||||
|
|
||||||
|
placeholders.register("player_activity_index",
|
||||||
|
player -> player.getActivityIndex(
|
||||||
|
now(),
|
||||||
|
config.get(TimeSettings.ACTIVE_PLAY_THRESHOLD)
|
||||||
|
).getValue()
|
||||||
|
);
|
||||||
|
placeholders.register("player_activity_group",
|
||||||
|
player -> player.getActivityIndex(
|
||||||
|
now(),
|
||||||
|
config.get(TimeSettings.ACTIVE_PLAY_THRESHOLD)
|
||||||
|
).getGroup()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void registerPlaytimePlaceholders(PlanPlaceholders placeholders, Formatter<Long> time) {
|
||||||
placeholders.register("player_time_active",
|
placeholders.register("player_time_active",
|
||||||
player -> time.apply(SessionsMutator.forContainer(player)
|
player -> time.apply(SessionsMutator.forContainer(player)
|
||||||
.toActivePlaytime())
|
.toActivePlaytime())
|
||||||
@ -207,25 +231,5 @@ public class PlayerPlaceHolders implements Placeholders {
|
|||||||
.filterPlayedOnServer(serverInfo.getServerUUID())
|
.filterPlayedOnServer(serverInfo.getServerUUID())
|
||||||
.toPlaytime())
|
.toPlaytime())
|
||||||
);
|
);
|
||||||
|
|
||||||
placeholders.register("player_favorite_server",
|
|
||||||
player -> PerServerMutator.forContainer(player).favoriteServer()
|
|
||||||
.flatMap(serverUUID -> dbSystem.getDatabase().query(ServerQueries.fetchServerMatchingIdentifier(serverUUID)))
|
|
||||||
.map(Server::getName)
|
|
||||||
.orElse("-")
|
|
||||||
);
|
|
||||||
|
|
||||||
placeholders.register("player_activity_index",
|
|
||||||
player -> player.getActivityIndex(
|
|
||||||
now(),
|
|
||||||
config.get(TimeSettings.ACTIVE_PLAY_THRESHOLD)
|
|
||||||
).getValue()
|
|
||||||
);
|
|
||||||
placeholders.register("player_activity_group",
|
|
||||||
player -> player.getActivityIndex(
|
|
||||||
now(),
|
|
||||||
config.get(TimeSettings.ACTIVE_PLAY_THRESHOLD)
|
|
||||||
).getGroup()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ public interface DatabaseTest extends DatabaseTestPreparer {
|
|||||||
config(),
|
config(),
|
||||||
new Locale(),
|
new Locale(),
|
||||||
dbSystem(),
|
dbSystem(),
|
||||||
new QuerySvc(dbSystem(), serverInfo(), null),
|
new QuerySvc(config(), dbSystem(), serverInfo(), null),
|
||||||
serverInfo(),
|
serverInfo(),
|
||||||
logger,
|
logger,
|
||||||
null
|
null
|
||||||
|
Loading…
Reference in New Issue
Block a user