mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2026-01-04 15:41:35 +00:00
checkpoint - 19
This commit is contained in:
@@ -81,9 +81,14 @@ public class BukkitConfigManager extends ConfigManager {
|
||||
waterMinTime = config.getInt("mechanics.fishing-wait-time.min-wait-time", 100);
|
||||
waterMaxTime = config.getInt("mechanics.fishing-wait-time.max-wait-time", 600);
|
||||
|
||||
enableLavaFishing = config.getBoolean("mechanics.lava-fishing.enable", false);
|
||||
lavaMinTime = config.getInt("mechanics.lava-fishing.min-wait-time", 100);
|
||||
lavaMaxTime = config.getInt("mechanics.lava-fishing.max-wait-time", 600);
|
||||
|
||||
enableVoidFishing = config.getBoolean("mechanics.void-fishing.enable", false);
|
||||
voidMinTime = config.getInt("mechanics.void-fishing.min-wait-time", 100);
|
||||
voidMaxTime = config.getInt("mechanics.void-fishing.max-wait-time", 600);
|
||||
|
||||
restrictedSizeRange = config.getBoolean("mechanics.size.restricted-size-range", true);
|
||||
|
||||
placeholderLimit = config.getInt("mechanics.competition.placeholder-limit", 3);
|
||||
|
||||
@@ -173,6 +173,10 @@ public class BukkitFishingManager implements FishingManager, Listener {
|
||||
|
||||
if (!RequirementManager.isSatisfied(context, ConfigManager.mechanicRequirements())) {
|
||||
this.destroy(player.getUniqueId());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gears.canFish()) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -349,10 +349,10 @@ public class BukkitRequirementManager implements RequirementManager<Player> {
|
||||
|
||||
private void registerInVoidRequirement() {
|
||||
registerRequirement("in-void", (args, actions, advanced) -> {
|
||||
boolean inWater = (boolean) args;
|
||||
boolean inVoid = (boolean) args;
|
||||
return context -> {
|
||||
boolean in_water = Optional.ofNullable(context.arg(ContextKeys.SURROUNDING)).orElse("").equals(EffectProperties.VOID_FISHING.key());
|
||||
if (in_water == inWater) return true;
|
||||
boolean in_void = Optional.ofNullable(context.arg(ContextKeys.SURROUNDING)).orElse("").equals(EffectProperties.VOID_FISHING.key());
|
||||
if (in_void == inVoid) return true;
|
||||
if (advanced) ActionManager.trigger(context, actions);
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -29,4 +29,22 @@ minecraft:luck_of_the_sea:3:
|
||||
type: group-mod
|
||||
value:
|
||||
- silver_star:+6
|
||||
- golden_star:+3
|
||||
- golden_star:+3
|
||||
#minecraft:lure:1:
|
||||
# requirements: {}
|
||||
# effects:
|
||||
# effect_1:
|
||||
# type: wait-time
|
||||
# value: -50
|
||||
#minecraft:lure:2:
|
||||
# requirements: {}
|
||||
# effects:
|
||||
# effect_1:
|
||||
# type: wait-time
|
||||
# value: -100
|
||||
#minecraft:lure:3:
|
||||
# requirements: {}
|
||||
# effects:
|
||||
# effect_1:
|
||||
# type: wait-time
|
||||
# value: -150
|
||||
Reference in New Issue
Block a user