Help with PS lang. config!

Discussion in 'Spigot Plugin Help' started by MrSpomg, Mar 5, 2018.

  1. I'm having some trouble with the language config of Precious Stones (@phaed), I hope you can help as phaed hasn't connect for a long time.

    Lang file: https://justpaste.it/1hvcq

    It throws this:
    Code (Text):
    [13:25:30 ERROR]: Error occurred while enabling PreciousStones v10.7.2 (Is it up to date?)
    org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
            at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:254) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:160) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.scanner.ScannerImpl.scanPlain(ScannerImpl.java:2003) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchPlain(ScannerImpl.java:1046) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:401) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:557) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:157) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:147) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:227) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:154) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:140) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:524) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:452) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at net.sacredlabyrinth.Phaed.PreciousStones.managers.LanguageManager.loadFile(LanguageManager.java:61) ~[?:?]
            at net.sacredlabyrinth.Phaed.PreciousStones.managers.LanguageManager.check(LanguageManager.java:44) ~[?:?]
            at net.sacredlabyrinth.Phaed.PreciousStones.managers.LanguageManager.load(LanguageManager.java:35) ~[?:?]
            at net.sacredlabyrinth.Phaed.PreciousStones.managers.LanguageManager.<init>(LanguageManager.java:30) ~[?:?]
            at net.sacredlabyrinth.Phaed.PreciousStones.PreciousStones.onEnable(PreciousStones.java:127) ~[?:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:403) [spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:382) [spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:331) [spigot.jar:git-Spigot-00128b5-558c5a3]
            at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:422) [spigot.jar:git-Spigot-00128b5-558c5a3]
            at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:383) [spigot.jar:git-Spigot-00128b5-558c5a3]
            at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:338) [spigot.jar:git-Spigot-00128b5-558c5a3]
            at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) [spigot.jar:git-Spigot-00128b5-558c5a3]
            at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [spigot.jar:git-Spigot-00128b5-558c5a3]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]
    Caused by: java.nio.charset.MalformedInputException: Input length = 1
            at java.nio.charset.CoderResult.throwException(Unknown Source) ~[?:1.8.0_144]
            at sun.nio.cs.StreamDecoder.implRead(Unknown Source) ~[?:1.8.0_144]
            at sun.nio.cs.StreamDecoder.read(Unknown Source) ~[?:1.8.0_144]
            at java.io.InputStreamReader.read(Unknown Source) ~[?:1.8.0_144]
            at org.yaml.snakeyaml.reader.UnicodeReader.read(UnicodeReader.java:125) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:223) ~[spigot.jar:git-Spigot-00128b5-558c5a3]
            ... 31 more

    I even decompiled the plugin and the line 61 of the LanguageManager.java is this:
    Code (Text):
        private void loadFile() {
            try {
                InputStream fileLanguage = new FileInputStream(file);
                HashMap<String, Object> objects = (HashMap<String, Object>) new Yaml().load(fileLanguage); // 61
                if (objects != null) {
                    language.putAll(objects);
                }
            } catch (FileNotFoundException e) {
                // file not found
            }
        }

    Any idea? Thanks for reading!
     
  2. Será que tienes un lang de precious stones que me puedas dar para mí servidor es que uso un plugin de clanes de este y necesito una traducción en español de las protecciones
     
  3. I am unsure, but perhaps it has something to do with the fact that some of the configurable commands are only one character long. Couldn't find the default config, so maybe that is supposed to be possible. But that is all I could think about at least.
     
  4. A mi me paso lo mismo con el plugin simpleclans de bukkit ya que el creador es el mismo y bueno lo que yo hice para no tener esos errores de comandos es dejar la configuración default y ir mensaje por mensaje traduciendo pero cada mensaje que traducía le ponía un /plugin reload en este caso sería /ps reload y siempre ve la consola que no tenga errores o algún problema
     
  5. I am sorry, that was a long time ago and I don't have the files anymore. Moreover, I am not on the topic... so I am not sure if I can help you. I hope you the best, though!

    (¡Suerte!)