[SPIGOT-31] Getting kicked caused by an Book. Created: 29/Nov/14  Updated: 30/Nov/14  Resolved: 30/Nov/14

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: 1337Zero Assignee: Thinkofname
Resolution: Fixed Votes: 2
Labels: None
Environment:

Debian 7.6 x64


Attachments: PNG File Minecraft_1.8_Error.PNG     File daf45dfd-da9b-498b-96e4-5782bbac11c7.dat     Text File latest.log    

 Description   

I got a book in my Inventory, every time someone tried to read it he will be kicked out of game.
the error in the console:

[02:00:18] [Server thread/INFO]: 1337Zero[/79.207.201.82:50078] logged in with entity id 1436 at ([world] 215.3414886916949, 64.0, 273.4011264176181)
[02:00:18] Netty Server IO #1/ERROR: org.bukkit.craftbukkit.libs.com.google.gson.JsonSyntaxException: org.bukkit.craftbukkit.libs.com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 14
[02:00:18] Netty Server IO #1/ERROR: org.bukkit.craftbukkit.libs.com.google.gson.JsonSyntaxException: org.bukkit.craftbukkit.libs.com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 14
[02:00:18] [Server thread/INFO]: 1337Zero lost connection: Disconnected
[02:00:18] [Server thread/INFO]: left 1337Zero



 Comments   
Comment by LukeHandle [ 30/Nov/14 ]

In regards to the Vanilla behaviour, is this not implementable in Spigot?

Comment by Thinkofname [ 30/Nov/14 ]

This is caused by plugins changing between writable and written books, I introduced a fix for this but sadly it won't apply to existing books, you'll have to remove those manually

Comment by xtend [ 30/Nov/14 ]

Tested in vanilla minecraft server 1.8 with given .dat, book contents changed to "* Invalid book tag *", same .dat in git-Spigot-"37c8819" will kick player from the server.

Comment by 1337Zero [ 30/Nov/14 ]

Hm, but my client crashes with a 1.8 Server and a 1.8 Client ...
if someone want to try it cultcraft.de:25573
if i try to read that book everytime i get this error.
(Sometimes) I can't join again,i got kicked with the same message, have to delete my file in /playerdata

Comment by Fabian Faßbender [ 30/Nov/14 ]

Books given in 1.7 can crash the Client. 1.8 Books (given with the new Spigot) should be fine.

Comment by 1337Zero [ 30/Nov/14 ]

The file i uploaded was given in 1.8

Comment by externo6 [ 30/Nov/14 ]

For us, 1.7

Comment by Fabian Faßbender [ 30/Nov/14 ]

Was the Book given in 1.8 or 1.7?

Comment by 1337Zero [ 29/Nov/14 ]

Playerdata from my char "1337Zero" with the book that causes a kick

Comment by externo6 [ 29/Nov/14 ]

Yes the player dat

Comment by 1337Zero [ 29/Nov/14 ]

The book was given from a plugin i wrote myself... Its load the data from a .txt file and builds a book out of it.
Somehow the plugin loaded an file that doesn't exist and created out of these data a book with causes this issue.

private BookMeta getBookMetafromPath(BookMeta bmeta,String path){
List<String> list = loadStringListFromFile(path);
List<String> lorelist = new ArrayList<String>();
lorelist.add("No description here");
bmeta.setAuthor("Noone has written this ;D");
bmeta.setTitle("No Title found");
bmeta.setLore(lorelist);
for(int i = 0; i < list.size();i++){
if(list.get.contains("author:"))

{ bmeta.setAuthor(ch.ColorIt(replaceUmlaute(list.get(i).split("author:")[1]))); }

else if(list.get.contains("title:"))

{ bmeta.setTitle(ch.ColorIt(replaceUmlaute(list.get(i).split("title:")[1]))); }

else if(list.get.contains("description:"))

{ bmeta.setLore(replaceUmlaute(list.get(i).split("description:")[1].split(";"))); }

else

{ bmeta.addPage(replaceUmlaute(list.get(i))); }

}
return bmeta;
}
That is the function witch creates the Bookmeta with will define the book.
I think there is a problem with the lengh of the lore list, or some not definied values in bookmeta.

With .dat you mean the file stored in world/playerdata ?

Comment by LukeHandle [ 29/Nov/14 ]

In terms of reproducing, it may be useful to upload your .dat file with the book in it.

Comment by externo6 [ 29/Nov/14 ]

We also have this, same error message.

Comment by GunfighterJ [ 29/Nov/14 ]

Moved to SPIGOT. This is a spigot bug, not a build tools bug. Please review which project you are submitting a ticket to.

Generated at Fri Mar 14 14:28:21 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.