mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2025-07-03 08:15:42 +00:00
Update RTP_HuskTowns.java (#218)
This commit is contained in:
parent
c721cd7837
commit
9c21792669
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user