mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 19:47:49 +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))
|
||||
);
|
||||
|
||||
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",
|
||||
player -> time.apply(SessionsMutator.forContainer(player)
|
||||
.toActivePlaytime())
|
||||
@ -207,25 +231,5 @@ public class PlayerPlaceHolders implements Placeholders {
|
||||
.filterPlayedOnServer(serverInfo.getServerUUID())
|
||||
.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(),
|
||||
new Locale(),
|
||||
dbSystem(),
|
||||
new QuerySvc(dbSystem(), serverInfo(), null),
|
||||
new QuerySvc(config(), dbSystem(), serverInfo(), null),
|
||||
serverInfo(),
|
||||
logger,
|
||||
null
|
||||
|
Loading…
Reference in New Issue
Block a user