From 99af79a321b05ed5152fbb21e392904dc885b32a Mon Sep 17 00:00:00 2001 From: Niels Vergucht Date: Tue, 15 Jan 2019 17:00:34 +0100 Subject: [PATCH] Fixes Factions Support --- pom.xml | 2 +- src/main/java/com/songoda/epicbuckets/file/ConfigManager.java | 4 ++++ .../com/songoda/epicbuckets/regionhandler/RegionFactions.java | 4 +++- src/main/resources/plugin.yml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 90ca6b8..1f2490f 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ com.songoda EpicBuckets 4.0.0 - 1.4.3 + 1.4.4 clean package diff --git a/src/main/java/com/songoda/epicbuckets/file/ConfigManager.java b/src/main/java/com/songoda/epicbuckets/file/ConfigManager.java index abd99ff..1b3f6d5 100644 --- a/src/main/java/com/songoda/epicbuckets/file/ConfigManager.java +++ b/src/main/java/com/songoda/epicbuckets/file/ConfigManager.java @@ -96,6 +96,7 @@ public class ConfigManager { /* Genbucket */ + settingsGenbucketIntegers = new HashMap<>(); settingsGenbucketIntegers.put("Cooldown between placements", this::setCooldown); settingsGenbucketIntegers.put("Sponge radius", this::setSpongeRadius); settingsGenbucketIntegers.put("Max active gens per player", this::setMaxGenbucketsPerPlayer); @@ -108,6 +109,7 @@ public class ConfigManager { /* Genbucket */ + settingsGenbucketBooleans = new HashMap<>(); settingsGenbucketBooleans.put("Gens in Wilderness", this::setGensInWilderness); settingsGenbucketBooleans.put("Infinite genbucket use", this::setInfiniteUse); settingsGenbucketBooleans.put("Charge infinite use placement", this::setChargeInfiniteUse); @@ -118,6 +120,7 @@ public class ConfigManager { /* Hooks */ + settingsHooks = new HashMap<>(); settingsHooks.put("Factions Support", this::setSupportFactions); settingsHooks.put("Worldguard Support", this::setSupportWorldGuard); settingsHooks.put("GriefPrevention Support", this::setSupportGriefPrevention); @@ -125,6 +128,7 @@ public class ConfigManager { /* Shop */ + settingsShop = new HashMap<>(); settingsShop.put("Close GUI after purchase", epicBuckets.getShopManager()::setCloseAfterPurchase); settingsShop.put("Fill bulk shop", epicBuckets.getShopManager()::setBulkFillInventory); settingsShop.put("Fill shops", this::setFillInventory); diff --git a/src/main/java/com/songoda/epicbuckets/regionhandler/RegionFactions.java b/src/main/java/com/songoda/epicbuckets/regionhandler/RegionFactions.java index 46136bc..8231b89 100644 --- a/src/main/java/com/songoda/epicbuckets/regionhandler/RegionFactions.java +++ b/src/main/java/com/songoda/epicbuckets/regionhandler/RegionFactions.java @@ -1,6 +1,7 @@ package com.songoda.epicbuckets.regionhandler; import com.songoda.epicbuckets.EpicBuckets; +import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; @@ -8,8 +9,9 @@ public class RegionFactions { public static boolean canBuild(Player player, Location location) { if (!EpicBuckets.getInstance().getConfigManager().isSupportFactions()) return true; + if (!Bukkit.getPluginManager().isPluginEnabled("Factions")) return true; - if (EpicBuckets.getInstance().getDescription().getAuthors().contains("drtshock")) { + if (Bukkit.getPluginManager().getPlugin("Factions").getDescription().getAuthors().contains("drtshock")) { /* FactionsUUID and his clones/forks/whatever */ diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 7e6d7a9..0b9b0e7 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: EpicBuckets -version: 1.4.3 +version: 1.4.4 description: Generate walls fast and efficient with beautiful guis! author: Songoda main: com.songoda.epicbuckets.EpicBuckets -softdepend: [WorldGuard, WorldEdit, Factions, MassiveCore, FactionsUUID, GriefPrevention] +softdepend: [WorldGuard, WorldEdit, Factions, MassiveCore, GriefPrevention] depend: [Vault] \ No newline at end of file