Search in sources :

Example 1 with PlayerData

use of com.griefdefender.api.data.PlayerData in project Almura by AlmuraDev.

the class ServerClaimManager method claimTaxRate.

public double claimTaxRate(final Claim claim) {
    if (claim != null) {
        PlayerData playerData = GriefDefender.getCore().getPlayerData(claim.getWorldUniqueId(), claim.getOwnerUniqueId());
        final double taxRate = playerData.getTaxRate(claim.getType());
        return taxRate;
    }
    return 0;
}
Also used : PlayerData(com.griefdefender.api.data.PlayerData)

Example 2 with PlayerData

use of com.griefdefender.api.data.PlayerData in project Almura by AlmuraDev.

the class ServerClaimManager method claimTaxes.

public double claimTaxes(final Claim claim) {
    if (claim != null) {
        PlayerData playerData = GriefDefender.getCore().getPlayerData(claim.getWorldUniqueId(), claim.getOwnerUniqueId());
        final double taxRate = playerData.getTaxRate(claim.getType());
        final double taxOwed = claim.getClaimBlocks() * taxRate;
        return taxOwed;
    }
    return 0;
}
Also used : PlayerData(com.griefdefender.api.data.PlayerData)

Aggregations

PlayerData (com.griefdefender.api.data.PlayerData)2