Plugin Help HarryPotterSpells: "Could not generate language file"

Discussion in 'Plugin Help/Development/Requests' started by zoofzoof, Apr 13, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    zoofzoof

    Not sure what the problem is. I am using spigot-1.8.3 (and have tried older versions) and HarryPotterSpells 1.1.3. Any help would be much appreciated.
     
  2. Offline

    I Al Istannen

  3. Offline

    zoofzoof

    Yes, that is the one I have installed.
     
  4. Offline

    I Al Istannen

    @zoofzoof i just tried it out and everything worked perfect. Did you try redownloading the file? Or did you alter the language option? It has "nl-dutch" and "us-english".
     
  5. Offline

    zoofzoof

    It didn't work with the previous version of HPS (1.1.12) either. I haven't modified any of the language options and us-english would be fine for me.

    Could there be some problem with my server setup? Other plugins have worked like the Sorting Hat and Olivanders. I'm using Java version 1.8.0_06
     
  6. Offline

    I Al Istannen

    @zoofzoof Many plugins are build for 1.7, but it should be backwards compatible. Is this the full error?
    Do you have an "Locale" Folder in the "HarryPotterSpells" folder in the plugins folder?
     
  7. Offline

    zoofzoof

    According to the web page, it is compatible with 1.8.1. The prior version was compatible with 1.7.9 and for that I used my old copy of the spigot server. The errors associated with HPS are:
    Code:
    [14:27:14] [Server thread/INFO]: [HPS] Enabling HarryPotterSpells v1.1.3 BETA
    [14:27:14] [Server thread/ERROR]: [HPS] Could not generate language file /home/minimine/harrypotter/plugins/HarryPotterSpells/Locale/us-english.properties Ignore this message if you arent using this language
    [14:27:14] [Server thread/ERROR]: [HPS] Could not generate language file /home/minimine/harrypotter/plugins/HarryPotterSpells/Locale/nl-dutch.properties Ignore this message if you arent using this language
    [14:27:14] [Server thread/ERROR]: [HPS] Could not load default language. Plugin will not function.
    [14:27:14] [Server thread/ERROR]: [HPS] Disabling plugin...
    [14:27:14] [Server thread/INFO]: [HPS] Disabling HarryPotterSpells v1.1.3 BETA
    [14:27:14] [Server thread/ERROR]: Error occurred while disabling HarryPotterSpells v1.1.3 BETA (Is it up to date?)
    java.lang.NullPointerException
        at com.hpspells.core.HPS.onDisable(HPS.java:251) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:323) ~[spigot.jar:git-Spigot-2f787bd-a5b7881]
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:359) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:424) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at com.hpspells.core.Localisation.loadDefaultLang(Localisation.java:97) [HarryPotterSpells.jar:?]
        at com.hpspells.core.Localisation.load(Localisation.java:50) [HarryPotterSpells.jar:?]
        at com.hpspells.core.Localisation.<init>(Localisation.java:37) [HarryPotterSpells.jar:?]
        at com.hpspells.core.HPS.onEnable(HPS.java:64) [HarryPotterSpells.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at org.bukkit.craftbukkit.v1_8_R2.CraftServer.loadPlugin(CraftServer.java:356) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at org.bukkit.craftbukkit.v1_8_R2.CraftServer.enablePlugins(CraftServer.java:316) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at net.minecraft.server.v1_8_R2.MinecraftServer.r(MinecraftServer.java:416) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at net.minecraft.server.v1_8_R2.MinecraftServer.k(MinecraftServer.java:382) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at net.minecraft.server.v1_8_R2.MinecraftServer.a(MinecraftServer.java:337) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at net.minecraft.server.v1_8_R2.DedicatedServer.init(DedicatedServer.java:257) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:522) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_06]
    [14:27:14] [Server thread/WARN]: [HPS] Could not find the language file for language us-english. Reverting to default language...
    [14:27:14] [Server thread/ERROR]: Error occurred while enabling HarryPotterSpells v1.1.3 BETA (Is it up to date?)
    java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Matcher.java:1283) ~[?:1.8.0_06]
        at java.util.regex.Matcher.reset(Matcher.java:309) ~[?:1.8.0_06]
        at java.util.regex.Matcher.<init>(Matcher.java:229) ~[?:1.8.0_06]
        at java.util.regex.Pattern.matcher(Pattern.java:1093) ~[?:1.8.0_06]
        at java.util.Formatter.parse(Formatter.java:2547) ~[?:1.8.0_06]
        at java.util.Formatter.format(Formatter.java:2501) ~[?:1.8.0_06]
        at java.util.Formatter.format(Formatter.java:2455) ~[?:1.8.0_06]
        at java.lang.String.format(String.java:2925) ~[?:1.8.0_06]
        at com.hpspells.core.Localisation.getTranslation(Localisation.java:158) ~[?:?]
        at com.hpspells.core.spell.SpellManager.<init>(SpellManager.java:77) ~[?:?]
        at com.hpspells.core.HPS.onEnable(HPS.java:66) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot.jar:git-Spigot-2f787bd-a5b7881]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at org.bukkit.craftbukkit.v1_8_R2.CraftServer.loadPlugin(CraftServer.java:356) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at org.bukkit.craftbukkit.v1_8_R2.CraftServer.enablePlugins(CraftServer.java:316) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at net.minecraft.server.v1_8_R2.MinecraftServer.r(MinecraftServer.java:416) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at net.minecraft.server.v1_8_R2.MinecraftServer.k(MinecraftServer.java:382) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at net.minecraft.server.v1_8_R2.MinecraftServer.a(MinecraftServer.java:337) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at net.minecraft.server.v1_8_R2.DedicatedServer.init(DedicatedServer.java:257) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:522) [spigot.jar:git-Spigot-2f787bd-a5b7881]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_06]
    
     
  8. Offline

    I Al Istannen

    @zoofzoof If you open the jar with the zip viewer is there a "us-english.properties" file?
    And what is in the config file under the key: "Language"?
    This: "language: us-english" ?
     
  9. Offline

    zoofzoof

    Yes, and a nl-dutch.properties file as well. For what it is worth, I checked the md5sum and it matches that given on the web page.
     
  10. Offline

    I Al Istannen

    @zoofzoof What about creating the folder "Locale" in the Folder "HarryPotterSpells" and copying both of the language files there?
     
  11. Offline

    zoofzoof

    I tried that and it still says it "Could not generate language file" but the plugin is now enabled! Many thanks!
     
  12. Offline

    I Al Istannen

    @zoofzoof Lets hope that it stays that way ;) Glad i could help.
     
Thread Status:
Not open for further replies.

Share This Page