9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2026-01-06 15:51:50 +00:00

fix mythicMobs

This commit is contained in:
XiaoMoMi
2023-10-08 23:03:59 +08:00
parent 274d90cf5b
commit 35d66b12e1
2 changed files with 3 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ import io.lumine.mythic.bukkit.MythicBukkit;
import io.lumine.mythic.bukkit.utils.serialize.Position;
import io.lumine.mythic.core.mobs.ActiveMob;
import net.momirealms.customfishing.api.mechanic.entity.EntityLibrary;
import net.momirealms.customfishing.util.ConfigUtils;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
@@ -52,7 +53,7 @@ public class MythicEntityImpl implements EntityLibrary {
MythicMob theMob = mythicMob.get();
Position position = Position.of(location);
AbstractLocation abstractLocation = new AbstractLocation(position);
ActiveMob activeMob = theMob.spawn(abstractLocation, (Double) propertyMap.get("{level}"));
ActiveMob activeMob = theMob.spawn(abstractLocation, ConfigUtils.getDoubleValue(propertyMap.get("level")));
return activeMob.getEntity().getBukkitEntity();
}
throw new NullPointerException("MythicMobs: " + id + " doesn't exist.");