Weird formatting bug #5


  • Defect
  • Replied
Open
Assigned to _ForgeUser7218017
  • _ForgeUser9138396 created this issue Jul 7, 2012

    Hello,

    Firstly, I want to say this plugin seems great! However, I'm having the same problem as Melonking (http://dev.bukkit.org/server-mods/newsletter/?comment=8). I am running CraftBukkit 1.2.5-R4.0.

    When I use the default prefix, there is no colour translation and it shows the ?x symbols to the player:

      prefix: ?6[?aNEWSLETTER?6] ?f
    


    I tried changing it to the following line which works and does the colour substitution, but I get the following errors in the console and it reverts to default config:

      prefix: &6[&aNEWSLETTER&6] &f
    

    org.bukkit.configuration.InvalidConfigurationException: while scanning an anchor
     in "<string>", line 40, column 11:
          prefix: &6[&aNEWSLETTER&6] &f
                  ^
    expected alphabetic or numeric character, but found [(91)
     in "<string>", line 40, column 13:
          prefix: &6[&aNEWSLETTER&6] &f
                    ^
    
            at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55)
            at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:138)
            at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:105)
            at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:175)
            at me.xepherx.plugins.Newsletter.createDirAndConfig(Newsletter.java:172)
            at me.xepherx.plugins.Newsletter.reload(Newsletter.java:299)
            at me.xepherx.plugins.Commands.CommandDistributor.onCommand(CommandDistributor.java:61)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:479)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:821)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
            at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
            at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:567)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:459)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    


    So I tried changing it to the following line which doesn't give an error, but also doesn't do the colour substitution, and just shows the & symbols:

      prefix: "&6[&aNEWSLETTER&6] &f"
    


    What I am doing wrong? Can you help me?

  • _ForgeUser9138396 added the tags New Defect Jul 7, 2012
  • _ForgeUser7218017 posted a comment Jul 23, 2012

    What editor were you using?

  • _ForgeUser7218017 removed a tag New Aug 10, 2012
  • _ForgeUser7218017 added a tag Waiting Aug 10, 2012
  • _ForgeUser9242139 posted a comment Aug 2, 2013

    The correct way is:

    prefix: '&6[&aNEWSLETTER&6] &f'

  • _ForgeUser9242139 removed a tag Waiting Aug 2, 2013
  • _ForgeUser9242139 added a tag Replied Aug 2, 2013

To post a comment, please login or register a new account.