mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-25 03:55:21 +01:00
Update to latest releases of Chunky(Border) (fixes #55)
This commit is contained in:
parent
29f709a73e
commit
548d873790
@ -11,10 +11,6 @@
|
||||
|
||||
<artifactId>chunkyborder</artifactId>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>codemc</id>
|
||||
<url>https://repo.codemc.io/repository/maven-public/</url>
|
||||
@ -23,14 +19,14 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.popcraft</groupId>
|
||||
<artifactId>chunkyborder</artifactId>
|
||||
<version>1.0.43</version>
|
||||
<artifactId>chunkyborder-bukkit</artifactId>
|
||||
<version>1.1.42</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.popcraft</groupId>
|
||||
<artifactId>chunky-bukkit</artifactId>
|
||||
<version>1.2.93</version>
|
||||
<version>1.3.52</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user