Closed fuzzybot closed 10 years ago
@TheUnnamedDude Not the same implementation of this pull? Some plugins may use PlayerInfo. Maybe a gist of how to use this implementation?
It would work the same way, you are just not able to set the "id"
I can understand that you might want to save an object, but I think the current implementation must give different JSON output than the PR - Something like
sample: [ "player1", "player2"]
, the PR should give
sample: {{name: "player1", id: "aaaa"}, {name: "player2", id: "aaaa"}}
Does it work the same way, actually?
@TheUnnamedDude But there is no PlayerInfo, which the pull added.
It was fixed in the last commit
@TheUnnamedDude This doesn't seem to be working? It says the server is outdated when I modify the sample, but when I modify anything else it works fine. Using this code: https://gist.github.com/thesbros/47df1ede2611f62d9be0
@thesbros Can you try your test code with your PR code and give the output JSON of both? We might prove a point this way :P
@xxyy My code worked fine with this pull. But when TheUnnamedDude merged it and changed it, it did not work. If I use this pull and switch the code to work with it then it works fine. I'll just stick with my fork that has this merged until he tells me how to use it and / or fixes it (not sure if its broken or if I just don't know how to use it)
@thesbros See https://github.com/TheUnnamedDude/BungeeCord/pull/4#issuecomment-29231010 - I think this is the problem. It could help if you provided the generated JSON for both methods (Use you IDE's Debug function along with this VM attach thing: http://forums.bukkit.org/threads/tutorial-remote-debugging-with-bukkit.92081/ (This is for Eclipse, but it works very similar in NetBeans))
@xxyy I'm using Eclipse. On it, brb!
@xxyy Bleh, nothing is working, java outdated, won't start with those params, accidentally exported nothing and already switched libraries..... Sorry, can't do it D: Here's the code that wasn't working if you want to try: https://gist.github.com/thesbros/47df1ede2611f62d9be0 for the pull code, just use the gist that the pull desc has. Here's the pull jar: REMOVEDEDEDEDSTUFFVIRUSESWAAT
@thesbros Oh, I hate those sites where there are 5 download buttons and 4 of them install viruses on your system :-1: JSON with this PR:
{
"version":{
"name":"1.6.2-1.7.3",
"protocol":4
},
"players":{
"max":1,
"online":0,
"sample":[
{
"name":"§l§e---------------------------",
"id":"aaaa"
},
{
"name":"§l§7fuzzy_bot",
"id":"aaaa"
},
{
"name":"§l§e---------------------------",
"id":"aaaa"
}
]
},
"description":"Just another BungeeCord - Forced Host"
}
And here's the JSON for the current implementation (Note that it DOES NOT work, I believe the client error does not mean "wrong version" but "invalid JSON".
{
"version":{
"name":"1.6.2-1.7.3",
"protocol":4
},
"players":{
"max":1,
"online":0,
"sample":[
{
"name":"hi"
},
{
"name":"bye"
}
]
},
"description":"Just another BungeeCord - Forced Host"
}
(Seems the issue I saw before has been fixed - Still, the client seems to miss the "id" very badly - I suggest something like UUID#randomUUID().)
important edit: Look what I found in the Client Console :)
[23:17:52 INFO]: Client> [23:17:52] [Client thread/ERROR]: Can't ping localhost:4242: Internal Exception: io.netty.handler.codec.DecoderException: com.google.gson.JsonSyntaxException: Missing id, expected to find a string
Example on usage (similar to how you do it in upstream bungee 1.7.2): https://gist.github.com/mccore/7595129