File tree Expand file tree Collapse file tree 2 files changed +13
-25
lines changed
src/main/java/com/github/jikoo/regionerator/hooks Expand file tree Collapse file tree 2 files changed +13
-25
lines changed Original file line number Diff line number Diff line change 144144 <systemPath >${project.basedir} /premium/Residence.jar</systemPath >
145145 </dependency >
146146 <dependency >
147- <groupId >me.angeschossen</groupId >
148- <artifactId >Lands</artifactId >
149- <version >4.3.1.2</version >
150- <scope >system</scope >
151- <systemPath >${project.basedir} /premium/Lands.jar</systemPath >
147+ <groupId >com.github.angeschossen</groupId >
148+ <artifactId >LandsAPI</artifactId >
149+ <version >4.9.3</version >
150+ <scope >provided</scope >
152151 </dependency >
153152 <dependency >
154153 <groupId >com.songoda</groupId >
Original file line number Diff line number Diff line change 11package com .github .jikoo .regionerator .hooks ;
22
33import com .github .jikoo .regionerator .Regionerator ;
4- import java .util .concurrent .ExecutionException ;
54import me .angeschossen .lands .api .integration .LandsIntegration ;
6- import me .angeschossen .lands .api .land .LandWorld ;
75import org .bukkit .World ;
6+ import org .jetbrains .annotations .NotNull ;
87
98/**
109 * PluginHook for <a href=https://www.spigotmc.org/resources/lands.53313/>Lands</a>.
@@ -26,31 +25,21 @@ public boolean isHookUsable() {
2625
2726 @ Override
2827 public boolean isChunkProtected (World chunkWorld , int chunkX , int chunkZ ) {
29- LandWorld landWorld = getLandsAPI ().getLandWorld (chunkWorld .getName ());
30-
31- if (landWorld == null ) {
32- return false ;
33- }
28+ return getLandsAPI ().isClaimed (chunkWorld , chunkX , chunkZ );
29+ }
3430
35- try {
36- return landsAPI .isClaimed (chunkWorld .getName (), chunkX , chunkZ ).get ();
37- } catch (InterruptedException | ExecutionException | ClassCastException e ) {
38- e .printStackTrace ();
39- return true ;
40- }
31+ @ Override
32+ public boolean isAsyncCapable () {
33+ return true ;
4134 }
4235
36+ @ NotNull
4337 private LandsIntegration getLandsAPI () {
4438 if (landsAPI == null ) {
45- landsAPI = new LandsIntegration (Regionerator .getPlugin (Regionerator .class ), false );
46- landsAPI .initialize ();
39+ landsAPI = new LandsIntegration (Regionerator .getPlugin (Regionerator .class ));
4740 }
48- return landsAPI ;
49- }
5041
51- @ Override
52- public boolean isAsyncCapable () {
53- return true ;
42+ return landsAPI ;
5443 }
5544
5645}
You can’t perform that action at this time.
0 commit comments