diff options
| author | Maximusbarcz <maxim.baranek@gmail.com> | 2023-01-15 18:40:24 +0100 |
|---|---|---|
| committer | Maximusbarcz <maxim.baranek@gmail.com> | 2023-01-15 18:40:24 +0100 |
| commit | d115e4365d0a5a492a55e56a7a4dcf034419e1b4 (patch) | |
| tree | e9aec4f8b180c4a6b90d194f31e95a8df8863bb4 /src/main/java/dev/mayaqq/ygasi/events | |
| parent | 5bcb1830298caad87a63f44c4e7f1553074cf4c8 (diff) | |
| download | ygasi-d115e4365d0a5a492a55e56a7a4dcf034419e1b4.tar.gz ygasi-d115e4365d0a5a492a55e56a7a4dcf034419e1b4.tar.bz2 ygasi-d115e4365d0a5a492a55e56a7a4dcf034419e1b4.zip | |
More stuff! The Mercenary gui is basically done other than the translations, I tried and failed to add modrinth publishing thing to gradle, I redid some stuff, I added stuff, I removed stuff and mainly... I broke the reset command (it works but says it broke) and I have no idea how to fix it!
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/events')
| -rw-r--r-- | src/main/java/dev/mayaqq/ygasi/events/PlayerConnectEvent.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/events/PlayerConnectEvent.java b/src/main/java/dev/mayaqq/ygasi/events/PlayerConnectEvent.java index 34f5f46..52b3047 100644 --- a/src/main/java/dev/mayaqq/ygasi/events/PlayerConnectEvent.java +++ b/src/main/java/dev/mayaqq/ygasi/events/PlayerConnectEvent.java @@ -2,17 +2,16 @@ package dev.mayaqq.ygasi.events; import dev.mayaqq.ygasi.registry.ConfigRegistry; import dev.mayaqq.ygasi.util.AdvUtils; -import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils; import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; import net.minecraft.item.ItemStack; import net.minecraft.util.Identifier; -import static dev.mayaqq.ygasi.Ygasi.LOGGER; import static dev.mayaqq.ygasi.registry.ItemRegistry.SKILL_BOOK; public class PlayerConnectEvent { public static void onPlayerConnect() { ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { + //if the player has not joined yet, they will get a skill book if the option is turned on if (!handler.player.getScoreboardTags().contains("skill_book_unlocked") && ConfigRegistry.CONFIG.enableSkillBook) { handler.player.addScoreboardTag("skill_book_unlocked"); handler.player.getInventory().offerOrDrop(new ItemStack(SKILL_BOOK)); |
