From 454781ca012316f3c7934aec4b1d3e66a424818e Mon Sep 17 00:00:00 2001 From: Chris Mellor Date: Sat, 22 Jul 2023 14:29:22 +0100 Subject: [PATCH] fix: Folder check bypass --- src/Concerns/GiveExperience.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Concerns/GiveExperience.php b/src/Concerns/GiveExperience.php index b6b601d..85b9d81 100644 --- a/src/Concerns/GiveExperience.php +++ b/src/Concerns/GiveExperience.php @@ -29,7 +29,7 @@ public function addPoints( /** * If the Multiplier Service is enabled, apply the Multipliers. */ - if (config(key: 'level-up.multiplier.enabled')) { + if (config(key: 'level-up.multiplier.enabled') && file_exists(filename: config(key: 'level-up.multiplier.path'))) { $amount = $this->getMultipliers(amount: $amount); } @@ -176,13 +176,13 @@ public function levelUp(): void event(new UserLevelledUp(user: $this, level: $this->getLevel())); } - public function level(): BelongsTo + public function experienceHistory(): HasMany { - return $this->belongsTo(related: Level::class); + return $this->hasMany(related: ExperienceAudit::class); } - public function experienceHistory(): HasMany + public function level(): BelongsTo { - return $this->hasMany(related: ExperienceAudit::class); + return $this->belongsTo(related: Level::class); } }