-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c721cd7
commit 9c21792
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
18 changes: 12 additions & 6 deletions
18
...ain/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_HuskTowns.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins; | ||
|
||
import net.william278.husktowns.api.HuskTownsAPI; | ||
import net.william278.husktowns.api.BukkitHuskTownsAPI; | ||
import org.bukkit.Location; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
|
||
public class RTP_HuskTowns implements RegionPluginCheck { | ||
|
||
// NOT TESTED (3.4.5) | ||
// HuskTowns (v1.8.1) | ||
// https://www.spigotmc.org/resources/husktowns.92672/ | ||
private final BukkitHuskTownsAPI huskTownsAPI; | ||
|
||
public RTP_HuskTowns(JavaPlugin plugin) { | ||
this.huskTownsAPI = BukkitHuskTownsAPI.getInstance(); | ||
} | ||
|
||
@Override | ||
public boolean check(Location loc) { | ||
boolean result = true; | ||
if (REGIONPLUGINS.HUSKTOWNS.isEnabled()) | ||
if (REGIONPLUGINS.HUSKTOWNS.isEnabled()) { | ||
try { | ||
result = !HuskTownsAPI.getInstance().getClaimAt(loc).isPresent(); | ||
result = !huskTownsAPI.getClaimAt(loc).isPresent(); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
return result; | ||
} | ||
} |