Blocksmith logo
NextCoinflip

Developer API

But firstly we need to put this plugin as our depedencies. And how do we do that? Follow the tutorial below.

If you need any help please join our Discord Server.

<dependency>
    <groupId>com.muhammaddaffa</groupId>
    <artifactId>NextCoinflip</artifactId>
    <version>LATEST</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/libs/NextCoinflip.jar</systemPath>
</dependency>

Examples

These are examples on how to use the API.

How to get player's statistic data


private int getWins(Player player) {
    User user = UserRepository.getUser(player);
    CoinflipStatistic statistic = user.getStatistic();
    
    return statistic.getWins();
}