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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user