diff options
author | Maximusbarcz <maxim.baranek@gmail.com> | 2023-01-09 21:48:21 +0100 |
---|---|---|
committer | Maximusbarcz <maxim.baranek@gmail.com> | 2023-01-09 21:48:21 +0100 |
commit | 5f1004168668f12f41c6deb9f026041373d45ba1 (patch) | |
tree | dc8d1d539726347d976ae8a171280ad22a5bd807 /src/main/java/dev/mayaqq/ygasi/util | |
parent | ab1ddc8e008ed93392ea3918da1d669dd1b4822c (diff) | |
download | ygasi-5f1004168668f12f41c6deb9f026041373d45ba1.tar.gz ygasi-5f1004168668f12f41c6deb9f026041373d45ba1.tar.bz2 ygasi-5f1004168668f12f41c6deb9f026041373d45ba1.zip |
Its a frog, frog in a blender! And also other stuff I guess
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/util')
-rw-r--r-- | src/main/java/dev/mayaqq/ygasi/util/AdvUtils.java (renamed from src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java) | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java b/src/main/java/dev/mayaqq/ygasi/util/AdvUtils.java index 1c3b267..b2227fe 100644 --- a/src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java +++ b/src/main/java/dev/mayaqq/ygasi/util/AdvUtils.java @@ -5,17 +5,16 @@ import net.minecraft.advancement.PlayerAdvancementTracker; import net.minecraft.server.ServerAdvancementLoader; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.Identifier; -import org.jetbrains.annotations.NotNull; import static dev.mayaqq.ygasi.Ygasi.LOGGER; -public class YgasiUtils { - public static void grantAdvancementCriterion(@NotNull ServerPlayerEntity serverPlayerEntity, Identifier advancementIdentifier, String criterion) { - if (serverPlayerEntity.getServer() == null) { +public class AdvUtils { + public static void grantAdvancementCriterion(ServerPlayerEntity player, Identifier advancementIdentifier, String criterion) { + if (player.getServer() == null) { return; } - ServerAdvancementLoader sal = serverPlayerEntity.getServer().getAdvancementLoader(); - PlayerAdvancementTracker tracker = serverPlayerEntity.getAdvancementTracker(); + ServerAdvancementLoader sal = player.getServer().getAdvancementLoader(); + PlayerAdvancementTracker tracker = player.getAdvancementTracker(); Advancement advancement = sal.get(advancementIdentifier); if (advancement == null) { |