mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-28 21:56:31 +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>
|
<artifactId>chunkyborder</artifactId>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
|
||||||
<id>jitpack.io</id>
|
|
||||||
<url>https://jitpack.io</url>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
<repository>
|
||||||
<id>codemc</id>
|
<id>codemc</id>
|
||||||
<url>https://repo.codemc.io/repository/maven-public/</url>
|
<url>https://repo.codemc.io/repository/maven-public/</url>
|
||||||
@ -23,14 +19,14 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.popcraft</groupId>
|
<groupId>org.popcraft</groupId>
|
||||||
<artifactId>chunkyborder</artifactId>
|
<artifactId>chunkyborder-bukkit</artifactId>
|
||||||
<version>1.0.43</version>
|
<version>1.1.42</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.popcraft</groupId>
|
<groupId>org.popcraft</groupId>
|
||||||
<artifactId>chunky-bukkit</artifactId>
|
<artifactId>chunky-bukkit</artifactId>
|
||||||
<version>1.2.93</version>
|
<version>1.3.52</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -9,10 +9,12 @@ import org.popcraft.chunkyborder.BorderData;
|
|||||||
import org.popcraft.chunkyborder.ChunkyBorder;
|
import org.popcraft.chunkyborder.ChunkyBorder;
|
||||||
|
|
||||||
public class ChunkyBorderHook implements WorldborderHook {
|
public class ChunkyBorderHook implements WorldborderHook {
|
||||||
private final ChunkyBorder plugin;
|
private final Plugin plugin;
|
||||||
|
private final ChunkyBorder chunkyBorder;
|
||||||
|
|
||||||
public ChunkyBorderHook() {
|
public ChunkyBorderHook() {
|
||||||
this.plugin = (ChunkyBorder) Bukkit.getPluginManager().getPlugin("ChunkyBorder");
|
this.plugin = Bukkit.getPluginManager().getPlugin("ChunkyBorder");
|
||||||
|
chunkyBorder = plugin.getServer().getServicesManager().getRegistration(ChunkyBorder.class).getProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -22,19 +24,19 @@ public class ChunkyBorderHook implements WorldborderHook {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Location getCenter(World world) {
|
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());
|
return new Location(world, borderData.getCenterX(),0D,borderData.getCenterZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getBorderRadius(World world) {
|
public double getBorderRadius(World world) {
|
||||||
BorderData borderData = plugin.getBorders().get(world.getName());
|
BorderData borderData = chunkyBorder.getBorders().get(world.getName());
|
||||||
return borderData.getRadiusX();
|
return borderData.getRadiusX();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInsideBorder(Location location) {
|
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());
|
return borderData.getBorder().isBounding(location.getBlockX(),location.getBlockZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user