Fix magnitude for 'Explosion' always being '0' (SD-7555)
The magnitude value has not been parsed and evaluated correctly if it was a string (default is `1 * {level}`
This commit is contained in:
parent
1c8bdd0cae
commit
6032ecd012
2
pom.xml
2
pom.xml
|
@ -91,6 +91,7 @@
|
|||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.16.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>fr.mrmicky</groupId>
|
||||
|
@ -108,6 +109,7 @@
|
|||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateBottles</artifactId>
|
||||
<version>1_0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.songoda.epicenchants.effect.effects;
|
|||
|
||||
import com.songoda.epicenchants.effect.EffectExecutor;
|
||||
import com.songoda.epicenchants.enums.EventType;
|
||||
import com.songoda.epicenchants.objects.LeveledModifier;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -15,6 +16,8 @@ public class Explode extends EffectExecutor {
|
|||
|
||||
@Override
|
||||
public void execute(@NotNull Player user, @Nullable LivingEntity opponent, int level, EventType eventType) {
|
||||
consume(entity -> entity.getWorld().createExplosion(entity.getLocation(), getSection().getInt("magnitude")), user, opponent);
|
||||
consume(entity -> entity.getWorld().createExplosion(entity.getLocation(), (float) LeveledModifier
|
||||
.of(getSection().getString("magnitude")).get(level, level, user, opponent)),
|
||||
user, opponent);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue