mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2026-02-16 10:30:58 +00:00
Add FactionsBridge Support (#145)
This commit is contained in:
10
pom.xml
10
pom.xml
@@ -157,6 +157,10 @@
|
||||
<id>devmart-other</id>
|
||||
<url>https://nexuslite.gcnt.net/repos/other/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>devmart-public</id>
|
||||
<url>https://nexuslite.gcnt.net/repos/public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<!--Spigot API-->
|
||||
@@ -337,6 +341,12 @@
|
||||
<version>0.2.3-legacy-support</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.dansplugins.factionsystem</groupId>
|
||||
<artifactId>FactionsBridge</artifactId>
|
||||
<version>1.3.8</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- CAN BE UNCOMMENTED IF YOU HAVE ACCESS TO THE PLUGIN -->
|
||||
<!-- Private Repoed -->
|
||||
<!-- This is uploaded to our private repo on https://repo.ronanplugins.com -->
|
||||
|
||||
@@ -19,8 +19,8 @@ public enum REGIONPLUGINS {
|
||||
ULTIMATECLAIMS("UltimateClaims", new RTP_UltimateClaims()),
|
||||
WORLDGUARD("WorldGuard", new RTP_WorldGuard()),
|
||||
MINEPLOTS("MinePlots", new RTP_MinePlots()),
|
||||
FACTIONSBRIDGE("FactionsBridge", new RTP_FactionsBridge());
|
||||
|
||||
;
|
||||
@Getter private final SoftDepends.RegionPlugin plugin = new SoftDepends.RegionPlugin();
|
||||
@Getter private final String setting_name, pluginyml_name;
|
||||
@Getter private final RegionPluginCheck validator;
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins;
|
||||
|
||||
import cc.javajobs.factionsbridge.FactionsBridge;
|
||||
import org.bukkit.Location;
|
||||
|
||||
public class RTP_FactionsBridge implements RegionPluginCheck {
|
||||
|
||||
// NOT TESTED (3.6.9)
|
||||
// FactionsBridge (v1.3.8)
|
||||
// https://www.spigotmc.org/resources/factionsbridge.89716/
|
||||
public boolean check(Location loc) {
|
||||
boolean result = true;
|
||||
if (REGIONPLUGINS.FACTIONSBRIDGE.isEnabled())
|
||||
try {
|
||||
boolean claimed = FactionsBridge.getFactionsAPI().getClaim(loc).isClaimed();
|
||||
result = !claimed;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,8 @@ Settings:
|
||||
SaberFactions: false
|
||||
## Respect HuskTowns areas (https://www.spigotmc.org/resources/husktowns.92672/) (Added in 3.4.5)
|
||||
HuskTowns: false
|
||||
## Respect FactionsBridge compatible claims (https://www.spigotmc.org/resources/factionsbridge.89716/) (Added in 3.6.9)
|
||||
FactionsBridge: false
|
||||
|
||||
## Output to console some debugging info
|
||||
Debugger: false
|
||||
|
||||
Reference in New Issue
Block a user