Holographic Displays

Holographic Displays

3M Downloads

Starting a hologram line with a Minecraft Format Code (&x) causes error upon reload and no holograms to display.

HamishWHC opened this issue ยท 9 comments

commented

My database.yml

Error:

[11:25:04] [Server thread/INFO]: HamishWHC issued server command: /holo reload
[11:25:04] [Server thread/ERROR]: Cannot load plugins\HolographicDisplays\database.yml
org.bukkit.configuration.InvalidConfigurationException: while scanning an anchor
 in 'string', line 19, column 5:
      - &5&kHW&r &5&lEnd Info&r &5&kHW
        ^
expected alphabetic or numeric character, but found &(38)
 in 'string', line 19, column 7:
      - &5&kHW&r &5&lEnd Info&r &5&kHW
          ^

        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:56) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:128) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:183) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at com.gmail.filoghost.holographicdisplays.disk.HologramDatabase.loadYamlFile(HologramDatabase.java:60) ~[?:?]
        at com.gmail.filoghost.holographicdisplays.commands.main.subs.ReloadCommand.execute(ReloadCommand.java:72) ~[?:?]
        at com.gmail.filoghost.holographicdisplays.commands.main.HologramsCommandHandler.onCommand(HologramsCommandHandler.java:115) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:723) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1658) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1498) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:918) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:911) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:895) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning an anchor
 in 'string', line 19, column 5:
      - &5&kHW&r &5&lEnd Info&r &5&kHW
        ^
expected alphabetic or numeric character, but found &(38)
 in 'string', line 19, column 7:
      - &5&kHW&r &5&lEnd Info&r &5&kHW
          ^

        at org.yaml.snakeyaml.scanner.ScannerImpl.scanAnchor(ScannerImpl.java:1452) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchAnchor(ScannerImpl.java:937) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:368) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:227) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.parser.ParserImpl$ParseIndentlessSequenceEntry.produce(ParserImpl.java:532) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(Composer.java:190) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:142) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:239) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:230) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:218) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:239) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:230) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:218) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:85) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:108) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:141) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:525) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:438) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:54) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        ... 24 more

I have tested with a different character beginning the hologram and the format codes will then work.

commented

After further testing, adding the ampersand as a unicode character in symbols.yml ([a]: \u0026) doesn't work (different error, below) and having a valid line first doesn't help either (same error as original).

commented
[11:32:24] [Server thread/ERROR]: Cannot load plugins\HolographicDisplays\database.yml
org.bukkit.configuration.InvalidConfigurationException: while parsing a block mapping
 in 'string', line 17, column 3:
      location: world, -163.500, 67.20 ...
      ^
expected <block end>, but found '<scalar>'
 in 'string', line 19, column 8:
      - [a]5[a]kHW[a]r [a]5[a]lEnd Info[a]r ...
           ^

        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:56) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:128) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:183) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at com.gmail.filoghost.holographicdisplays.disk.HologramDatabase.loadYamlFile(HologramDatabase.java:60) ~[?:?]
        at com.gmail.filoghost.holographicdisplays.commands.main.subs.ReloadCommand.execute(ReloadCommand.java:72) ~[?:?]
        at com.gmail.filoghost.holographicdisplays.commands.main.HologramsCommandHandler.onCommand(HologramsCommandHandler.java:115) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:723) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1658) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1498) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:918) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:911) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:895) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828) [spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
 in 'string', line 17, column 3:
      location: world, -163.500, 67.20 ...
      ^
expected <block end>, but found '<scalar>'
 in 'string', line 19, column 8:
      - [a]5[a]kHW[a]r [a]5[a]lEnd Info[a]r ...
           ^

        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:572) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:217) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:239) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:230) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:218) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:85) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:108) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:141) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:525) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:438) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:54) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-fc318cc]
        ... 24 more```
commented

I should also point out that in-game, Holographic Displays does not give an error, but says that the config loaded successfully in 3 to 4 ms. No holograms display, including when the invalid hologram is after a valid one in the file (e.g. in my db.yml, hub-1, 2 and 3 still do not display when placed before end-portal-info).

commented

Placing a valid character (e.g. a dot), at the beginning of the line will make it valid and work properly. A space does not work unfortunately.

commented

You should not edit that file manually. YAML requires single quotes (') around the line when using some special characters. Fixed line:
- '&5&kHW&r &5&lEnd Info&r &5&kHW'

commented

Thanks for the info! I didn't add the hologram myself, it was loaded from a text file through the commands. The holograms then wouldn't load due to the special character. Maybe you should add code to check for special characters when adding holograms in-game via text files?

commented

Did you use /hd readtext? If so, can you provide the file that caused the bug?

commented
commented

I can't reproduce the bug using the command on the latest version, I'm closing this.