CoolLord22 / OtherDrops1.13

OtherDrops branch for the latest Minecraft version!
GNU General Public License v3.0
0 stars 4 forks source link

Error thrown when MythicMobs dependency not present #46

Open CoolLord22 opened 3 months ago

CoolLord22 commented 3 months ago

Describe the bug Plugin throws NPE when a MYTHIC_MOB or MYTHIC_ITEM is referenced without the dependency for MM being present.

Screenshots

[15:08:57] [Server thread/INFO]: [OtherDrops] Loading file: otherdrops-drops.yml
[15:08:57] [Server thread/WARN]: java.lang.NullPointerException: Cannot invoke "String.equalsIgnoreCase(String)" because the return value of "com.gmail.zariust.otherdrops.data.MythicMobData.getMythicMobType()" is null
[15:08:57] [Server thread/WARN]:        at com.gmail.zariust.otherdrops.subject.MythicMobSubject.canMatch(MythicMobSubject.java:76)
[15:08:57] [Server thread/WARN]:        at com.gmail.zariust.otherdrops.event.DropsMap.addDrop(DropsMap.java:32)
[15:08:57] [Server thread/WARN]:        at com.gmail.zariust.otherdrops.OtherDropsConfig.loadBlockDrops(OtherDropsConfig.java:789)
[15:08:57] [Server thread/WARN]:        at com.gmail.zariust.otherdrops.OtherDropsConfig.loadDropsFile(OtherDropsConfig.java:645)
[15:08:57] [Server thread/WARN]:        at com.gmail.zariust.otherdrops.OtherDropsConfig.load(OtherDropsConfig.java:255)
[15:08:57] [Server thread/WARN]:        at com.gmail.zariust.otherdrops.OtherDropsCommand.cmdReload(OtherDropsCommand.java:499)
[15:08:57] [Server thread/WARN]:        at com.gmail.zariust.otherdrops.OtherDropsCommand.onCommand(OtherDropsCommand.java:157)
[15:08:57] [Server thread/WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[15:08:57] [Server thread/WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:150)
[15:08:57] [Server thread/WARN]:        at org.bukkit.craftbukkit.v1_21_R1.CraftServer.dispatchCommand(CraftServer.java:913)
[15:08:57] [Server thread/WARN]:        at org.bukkit.craftbukkit.v1_21_R1.CraftServer.dispatchServerCommand(CraftServer.java:898)
[15:08:57] [Server thread/WARN]:        at net.minecraft.server.dedicated.DedicatedServer.br(DedicatedServer.java:431)
[15:08:57] [Server thread/WARN]:        at net.minecraft.server.dedicated.DedicatedServer.c(DedicatedServer.java:407)
[15:08:57] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1321)
[15:08:57] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1071)
[15:08:57] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318)
[15:08:57] [Server thread/WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)
[15:08:57] [Server thread/INFO]: Config load failed!
[15:08:57] [Server thread/INFO]: The error was:
[15:08:57] [Server thread/INFO]: java.lang.NullPointerException: Cannot invoke "String.equalsIgnoreCase(String)" because the return value of "com.gmail.zariust.otherdrops.data.MythicMobData.getMythicMobType()" is null
[15:08:57] [Server thread/INFO]: Please try the latest version & report this issue to the developer if the problem remains.

Desktop (please complete the following information):