xaniox / HeavySpleef

Advanced and highly configurable Spleef plugin for Bukkit
http://dev.bukkit.org/server-mods/heavyspleef/
GNU General Public License v3.0
12 stars 19 forks source link

Localizable tool names request #50

Closed Ghostlyr closed 7 years ago

Ghostlyr commented 7 years ago

I hope to see the possibility to localize spleef tools names from localization config file. Thanks in advance.

xaniox commented 7 years ago

Added in the latest development build.

Ghostlyr commented 7 years ago

Great. Thank you!

Ghostlyr commented 7 years ago

Hmm, I got exeption:

[HeavySpleef] Could not pass GameStartEvent in class de.xaniox.heavyspleef.flag.defaults.FlagSplegg
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at de.xaniox.heavyspleef.core.event.EventListenerMethod.invoke(EventListenerMethod.java:70) ~[HeavySpleef.jar:?]
    at de.xaniox.heavyspleef.core.event.EventBus.callEvent(EventBus.java:96) [HeavySpleef.jar:?]
    at de.xaniox.heavyspleef.core.game.Game.start(Game.java:488) [HeavySpleef.jar:?]
    at de.xaniox.heavyspleef.core.game.Game$2.onCountdownFinish(Game.java:418) [HeavySpleef.jar:?]
    at de.xaniox.heavyspleef.core.game.CountdownTask.run(CountdownTask.java:49) [HeavySpleef.jar:?]
    at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:641) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101]
    at de.xaniox.heavyspleef.core.event.EventListenerMethod.invoke(EventListenerMethod.java:68) ~[HeavySpleef.jar:?]
    ... 11 more
Caused by: java.util.MissingResourceException: Can't find resource for bundle de.xaniox.heavyspleef.core.i18n.YMLResourceBundle, key splegg
    at java.util.ResourceBundle.getObject(ResourceBundle.java:450) ~[?:1.8.0_101]
    at java.util.ResourceBundle.getObject(ResourceBundle.java:444) ~[?:1.8.0_101]
    at java.util.ResourceBundle.getString(ResourceBundle.java:407) ~[?:1.8.0_101]
    at de.xaniox.heavyspleef.core.i18n.I18N.getString(I18N.java:291) ~[HeavySpleef.jar:?]
    at de.xaniox.heavyspleef.flag.defaults.FlagSplegg.getSpleggLauncherItemstack(FlagSplegg.java:106) ~[HeavySpleef.jar:?]
    at de.xaniox.heavyspleef.flag.defaults.FlagSplegg.onGameStart(FlagSplegg.java:122) ~[HeavySpleef.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101]
    at de.xaniox.heavyspleef.core.event.EventListenerMethod.invoke(EventListenerMethod.java:68) ~[HeavySpleef.jar:?]
    ... 11 more

But string 'splegg' present in locale file

xaniox commented 7 years ago

Totally forgot to add the prefixes in the code. Please re-try with the latest development build #325