Holographic Displays

Holographic Displays

3M Downloads

My hologram images disapear

kavkec opened this issue · 7 comments

commented

Hello!

After every restart of my server i get this error messege in my console: [15:43:39 WARN]: [HolographicDisplays] Hologram 'skyblocksign' not found, skipping it.
[15:43:39 WARN]: [HolographicDisplays] Hologram 'prisonsign' not found, skipping it.

When i try to load it from plugins folder it says it doesnt find it, but when i try these two links:
http://skms.si/prenosi/slike/SKYBLOCK%20logo.png
http://skms.si/prenosi/slike/prison%20znak.png

it works normally until server restart.

And when i try commands such as: addline or something simillar i get this error messege:

[15:48:21 INFO]: kavkec issued server command: /hd addline prisonportal test
[15:48:21 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'hd' in plugin HolographicDisplays v2.4.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:48) ~[skms.jar:git-Bukkit-84f3da3]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:140) ~[skms.jar:git-Bukkit-84f3da3]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:684) ~[skms.jar:git-Bukkit-84f3da3]
at net.minecraft.server.v1_13_R2.PlayerConnection.handleCommand(PlayerConnection.java:1570) ~[skms.jar:git-Bukkit-84f3da3]
at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1424) ~[skms.jar:git-Bukkit-84f3da3]
at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(SourceFile:37) ~[skms.jar:git-Bukkit-84f3da3]
at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(SourceFile:9) ~[skms.jar:git-Bukkit-84f3da3]
at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:9) ~[skms.jar:git-Bukkit-84f3da3]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_241]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241]
at net.minecraft.server.v1_13_R2.SystemUtils.a(SourceFile:199) [skms.jar:git-Bukkit-84f3da3]
at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:839) [skms.jar:git-Bukkit-84f3da3]
at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:382) [skms.jar:git-Bukkit-84f3da3]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:792) [skms.jar:git-Bukkit-84f3da3]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:695) [skms.jar:git-Bukkit-84f3da3]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
Caused by: java.lang.NoClassDefFoundError: net/md_5/bungee/api/chat/ComponentBuilder
at com.gmail.filoghost.holographicdisplays.commands.main.subs.EditCommand.sendQuickEditCommands(EditCommand.java:110) ~[?:?]
at com.gmail.filoghost.holographicdisplays.commands.main.subs.AddlineCommand.execute(AddlineCommand.java:77) ~[?:?]
at com.gmail.filoghost.holographicdisplays.commands.main.HologramsCommandHandler.onCommand(HologramsCommandHandler.java:115) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[skms.jar:git-Bukkit-84f3da3]
... 15 more
Caused by: java.lang.ClassNotFoundException: net.md_5.bungee.api.chat.ComponentBuilder
at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_241]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:136) ~[skms.jar:git-Bukkit-84f3da3]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:82) ~[skms.jar:git-Bukkit-84f3da3]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_241]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_241]
at com.gmail.filoghost.holographicdisplays.commands.main.subs.EditCommand.sendQuickEditCommands(EditCommand.java:110) ~[?:?]
at com.gmail.filoghost.holographicdisplays.commands.main.subs.AddlineCommand.execute(AddlineCommand.java:77) ~[?:?]
at com.gmail.filoghost.holographicdisplays.commands.main.HologramsCommandHandler.onCommand(HologramsCommandHandler.java:115) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[skms.jar:git-Bukkit-84f3da3]
... 15 more

Thank you for your help in advance

Best regards

David (kavkec)

commented

Having the same issue. Looking at the database.yml it seems to save the beginning portions of the hologram config but saves the actual signage as "-null"

WorldSpawn:
  location: theHeadquarters, 1618.478, 68.236, -4260.099
  lines:
  - null
  - null
  - null
  - null
  - null
  - null
  - null
commented

It looks like in the save portion of the code, it is pushing the line into lines (after serializeHologramLine(line)) but serializeHologramLine is calling "return line.getSerializedConfigValue();" which is never set so it returns NULL and saves to database.yml as NULL
Because it is null, the addline is getting a NPE
I'm looking at a workaround for the save line portion of the code. It either needs to call setSerializedConfigValue at some point or something to instantiate the "serializedConfigValue" it is trying to call back to.

commented

After further review, I found it was ONLY affecting holograms that used "readtext"

@Override
	public CraftTextLine appendTextLine(String text) {
		Validator.isTrue(!deleted, "hologram already deleted");
		
		CraftTextLine line = new CraftTextLine(this, text);
		//lines.add(line);
		this.getLinesUnsafe().add(HologramDatabase.deserializeHologramLine(text, this));
		refreshSingleLines();
		return line;
	}

Updating the CraftHologram.java with the lines above corrects the issue

I'll save to GitHub and issues a pull request

commented

After further review, I found it was ONLY affecting holograms that used "readtext"

@Override
	public CraftTextLine appendTextLine(String text) {
		Validator.isTrue(!deleted, "hologram already deleted");
		
		CraftTextLine line = new CraftTextLine(this, text);
		//lines.add(line);
		this.getLinesUnsafe().add(HologramDatabase.deserializeHologramLine(text, this));
		refreshSingleLines();
		return line;
	}

Updating the CraftHologram.java with the lines above corrects the issue

I'll save to GitHub and issues a pull request

Do you happen to have a .jar to download?
Would really appreciate it.
Thank you in advance

commented

This is a build from my fork of this project. It is a SNAPSHOT of 2.4.2 and includes the fix from above. I offer this as a stop-gap measure until the pull request is approved and will remove if not preferred by original auther. As such I offer this with limited support and the warning of "use at your own risk"

https://www.dropbox.com/s/gdv5aa8axc5serp/holographicdisplays-plugin-2.4.2-SNAPSHOT.jar?dl=0

commented

This is a build from my fork of this project. It is a SNAPSHOT of 2.4.2 and includes the fix from above. I offer this as a stop-gap measure until the pull request is approved and will remove if not preferred by original auther. As such I offer this with limited support and the warning of "use at your own risk"

https://www.dropbox.com/s/gdv5aa8axc5serp/holographicdisplays-plugin-2.4.2-SNAPSHOT.jar?dl=0

This works like a charm. Images are not stored as NULL anymore in the database.yml file

commented

It was the same bug described in #266, it's fixed now.