Skip to content

Commit

Permalink
1.3.11 - Fix and optimize permission auto corrector
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSzabo committed Dec 15, 2024
2 parents a21864f + 256988b commit 5b8b209
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/gg/auroramc/quests/listener/CraftListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ private static int calculateCraftAmount(final CraftItemEvent event) {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onCraftItem(CraftItemEvent event) {
if (event.getWhoClicked() instanceof final Player player) {
var amount = calculateCraftAmount(event);
var item = event.getRecipe().getResult();
if (item.isEmpty()) return;
var amount = calculateCraftAmount(event);
AuroraQuests.getInstance().getQuestManager().progress(player, TaskType.CRAFT, amount, Map.of("type", AuroraAPI.getItemManager().resolveId(item)));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gg/auroramc/quests/menu/LevelMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private AuroraMenu createMenu() {
: cmf.getItems().get("locked-level").merge(cm.getItems().get("locked-level"));


var rewards = pool.getMatcherManager().getBestMatcher(level).computeRewards(level);
var rewards = pool.getMatcherManager().getBestMatcher(rLevel).computeRewards(level);

var currentProgress = Math.min(pool.getCompletedQuestCount(player), requirement);
var bar = cmf.getProgressBar();
Expand Down

0 comments on commit 5b8b209

Please sign in to comment.