Customizing Effects for Golden Apples [Bug]
GrimCrusader opened this issue ยท 10 comments
No matter what I try, it won't let me add new effects, they always come out giving an error in console saying that the effects are "null". My config for them is below. Thank you
gapple-effects:
regeneration:
duration: 100
amplifier: 1
absorption:
duration: 2400
amplifier: 0
# Potion effects enchanted golden apples should apply
napple-effects:
regeneration:
duration: 600
amplifier: 4
damage_resistance:
duration: 6000
amplifier: 0
fire_resistance:
duration: 6000
amplifier: 0
absorption:
duration: 2400
amplifier: 0
slowness:
duration: 600
amplifier: 2
strength:
duration: 600
amplifier: 0
So do the default effects work, and yours don't? Do you have a copy of the console error?
26.03 15:32:23 [Server] WARN Unexpected exception while parsing console command "ocm reload"
26.03 15:32:23 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'ocm' in plugin OldCombatMechanics v1.6.5
26.03 15:32:23 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:140) ~[craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:628) ~[craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:614) [craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:408) [craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:372) [craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:651) [craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:555) [craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
26.03 15:32:23 [Server] INFO Caused by: java.lang.IllegalArgumentException: effect type cannot be null
26.03 15:32:23 [Server] INFO at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at org.bukkit.potion.PotionEffect.<init>(PotionEffect.java:45) ~[craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at org.bukkit.potion.PotionEffect.<init>(PotionEffect.java:65) ~[craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at org.bukkit.potion.PotionEffect.<init>(PotionEffect.java:78) ~[craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at org.bukkit.potion.PotionEffect.<init>(PotionEffect.java:90) ~[craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO at gvlfm78.plugin.OldCombatMechanics.module.ModuleGoldenApple.getPotionEffects(ModuleGoldenApple.java:149) ~[?:?]
26.03 15:32:23 [Server] INFO at gvlfm78.plugin.OldCombatMechanics.module.ModuleGoldenApple.reloadRecipes(ModuleGoldenApple.java:43) ~[?:?]
26.03 15:32:23 [Server] INFO at gvlfm78.plugin.OldCombatMechanics.utilities.Config.reload(Config.java:111) ~[?:?]
26.03 15:32:23 [Server] INFO at gvlfm78.plugin.OldCombatMechanics.OCMCommandHandler.onCommand(OCMCommandHandler.java:58) ~[?:?]
26.03 15:32:23 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit-1.12.2.jar:git-Bukkit-29705a0]
26.03 15:32:23 [Server] INFO ... 8 more
Do you forsee this issue being changed/fixed soon? I understand completely if not.
I don't think so, unless @rayzr522 will work on it, as I am currently entering exam season and will not have time to work on OCM. However, as soon as that is over I will definitely be resuming development here and fix this along with many other bugs.
Me: time to go do some homework!
Also me: oh look, a GitHub notification!
Admittedly the error handling could be a bit better, but the problem is coming from the fact that the potion effect name is not slowness
, but rather slow
.
@GrimCrusader your config should be modified to use slow
for the slowness potion effect name.
Might push a commit if I get around to it that will give a slightly more meaningful error, so people will be less confused.
Also, you can find a full list of potion effect type names here. As this was simply a confusion in the potion effect type names, I am going to close this issue.
(Side note: the strength
effect name is also incorrect. According to the docs, it would be increase_damage
, I believe.)
@GrimCrusader Thank you!