Moved FactionsUUID to its own module

This commit is contained in:
OmerBenGera 2021-12-25 20:54:04 +02:00
parent 1ebfaad641
commit 7e2addcc3d
5 changed files with 16 additions and 3 deletions

View File

@ -0,0 +1,13 @@
group 'Hook_FactionsUUID'
dependencies {
compileOnly "com.drtshock:FactionsUUID:latest"
compileOnly "org.spigotmc:v1_8_R3-Taco:latest"
compileOnly project(":API")
compileOnly parent
}
if (project.hasProperty('hook.compile_factionsuuid') &&
!Boolean.valueOf(project.findProperty("hook.compile_factionsuuid").toString())) {
project.tasks.all { task -> task.enabled = false }
}

View File

@ -58,7 +58,6 @@ dependencies {
compileOnly 'org.spigotmc:v1_16_R3-Tuinity:latest' compileOnly 'org.spigotmc:v1_16_R3-Tuinity:latest'
// Plugin Hooks // Plugin Hooks
compileOnly "com.drtshock:FactionsUUID:latest"
compileOnly "net.prosavage:FactionsX:latest" compileOnly "net.prosavage:FactionsX:latest"
compileOnly "com.bgsoftware:SuperiorSkyblockAPI:latest" compileOnly "com.bgsoftware:SuperiorSkyblockAPI:latest"
compileOnly "com.songoda:EpicSpawners-6:latest" compileOnly "com.songoda:EpicSpawners-6:latest"

View File

@ -17,4 +17,5 @@ include 'v1_16_R3'
include 'v1_17_R1' include 'v1_17_R1'
include 'v1_18_R1' include 'v1_18_R1'
include 'Hook_MassiveFactions' include 'Hook_MassiveFactions'
include 'Hook_FactionsUUID'

View File

@ -4,7 +4,6 @@ import com.bgsoftware.wildloaders.WildLoadersPlugin;
import com.bgsoftware.wildloaders.api.hooks.ClaimsProvider; import com.bgsoftware.wildloaders.api.hooks.ClaimsProvider;
import com.bgsoftware.wildloaders.api.hooks.TickableProvider; import com.bgsoftware.wildloaders.api.hooks.TickableProvider;
import com.bgsoftware.wildloaders.api.managers.ProvidersManager; import com.bgsoftware.wildloaders.api.managers.ProvidersManager;
import com.bgsoftware.wildloaders.hooks.ClaimsProvider_FactionsUUID;
import com.bgsoftware.wildloaders.hooks.ClaimsProvider_FactionsX; import com.bgsoftware.wildloaders.hooks.ClaimsProvider_FactionsX;
import com.bgsoftware.wildloaders.hooks.ClaimsProvider_SuperiorSkyblock; import com.bgsoftware.wildloaders.hooks.ClaimsProvider_SuperiorSkyblock;
import com.bgsoftware.wildloaders.hooks.TickableProvider_EpicSpawners; import com.bgsoftware.wildloaders.hooks.TickableProvider_EpicSpawners;
@ -38,7 +37,8 @@ public final class ProvidersHandler implements ProvidersManager {
// Loading the claim providers // Loading the claim providers
if (Bukkit.getPluginManager().isPluginEnabled("Factions")) { if (Bukkit.getPluginManager().isPluginEnabled("Factions")) {
if (Bukkit.getPluginManager().getPlugin("Factions").getDescription().getAuthors().contains("drtshock")) { if (Bukkit.getPluginManager().getPlugin("Factions").getDescription().getAuthors().contains("drtshock")) {
addClaimsProvider(new ClaimsProvider_FactionsUUID()); Optional<ClaimsProvider> claimsProvider = createInstance("ClaimsProvider_FactionsUUID");
claimsProvider.ifPresent(this::addClaimsProvider);
} }
else { else {
Optional<ClaimsProvider> claimsProvider = createInstance("ClaimsProvider_MassiveFactions"); Optional<ClaimsProvider> claimsProvider = createInstance("ClaimsProvider_MassiveFactions");