aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java
blob: 39241aaa04fb623e18767292eba636094db2c13d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package dev.mayaqq.ygasi.abilities.mercenary;

import dev.mayaqq.ygasi.util.AdvUtils;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;

public class Defence3 {
    public static void give(ServerPlayerEntity player) {
        if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/defence3")) {
            AdvUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/defence3"), "unlocked_defence3");
        }
    }
    public static void revoke(ServerPlayerEntity player) {
        if (AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/defence3")) {
            AdvUtils.revokeAllAdvancements(player, "minecraft", "ygasi/defence3");
        }
    }
}