mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-19 15:09:24 +00:00
2.0.8
This commit is contained in:
@@ -7,7 +7,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
|
||||
version = "2.0.7"
|
||||
version = "2.0.8"
|
||||
|
||||
apply<JavaPlugin>()
|
||||
apply(plugin = "java")
|
||||
@@ -34,12 +34,12 @@ allprojects {
|
||||
maven("https://nexus.phoenixdevt.fr/repository/maven-public/")
|
||||
maven("https://r.irepo.space/maven/")
|
||||
maven("https://repo.auxilor.io/repository/maven-public/")
|
||||
maven("https://betonquest.org/nexus/repository/betonquest/")
|
||||
maven("https://repo.william278.net/releases/")
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
||||
maven("https://repo.minebench.de/")
|
||||
maven("https://repo.xenondevs.xyz/releases/")
|
||||
maven("https://repo.oraxen.com/releases")
|
||||
maven("https://nexus.betonquest.org/repository/betonquest/")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ dependencies {
|
||||
compileOnly("com.github.Zrips:Jobs:4.17.2")
|
||||
compileOnly("com.github.Archy-X:AureliumSkills:Beta1.3.21")
|
||||
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
|
||||
compileOnly("org.betonquest:betonquest:2.0.0-SNAPSHOT")
|
||||
compileOnly("org.betonquest:betonquest:2.0.0")
|
||||
compileOnly("xyz.xenondevs.invui:invui:1.24")
|
||||
compileOnly("com.github.Xiao-MoMi:Custom-Crops:3.3.1.8")
|
||||
|
||||
|
||||
@@ -117,12 +117,12 @@ public class MarketManagerImpl implements MarketManager, Listener {
|
||||
private void loadConfig() {
|
||||
YamlConfiguration config = plugin.getConfig("market.yml");
|
||||
this.enable = config.getBoolean("enable", true);
|
||||
this.formula = config.getString("price-formula", "{base} + {bonus} * {size}");
|
||||
if (!this.enable) return;
|
||||
|
||||
// Load various configuration settings
|
||||
this.layout = config.getStringList("layout").toArray(new String[0]);
|
||||
this.title = config.getString("title", "market.title");
|
||||
this.formula = config.getString("price-formula", "{base} + {bonus} * {size}");
|
||||
this.itemSlot = config.getString("item-slot.symbol", "I").charAt(0);
|
||||
this.functionSlot = config.getString("functional-icons.symbol", "B").charAt(0);
|
||||
this.functionIconAllowBuilder = plugin.getItemManager().getItemBuilder(config.getConfigurationSection("functional-icons.allow-icon"), "gui", "allow");
|
||||
|
||||
@@ -1032,6 +1032,16 @@ public class RequirementManagerImpl implements RequirementManager {
|
||||
return false;
|
||||
};
|
||||
});
|
||||
registerRequirement("has-bait", (args, actions, advanced) -> {
|
||||
boolean has = (boolean) args;
|
||||
return condition -> {
|
||||
String id = condition.getArg("{bait}");
|
||||
if (id != null && has) return true;
|
||||
if (id == null && !has) return true;
|
||||
if (advanced) triggerActions(actions, condition);
|
||||
return false;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
private void registerEnvironmentRequirement() {
|
||||
@@ -1074,6 +1084,16 @@ public class RequirementManagerImpl implements RequirementManager {
|
||||
return false;
|
||||
};
|
||||
});
|
||||
registerRequirement("has-hook", (args, actions, advanced) -> {
|
||||
boolean has = (boolean) args;
|
||||
return condition -> {
|
||||
String id = condition.getArg("{hook}");
|
||||
if (id != null && has) return true;
|
||||
if (id == null && !has) return true;
|
||||
if (advanced) triggerActions(actions, condition);
|
||||
return false;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
private void registerInBagRequirement() {
|
||||
|
||||
@@ -90,8 +90,6 @@ public class CFConfig {
|
||||
public static boolean logDataSaving;
|
||||
|
||||
public static boolean restrictedSizeRange;
|
||||
public static boolean allowSizeStack;
|
||||
public static List<String> sizeStackLore;
|
||||
|
||||
// Legacy color code support
|
||||
public static boolean legacyColorSupport;
|
||||
@@ -157,8 +155,6 @@ public class CFConfig {
|
||||
lavaMaxTime = config.getInt("mechanics.lava-fishing.max-wait-time", 600);
|
||||
|
||||
restrictedSizeRange = config.getBoolean("mechanics.size.restricted-size-range", true);
|
||||
allowSizeStack = config.getBoolean("mechanics.size.allow-stack", false);
|
||||
sizeStackLore = config.getStringList("mechanics.size.lore-format").stream().map(it -> "<!i>" + it).toList();
|
||||
|
||||
globalShowInFinder = config.getBoolean("mechanics.global-loot-property.show-in-fishfinder", true);
|
||||
globalDisableStats = config.getBoolean("mechanics.global-loot-property.disable-stat", false);
|
||||
|
||||
@@ -151,19 +151,6 @@ mechanics:
|
||||
# Some effects would increase/decrease size so the option decides whether they could ignore the limit
|
||||
restricted-size-range: true
|
||||
|
||||
###### WARNING: THIS IS NOT AN IMPLEMENTED FEATURE AND MIGHT BE REMOVED IN THE FUTURE ######
|
||||
# It's only available for developers to test for the moment.
|
||||
# This feature requires much work on preventing dupe, counting price, merging dropped items,
|
||||
# clicks in inventory, hopper transferring and lore updating...
|
||||
# It might be removed if dupes or has bad performance.
|
||||
## Allow players to stack fish with different sizes
|
||||
#allow-stack: false
|
||||
## Lore format
|
||||
#lore-format:
|
||||
# - ''
|
||||
# - 'Total Size: {0}cm'
|
||||
#############################################################################################
|
||||
|
||||
# Competition settings
|
||||
competition:
|
||||
# Use redis for cross server data synchronization
|
||||
|
||||
Reference in New Issue
Block a user