From ad73fa7ed189e9ec60fb398a2f777df07d5d89ee Mon Sep 17 00:00:00 2001 From: SamB440 Date: Tue, 17 Dec 2019 18:04:01 +0000 Subject: [PATCH] Remove redprotect integration. Add shadowJar task --- build.gradle | 17 +++++++++-------- .../managers/data/yml/YamlStorage.java | 18 ++++++++++++++++-- .../managers/integrations/IntegrationType.java | 4 +--- .../redprotect/RedProtectIntegration.java | 11 ----------- 4 files changed, 26 insertions(+), 24 deletions(-) delete mode 100644 src/main/java/net/islandearth/rpgregions/managers/integrations/redprotect/RedProtectIntegration.java diff --git a/build.gradle b/build.gradle index 66eca36..01b660e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,7 @@ -apply plugin: 'java' +plugins { + id 'com.github.johnrengelman.shadow' version '4.0.4' + id 'java' +} group = pluginGroup version = pluginVersion @@ -18,11 +21,6 @@ repositories { url = 'https://oss.sonatype.org/content/groups/public/' } - maven { - name = 'redprotect-repo' - url = 'https://raw.githubusercontent.com/FabioZumbi12/RedProtect/mvn-repo/' - } - maven { url = "https://repo.aikar.co/content/groups/aikar/" } maven { url "https://maven.enginehub.org/repo/" } @@ -41,11 +39,14 @@ dependencies { implementation 'mysql:mysql-connector-java:5.1.33' implementation 'org.apache.commons:commons-lang3:3.6' compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.2-SNAPSHOT' - compileOnly 'br.net.fabiozumbi12.RedProtect:RedProtect-Core:7.6.5' - compileOnly 'br.net.fabiozumbi12.RedProtect:RedProtect-Spigot:7.6.5' compileOnly name: 'languagy-1.2.5' } +shadowJar { + relocate 'co.aikar.commands', 'net.islandearth.rpgmap.libs.acf' + relocate 'co.aikar.idb', 'net.islandearth.rpgmap.libs.idb' +} + import org.apache.tools.ant.filters.ReplaceTokens processResources { diff --git a/src/main/java/net/islandearth/rpgregions/managers/data/yml/YamlStorage.java b/src/main/java/net/islandearth/rpgregions/managers/data/yml/YamlStorage.java index 30cff79..f1ed8b2 100644 --- a/src/main/java/net/islandearth/rpgregions/managers/data/yml/YamlStorage.java +++ b/src/main/java/net/islandearth/rpgregions/managers/data/yml/YamlStorage.java @@ -2,11 +2,25 @@ package net.islandearth.rpgregions.managers.data.yml; import net.islandearth.rpgregions.managers.data.StorageManager; import net.islandearth.rpgregions.managers.data.account.RPGRegionsAccount; -import org.bukkit.entity.Player; + +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentMap; public class YamlStorage implements StorageManager { + @Override - public RPGRegionsAccount getAccount(Player player) { + public CompletableFuture getAccount(UUID uuid) { return null; } + + @Override + public ConcurrentMap getCachedAccounts() { + return null; + } + + @Override + public void removeCachedAccount(UUID uuid) { + + } } diff --git a/src/main/java/net/islandearth/rpgregions/managers/integrations/IntegrationType.java b/src/main/java/net/islandearth/rpgregions/managers/integrations/IntegrationType.java index 9e25ea1..5b1a41a 100644 --- a/src/main/java/net/islandearth/rpgregions/managers/integrations/IntegrationType.java +++ b/src/main/java/net/islandearth/rpgregions/managers/integrations/IntegrationType.java @@ -1,14 +1,12 @@ package net.islandearth.rpgregions.managers.integrations; -import net.islandearth.rpgregions.managers.integrations.redprotect.RedProtectIntegration; import net.islandearth.rpgregions.managers.integrations.worldguard.WorldGuardIntegration; import java.lang.reflect.InvocationTargetException; import java.util.Optional; public enum IntegrationType { - WORLDGUARD(WorldGuardIntegration.class), - REDPROTECT(RedProtectIntegration.class); + WORLDGUARD(WorldGuardIntegration.class); private final Class clazz; diff --git a/src/main/java/net/islandearth/rpgregions/managers/integrations/redprotect/RedProtectIntegration.java b/src/main/java/net/islandearth/rpgregions/managers/integrations/redprotect/RedProtectIntegration.java deleted file mode 100644 index c211b7a..0000000 --- a/src/main/java/net/islandearth/rpgregions/managers/integrations/redprotect/RedProtectIntegration.java +++ /dev/null @@ -1,11 +0,0 @@ -package net.islandearth.rpgregions.managers.integrations.redprotect; - -import net.islandearth.rpgregions.managers.integrations.IntegrationManager; -import org.bukkit.Location; - -public class RedProtectIntegration implements IntegrationManager { - @Override - public boolean isInRegion(Location location) { - return false; - } -}