Search in sources :

Example 1 with DatabasePlayerCTF

use of com.ebicep.warlords.database.repositories.player.pojos.ctf.DatabasePlayerCTF in project Warlords by ebicep.

the class LeaderboardCTF method addExtraLeaderboards.

@Override
public void addExtraLeaderboards(LeaderboardCategory<DatabasePlayerCTF> leaderboardCategory) {
    List<Leaderboard> leaderboards = leaderboardCategory.getLeaderboards();
    leaderboards.add(new Leaderboard("Flags Captured", new Location(world, -2540.5, 56, 712.5), databasePlayer -> leaderboardCategory.statFunction.apply(databasePlayer).getFlagsCaptured(), databasePlayer -> NumberFormat.addCommaAndRound(leaderboardCategory.statFunction.apply(databasePlayer).getFlagsCaptured())));
    leaderboards.add(new Leaderboard("Flags Returned", new Location(world, -2608.5, 52, 737.5), databasePlayer -> leaderboardCategory.statFunction.apply(databasePlayer).getFlagsReturned(), databasePlayer -> NumberFormat.addCommaAndRound(leaderboardCategory.statFunction.apply(databasePlayer).getFlagsReturned())));
    leaderboards.add(new Leaderboard("Mage Experience", new Location(world, -2523.5, 58, 734.5), databasePlayer -> leaderboardCategory.statFunction.apply(databasePlayer).getMage().getExperience(), databasePlayer -> NumberFormat.addCommaAndRound(leaderboardCategory.statFunction.apply(databasePlayer).getMage().getExperience())));
    leaderboards.add(new Leaderboard("Warrior Experience", new Location(world, -2520.5, 58, 739.5), databasePlayer -> leaderboardCategory.statFunction.apply(databasePlayer).getWarrior().getExperience(), databasePlayer -> NumberFormat.addCommaAndRound(leaderboardCategory.statFunction.apply(databasePlayer).getWarrior().getExperience())));
    leaderboards.add(new Leaderboard("Paladin Experience", new Location(world, -2516.5, 58, 744.5), databasePlayer -> leaderboardCategory.statFunction.apply(databasePlayer).getPaladin().getExperience(), databasePlayer -> NumberFormat.addCommaAndRound(leaderboardCategory.statFunction.apply(databasePlayer).getPaladin().getExperience())));
    leaderboards.add(new Leaderboard("Shaman Experience", new Location(world, -2520.5, 58, 749.5), databasePlayer -> leaderboardCategory.statFunction.apply(databasePlayer).getShaman().getExperience(), databasePlayer -> NumberFormat.addCommaAndRound(leaderboardCategory.statFunction.apply(databasePlayer).getShaman().getExperience())));
    leaderboards.add(new Leaderboard("Rogue Experience", new Location(world, -2523.5, 58, 754.5), databasePlayer -> leaderboardCategory.statFunction.apply(databasePlayer).getRogue().getExperience(), databasePlayer -> NumberFormat.addCommaAndRound(leaderboardCategory.statFunction.apply(databasePlayer).getRogue().getExperience())));
}
Also used : DatabasePlayerCTF(com.ebicep.warlords.database.repositories.player.pojos.ctf.DatabasePlayerCTF) List(java.util.List) Location(org.bukkit.Location) LeaderboardGameType(com.ebicep.warlords.database.leaderboards.sections.LeaderboardGameType) LeaderboardCategory(com.ebicep.warlords.database.leaderboards.sections.LeaderboardCategory) DatabasePlayer(com.ebicep.warlords.database.repositories.player.pojos.general.DatabasePlayer) NumberFormat(com.ebicep.warlords.util.java.NumberFormat) Leaderboard(com.ebicep.warlords.database.leaderboards.Leaderboard) Leaderboard(com.ebicep.warlords.database.leaderboards.Leaderboard) Location(org.bukkit.Location)

Aggregations

Leaderboard (com.ebicep.warlords.database.leaderboards.Leaderboard)1 LeaderboardCategory (com.ebicep.warlords.database.leaderboards.sections.LeaderboardCategory)1 LeaderboardGameType (com.ebicep.warlords.database.leaderboards.sections.LeaderboardGameType)1 DatabasePlayerCTF (com.ebicep.warlords.database.repositories.player.pojos.ctf.DatabasePlayerCTF)1 DatabasePlayer (com.ebicep.warlords.database.repositories.player.pojos.general.DatabasePlayer)1 NumberFormat (com.ebicep.warlords.util.java.NumberFormat)1 List (java.util.List)1 Location (org.bukkit.Location)1