mirror of
https://github.com/songoda/EpicBuckets.git
synced 2024-06-28 15:44:48 +02:00
1.4.4, WG for 1.13 still needs to be fixed
This commit is contained in:
parent
99af79a321
commit
a90738e0b5
2
pom.xml
2
pom.xml
|
@ -122,7 +122,7 @@
|
|||
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>3_aikar</id>
|
||||
<id>33_aikar</id>
|
||||
<url>https://repo.aikar.co/content/groups/aikar/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
|
|
|
@ -7,8 +7,10 @@ import com.songoda.epicbuckets.util.Validator;
|
|||
import com.songoda.epicbuckets.util.XMaterial;
|
||||
import me.lucko.helper.cooldown.Cooldown;
|
||||
import me.lucko.helper.cooldown.CooldownMap;
|
||||
import me.lucko.helper.item.ItemStackBuilder;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
|
@ -379,7 +381,12 @@ public class ConfigManager {
|
|||
}
|
||||
|
||||
public double getInfiniteUseCostForGenbucketType(GenbucketType genbucketType, ItemStack item) {
|
||||
return infiniteUseCost.get(genbucketType).get(item);
|
||||
for (ItemStack itemStack : infiniteUseCost.get(genbucketType).keySet()) {
|
||||
if (itemStack.getType() == item.getType() && itemStack.getData() == item.getData()) {
|
||||
return infiniteUseCost.get(genbucketType).get(itemStack);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getGenbucketDelay() {
|
||||
|
|
|
@ -31,6 +31,10 @@ public class GUISettings implements InventoryProvider {
|
|||
.name("&6Hooks")
|
||||
.build(),
|
||||
e -> GUISettingsGenbucket.SETTINGS.open(player)));
|
||||
contents.add(ClickableItem.of(ItemStackBuilder.of(XMaterial.CHEST.parseMaterial())
|
||||
.name("&6Shop settings")
|
||||
.build(),
|
||||
e -> GUISettingsGenbucket.SETTINGS.open(player)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.songoda.epicbuckets.regionhandler;
|
||||
|
||||
import com.massivecraft.factions.entity.BoardColl;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.FactionColl;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import com.massivecraft.massivecore.ps.PS;
|
||||
|
@ -11,12 +12,17 @@ import org.bukkit.entity.Player;
|
|||
public class FactionsMassive {
|
||||
|
||||
public static boolean check(Player player, Location location) {
|
||||
Faction f = BoardColl.get().getFactionAt(PS.valueOf(location));
|
||||
/*
|
||||
If wilderness
|
||||
*/
|
||||
if (BoardColl.get().getFactionAt(PS.valueOf(location)) == FactionColl.get().getNone()) return EpicBuckets.getInstance().getConfigManager().isGensInWilderness();
|
||||
if (f == FactionColl.get().getNone()) return EpicBuckets.getInstance().getConfigManager().isGensInWilderness();
|
||||
|
||||
return MPlayer.get(player).isInOwnTerritory();
|
||||
/*
|
||||
If player has no faction
|
||||
*/
|
||||
if (!MPlayer.get(player).hasFaction()) return false;
|
||||
return MPlayer.get(player).getFactionName().equals(f.getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user