mirror of
https://github.com/songoda/EpicBuckets.git
synced 2025-02-16 11:41:25 +01:00
fix
This commit is contained in:
parent
bdda96eb8e
commit
363b906158
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "EpicBuckets"
|
||||
path: "/builds/Songoda/$name"
|
||||
version: "1.4.4"
|
||||
version: "1.5"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
@ -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"));
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user