This commit is contained in:
Brianna O'Keefe 2019-02-06 00:17:48 -05:00
parent bdda96eb8e
commit 363b906158
5 changed files with 10 additions and 8 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "EpicBuckets"
path: "/builds/Songoda/$name"
version: "1.4.4"
version: "1.5"
build:
stage: build

View File

@ -234,6 +234,10 @@ public class ConfigManager {
return (cooldowns.get(player.getUniqueId()) + cooldown) < System.currentTimeMillis();
}
public void updateCooldown(Player player) {
cooldowns.put(player.getUniqueId(), System.currentTimeMillis());
}
public void createConfig(String name, boolean resource) {
File f = new File(epicBuckets.getDataFolder(), name + ".yml");
configDatabase.put(name, new Config(f, resource));

View File

@ -1,5 +1,6 @@
package com.songoda.epicbuckets.hooks;
import com.songoda.epicbuckets.EpicBuckets;
import com.songoda.epicbuckets.utils.hooks.ClaimableProtectionPluginHook;
import me.markeh.factionsframework.FactionsFramework;
import me.markeh.factionsframework.entities.FPlayer;
@ -28,7 +29,9 @@ public class HookFactions implements ClaimableProtectionPluginHook {
FPlayer fPlayer = FPlayers.getBySender(player);
Faction faction = Factions.getFactionAt(location);
return faction.isNone() || fPlayer.getFaction().equals(faction);
if (faction.isNone()) return EpicBuckets.getInstance().getConfigManager().isGensInWilderness();
return fPlayer.getFaction().equals(faction);
}
@Override

View File

@ -85,6 +85,7 @@ public class GenbucketPlaceListener implements Listener {
case HORIZONTAL:
genbucket = new Horizontal(e.getPlayer(), e.getClickedBlock(), e.getBlockFace(), instance.getShopManager().getShop(nbtItem.getString("Shop")).getSubShop(nbtItem.getString("SubShop")));
}
instance.getConfigManager().updateCooldown(e.getPlayer());
if (!genbucket.calculateBlockFace()) {
e.getPlayer().sendMessage(instance.getLocale().getMessage("event.genbucket.placedwrong").replace("%genbucket%", genbucket.getGenbucketType().name.toUpperCase() + " genbucket"));

View File

@ -8,12 +8,6 @@
# https://www.spigotmc.org/resources/epicbuckets-the-most-powerful-genbucket-plugin.50944/
# Please use 1.13+ material names, the plugin auto converts them to your server version
FACTIONS-SUPPORT: false # MassiveCore and Factions/FactionsUUID/SavageFactions is needed
WORLDGUARD-SUPPORT: false # WorldEdit and WorldGuard is needed
GRIEFPREVENTION-SUPPORT: false # GriefPrevention is needed
ENABLE-GENS-IN-WILDERNESS: true
CLOSE-GUI-AFTER-PURCHASE: false # Close the inventory after purchase