diff options
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/util')
-rw-r--r-- | src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java | 10 | ||||
-rw-r--r-- | src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java (renamed from src/main/java/dev/mayaqq/ygasi/util/GrantAdvancementCriterion.java) | 8 |
2 files changed, 6 insertions, 12 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java b/src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java deleted file mode 100644 index 9b4d4a8..0000000 --- a/src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java +++ /dev/null @@ -1,10 +0,0 @@ -package dev.mayaqq.ygasi.util; - -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.Identifier; - -public class GetAdvancementProgress { - public static boolean get(ServerPlayerEntity player, String advancement) { - return player.getAdvancementTracker().getProgress(player.getServer().getAdvancementLoader().get(new Identifier("minecraft", "ygasi/" + advancement))).isDone(); - } -} diff --git a/src/main/java/dev/mayaqq/ygasi/util/GrantAdvancementCriterion.java b/src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java index c141c06..ba3cfc8 100644 --- a/src/main/java/dev/mayaqq/ygasi/util/GrantAdvancementCriterion.java +++ b/src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java @@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull; import static dev.mayaqq.ygasi.Ygasi.LOGGER; -public class GrantAdvancementCriterion { +public class YgasiUtils { public static void grantAdvancementCriterion(@NotNull ServerPlayerEntity serverPlayerEntity, Identifier advancementIdentifier, String criterion) { if (serverPlayerEntity.getServer() == null) { return; @@ -26,4 +26,8 @@ public class GrantAdvancementCriterion { } } } -} + + public static boolean getAdvancementProgress(ServerPlayerEntity player, String advancement) { + return player.getAdvancementTracker().getProgress(player.getServer().getAdvancementLoader().get(new Identifier("minecraft", "ygasi/" + advancement))).isDone(); + } +}
\ No newline at end of file |