diff --git a/build.gradle.kts b/build.gradle.kts index 09b05d4fe..58856554b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } group = "com.github.shynixn" -version = "9.11.1" +version = "9.12.0" repositories { mavenCentral() @@ -46,8 +46,8 @@ dependencies { // Custom dependencies implementation("com.github.shynixn.shygui:shygui:1.0.0") - implementation("com.github.shynixn.mcutils:common:2024.19") - implementation("com.github.shynixn.mcutils:packet:2024.32") + implementation("com.github.shynixn.mcutils:common:2024.21") + implementation("com.github.shynixn.mcutils:packet:2024.33") implementation("com.github.shynixn.mcutils:database:2024.2") implementation("com.github.shynixn.mcutils:pathfinder:2024.3") implementation("com.github.shynixn.mcutils:guice:2024.2") diff --git a/src/main/java/com/github/shynixn/petblocks/impl/PetImpl.kt b/src/main/java/com/github/shynixn/petblocks/impl/PetImpl.kt index aed5a919c..f32b76d10 100644 --- a/src/main/java/com/github/shynixn/petblocks/impl/PetImpl.kt +++ b/src/main/java/com/github/shynixn/petblocks/impl/PetImpl.kt @@ -519,11 +519,16 @@ class PetImpl( return false } - val sourceLocation = this.location - location.world = sourceLocation.world - val distanceBetweenLocations = location.distance(sourceLocation) + try { + val sourceLocation = this.location + location.world = sourceLocation.world + val distanceBetweenLocations = location.distance(sourceLocation) - if (distanceBetweenLocations > maxPathfinderDistance) { + if (distanceBetweenLocations > maxPathfinderDistance) { + return false + } + } catch (e: Exception) { + // World references in cross server setups. return false } diff --git a/src/main/resources/plugin-legacy.yml b/src/main/resources/plugin-legacy.yml index 9e7cdefce..2e77eda17 100644 --- a/src/main/resources/plugin-legacy.yml +++ b/src/main/resources/plugin-legacy.yml @@ -1,5 +1,5 @@ name: PetBlocks -version: 9.11.1 +version: 9.12.0 author: Shynixn main: com.github.shynixn.petblocks.PetBlocksPlugin softdepend: [ PlaceholderAPI, HeadDatabase] diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index e15eb4429..6877c1cf4 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: PetBlocks -version: 9.11.1 +version: 9.12.0 author: Shynixn main: com.github.shynixn.petblocks.PetBlocksPlugin softdepend: [ PlaceholderAPI, HeadDatabase]