From d1f59e3d86360607bff5b60b861928892e8092c1 Mon Sep 17 00:00:00 2001 From: Jeremy Wood Date: Tue, 7 Mar 2023 18:40:37 -0500 Subject: [PATCH] Use specific dependencies in SimpleBlockSafety. --- .../teleportation/SimpleBlockSafety.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/teleportation/SimpleBlockSafety.java b/src/main/java/com/onarandombox/MultiverseCore/teleportation/SimpleBlockSafety.java index 4bb6fc8a..d983c396 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/teleportation/SimpleBlockSafety.java +++ b/src/main/java/com/onarandombox/MultiverseCore/teleportation/SimpleBlockSafety.java @@ -9,7 +9,7 @@ package com.onarandombox.MultiverseCore.teleportation; import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.api.BlockSafety; -import com.onarandombox.MultiverseCore.api.MVCore; +import com.onarandombox.MultiverseCore.api.LocationManipulation; import jakarta.inject.Inject; import org.bukkit.Location; import org.bukkit.Material; @@ -30,7 +30,7 @@ import java.util.Set; */ @Service public class SimpleBlockSafety implements BlockSafety { - private final MVCore plugin; + private final LocationManipulation locationManipulation; private static final Set AROUND_BLOCK = EnumSet.noneOf(BlockFace.class); static { @@ -45,8 +45,8 @@ public class SimpleBlockSafety implements BlockSafety { } @Inject - public SimpleBlockSafety(MVCore plugin) { - this.plugin = plugin; + public SimpleBlockSafety(LocationManipulation locationManipulation) { + this.locationManipulation = locationManipulation; } /** @@ -252,7 +252,7 @@ public class SimpleBlockSafety implements BlockSafety { if (this.isBlockAboveAir(cart.getLocation())) { return true; } - if (this.isEntitiyOnTrack(plugin.getLocationManipulation().getNextBlock(cart))) { + if (this.isEntitiyOnTrack(locationManipulation.getNextBlock(cart))) { return true; } return false;