diff --git a/Hook_FactionsUUID/build.gradle b/Hook_FactionsUUID/build.gradle new file mode 100644 index 0000000..a53bf6f --- /dev/null +++ b/Hook_FactionsUUID/build.gradle @@ -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 } +} \ No newline at end of file diff --git a/src/main/java/com/bgsoftware/wildloaders/hooks/ClaimsProvider_FactionsUUID.java b/Hook_FactionsUUID/src/main/java/com/bgsoftware/wildloaders/hooks/ClaimsProvider_FactionsUUID.java similarity index 100% rename from src/main/java/com/bgsoftware/wildloaders/hooks/ClaimsProvider_FactionsUUID.java rename to Hook_FactionsUUID/src/main/java/com/bgsoftware/wildloaders/hooks/ClaimsProvider_FactionsUUID.java diff --git a/build.gradle b/build.gradle index ed31cf6..670ae79 100644 --- a/build.gradle +++ b/build.gradle @@ -58,7 +58,6 @@ dependencies { compileOnly 'org.spigotmc:v1_16_R3-Tuinity:latest' // Plugin Hooks - compileOnly "com.drtshock:FactionsUUID:latest" compileOnly "net.prosavage:FactionsX:latest" compileOnly "com.bgsoftware:SuperiorSkyblockAPI:latest" compileOnly "com.songoda:EpicSpawners-6:latest" diff --git a/settings.gradle b/settings.gradle index b6f3798..cdc3b5a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,4 +17,5 @@ include 'v1_16_R3' include 'v1_17_R1' include 'v1_18_R1' include 'Hook_MassiveFactions' +include 'Hook_FactionsUUID' diff --git a/src/main/java/com/bgsoftware/wildloaders/handlers/ProvidersHandler.java b/src/main/java/com/bgsoftware/wildloaders/handlers/ProvidersHandler.java index 9a23a45..7e0ae33 100644 --- a/src/main/java/com/bgsoftware/wildloaders/handlers/ProvidersHandler.java +++ b/src/main/java/com/bgsoftware/wildloaders/handlers/ProvidersHandler.java @@ -4,7 +4,6 @@ import com.bgsoftware.wildloaders.WildLoadersPlugin; import com.bgsoftware.wildloaders.api.hooks.ClaimsProvider; import com.bgsoftware.wildloaders.api.hooks.TickableProvider; 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_SuperiorSkyblock; import com.bgsoftware.wildloaders.hooks.TickableProvider_EpicSpawners; @@ -38,7 +37,8 @@ public final class ProvidersHandler implements ProvidersManager { // Loading the claim providers if (Bukkit.getPluginManager().isPluginEnabled("Factions")) { if (Bukkit.getPluginManager().getPlugin("Factions").getDescription().getAuthors().contains("drtshock")) { - addClaimsProvider(new ClaimsProvider_FactionsUUID()); + Optional claimsProvider = createInstance("ClaimsProvider_FactionsUUID"); + claimsProvider.ifPresent(this::addClaimsProvider); } else { Optional claimsProvider = createInstance("ClaimsProvider_MassiveFactions");