aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/mayaqq/ygasi/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/events')
-rw-r--r--src/main/java/dev/mayaqq/ygasi/events/PlayerConnectEvent.java3
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));