diff --git a/randomteleport-plugin-hooks/chunkyborder/pom.xml b/randomteleport-plugin-hooks/chunkyborder/pom.xml index 7e722f2..4a4e913 100644 --- a/randomteleport-plugin-hooks/chunkyborder/pom.xml +++ b/randomteleport-plugin-hooks/chunkyborder/pom.xml @@ -11,10 +11,6 @@ chunkyborder - - jitpack.io - https://jitpack.io - codemc https://repo.codemc.io/repository/maven-public/ @@ -23,14 +19,14 @@ org.popcraft - chunkyborder - 1.0.43 + chunkyborder-bukkit + 1.1.42 provided org.popcraft chunky-bukkit - 1.2.93 + 1.3.52 provided diff --git a/randomteleport-plugin-hooks/chunkyborder/src/main/java/de/themoep/randomteleport/hook/plugin/ChunkyBorderHook.java b/randomteleport-plugin-hooks/chunkyborder/src/main/java/de/themoep/randomteleport/hook/plugin/ChunkyBorderHook.java index 701036b..7f08933 100644 --- a/randomteleport-plugin-hooks/chunkyborder/src/main/java/de/themoep/randomteleport/hook/plugin/ChunkyBorderHook.java +++ b/randomteleport-plugin-hooks/chunkyborder/src/main/java/de/themoep/randomteleport/hook/plugin/ChunkyBorderHook.java @@ -9,10 +9,12 @@ import org.popcraft.chunkyborder.BorderData; import org.popcraft.chunkyborder.ChunkyBorder; public class ChunkyBorderHook implements WorldborderHook { - private final ChunkyBorder plugin; + private final Plugin plugin; + private final ChunkyBorder chunkyBorder; public ChunkyBorderHook() { - this.plugin = (ChunkyBorder) Bukkit.getPluginManager().getPlugin("ChunkyBorder"); + this.plugin = Bukkit.getPluginManager().getPlugin("ChunkyBorder"); + chunkyBorder = plugin.getServer().getServicesManager().getRegistration(ChunkyBorder.class).getProvider(); } @Override @@ -22,19 +24,19 @@ public class ChunkyBorderHook implements WorldborderHook { @Override public Location getCenter(World world) { - BorderData borderData = plugin.getBorders().get(world.getName()); + BorderData borderData = chunkyBorder.getBorders().get(world.getName()); return new Location(world, borderData.getCenterX(),0D,borderData.getCenterZ()); } @Override public double getBorderRadius(World world) { - BorderData borderData = plugin.getBorders().get(world.getName()); + BorderData borderData = chunkyBorder.getBorders().get(world.getName()); return borderData.getRadiusX(); } @Override public boolean isInsideBorder(Location location) { - BorderData borderData = plugin.getBorders().get(location.getWorld().getName()); + BorderData borderData = chunkyBorder.getBorders().get(location.getWorld().getName()); return borderData.getBorder().isBounding(location.getBlockX(),location.getBlockZ()); }