diff --git a/framework/modules/bukkit/bukkit-xseries/build.gradle.kts b/framework/modules/bukkit/bukkit-xseries/build.gradle.kts index 5717ec3c..3ceb6a24 100644 --- a/framework/modules/bukkit/bukkit-xseries/build.gradle.kts +++ b/framework/modules/bukkit/bukkit-xseries/build.gradle.kts @@ -6,7 +6,7 @@ dependencies { compileOnly("org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT") api("io.fairyproject:core-command") - api("com.github.cryptomorin:XSeries:11.2.0.1") + api("com.github.cryptomorin:XSeries:11.2.1") implementation("com.google.code.findbugs:jsr305:3.0.2") } diff --git a/framework/platforms/bukkit-platform/src/main/java/io/fairyproject/bukkit/events/BukkitEventTransformer.java b/framework/platforms/bukkit-platform/src/main/java/io/fairyproject/bukkit/events/BukkitEventTransformer.java index 237fb45e..93cfb1dc 100644 --- a/framework/platforms/bukkit-platform/src/main/java/io/fairyproject/bukkit/events/BukkitEventTransformer.java +++ b/framework/platforms/bukkit-platform/src/main/java/io/fairyproject/bukkit/events/BukkitEventTransformer.java @@ -42,7 +42,13 @@ public void onPreInitialize() { this.bukkitToMC = new ConcurrentHashMap<>(); this.register(AsyncPlayerPreLoginEvent.class, AsyncLoginEvent.class, this::transformAsyncLoginEvent); this.register(PlayerJoinEvent.class, NativePlayerLoginEvent.class, EventPriority.LOWEST, this::transformNativeLoginEvent); - this.register(PlayerJoinEvent.class, MCPlayerJoinEvent.class, event -> new MCPlayerJoinEvent(playerRegistry.getByPlatform(event.getPlayer()))); + this.register(PlayerJoinEvent.class, MCPlayerJoinEvent.class, event -> { + MCPlayer mcPlayer = playerRegistry.findByPlatform(event.getPlayer()); + if (mcPlayer == null) + return null; + + return new MCPlayerJoinEvent(mcPlayer); + }); this.register(PlayerQuitEvent.class, MCPlayerQuitEvent.class, event -> { MCPlayer player = playerRegistry.findByPlatform(event.getPlayer()); if (player == null) { diff --git a/global.properties b/global.properties index 403838b9..e6f80fd6 100644 --- a/global.properties +++ b/global.properties @@ -1 +1 @@ -version = 0.7.8b7-SNAPSHOT \ No newline at end of file +version = 0.7.8b8-SNAPSHOT \ No newline at end of file