9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2026-01-03 22:26:15 +00:00

fix competition rewards

This commit is contained in:
XiaoMoMi
2023-11-13 16:34:55 +08:00
parent f0e77eee86
commit e7f946b662
3 changed files with 3 additions and 9 deletions

View File

@@ -191,14 +191,11 @@ public class Competition implements FishingCompetition {
} else {
Action[] actions = rewardsMap.get("participation");
if (actions != null) {
iterator.forEachRemaining(playerName -> {
Player player = Bukkit.getPlayer(competitionPlayer.left());
Player player = Bukkit.getPlayer(competitionPlayer.left()); {
if (player != null)
for (Action action : actions)
action.trigger(new Condition(player));
});
} else {
break;
}
}
}
}

View File

@@ -155,9 +155,7 @@ public class CompetitionManagerImpl implements CompetitionManager {
CompetitionConfig competitionConfig = builder.build();
List<Pair<Integer, Integer>> timePairs = section.getStringList("start-time")
.stream().map(it -> {
return ConfigUtils.splitStringIntegerArgs(it, ":");
}).toList();
.stream().map(it -> ConfigUtils.splitStringIntegerArgs(it, ":")).toList();
List<Integer> weekdays = section.getIntegerList("start-weekday");
if (weekdays.size() == 0) {
weekdays.addAll(List.of(1,2,3,4,5,6,7));

View File

@@ -304,7 +304,6 @@ public class FishingManagerImpl implements Listener, FishingManager {
removeTempFishingState(player);
return;
}
// Merge rod/bait/util effects
FishingEffect initialEffect = plugin.getEffectManager().getInitialEffect();
// Merge totem effects
EffectCarrier totemEffect = plugin.getTotemManager().getTotemEffect(player.getLocation());