aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java')
-rw-r--r--src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java
new file mode 100644
index 0000000..39241aa
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java
@@ -0,0 +1,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");
+ }
+ }
+}