These are chat archives for MylesIsCool/ViaVersion

31st
Mar 2016
Vislo
@Vislo
Mar 31 2016 01:12
So is hard as fuck?
Myles
@MylesIsCool
Mar 31 2016 12:36
Can someone with double right click bug open github issue (as i'm busy with other bugs) with detailed report of when it happens? Right clicking with what items and if it's on a block or in the air. etc <3
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 13:04
I would If I had the time... Need to get to work in 10 minutes. I'll be only available tomorrow and sunday, it's my birthday saturday ;)
Myles
@MylesIsCool
Mar 31 2016 13:08
awh hugo getting old :)
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 13:08
Yeah finally ;)
#300 Just before going to work, a small optimization ;)
Mats
@Matsv
Mar 31 2016 14:36
@MylesIsCool #301
Uh, I'll take a look at the issue, but you fixed it right?
Or did your fix break things like chests?
Myles
@MylesIsCool
Mar 31 2016 14:48
well it's not fixed i don't think
idk when it occurs
ty btw for 301
Mats
@Matsv
Mar 31 2016 15:24
@MylesIsCool @HugoDaBosss What do you think about this? Matsv/ViaVersion@ecc79b4 (WIP)
Myles
@MylesIsCool
Mar 31 2016 16:23
looks good @Matsv
Needs capitals for one of the descriptions
Debug mode one
Mats
@Matsv
Mar 31 2016 16:50
@MylesIsCool Alright any suggestions? All default commands in one file or leave it like this?
Myles
@MylesIsCool
Mar 31 2016 16:54
it's fine just needs the capitals of the debug cmd description :D
Mats
@Matsv
Mar 31 2016 16:54
Alright
@MylesIsCool #304
Myles
@MylesIsCool
Mar 31 2016 16:56
done :) good work
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:01
Sorry I really couldn't stand that mrjoki guy 😁
Myles
@MylesIsCool
Mar 31 2016 17:02
hugo is on a rampage :O
he was being an ass, the realistic truth is reloads break a lot of things :(
Mats
@Matsv
Mar 31 2016 17:02
Hahaha hugo
Or we just do Bukkit.shutdownServer(); on reloads
Myles
@MylesIsCool
Mar 31 2016 17:03
great
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:03
Can't you load the plugin on startup?
It won't reload after a reload then right?
Or am I wrong xd
Myles
@MylesIsCool
Mar 31 2016 17:03
all plugins are forced to reload
Mats
@Matsv
Mar 31 2016 17:03
Not sure
Myles
@MylesIsCool
Mar 31 2016 17:04
the reason the reload issue happens is because of the following
ViaVersionPlugin is in it's own classloader given to it by Bukkit
reload happens
It gets loaded again in a new one
already connected client uses ViaVersion.getPlugin("ViaVersion")
that instance of viaversion is not same as current one
explosions
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:05
Yeah that's the case with all plugin D:
Add a command to reload all other plugins?
And we should add a command to reload the config ;)
Thanks to @Matsv that's super easy now :D
Mats
@Matsv
Mar 31 2016 17:06
Are you able to override the /reload plugin?
Or cancel it somehow
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:06
CommandPreProcessEvent?
Not sure though
Myles
@MylesIsCool
Mar 31 2016 17:07
meh
Mats
@Matsv
Mar 31 2016 17:07
Hm but that doesn't get triggered if the console says it right?
Myles
@MylesIsCool
Mar 31 2016 17:07
I'm most likely gonna work on a patch
which allows reloads
gasp
but it means it will DC all connected clients
shrug
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:08
It's strange that we are getting this just after the 0.7.0 release, there was no one complaining before
Myles
@MylesIsCool
Mar 31 2016 17:08
it's because we're hitting people who use /reload
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:08
While the issue has always existed
Myles
@MylesIsCool
Mar 31 2016 17:08
and people who aren't intelligent enough to read a spigot.org post
Mats
@Matsv
Mar 31 2016 17:09

package us.myles.ViaVersion.api.protocol;

import lombok.Data;

    public static final Protocol v_1_7_1 = new Protocol(4, "1.7-1.7.5");
    public static final Protocol v_1_7_6 = new Protocol(5, "1.7.6-1.7.10");

    public static final Protocol v1_8 = new Protocol(47, "1.8.x");

    public static final Protocol v1_9 = new Protocol(107, "1.9");
    public static final Protocol v1_9_1 = new Protocol(108, "1.9.1");
    public static final Protocol v1_9_2 = new Protocol(109, "1.9.2");

    @Data
    public static class Protocol {
        private final int id;
        private final String name;
    }
}
What do you guys think about something like this? We need something like this to get the name for the /viaversion list, but it's stupid to change it in multiple classes :P
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:09
Yeah I was looking at it as well, enum won't work indeed
But you are not able to register more protocols right now
Myles
@MylesIsCool
Mar 31 2016 17:10
the issue I found was there's no way to lookup based on a version?
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:10
What issue do you mean @MylesIsCool ?
Myles
@MylesIsCool
Mar 31 2016 17:10
so how exactly do you get a Protocol from a version id
:)
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:11
Hahahah, good one ;)
Mats
@Matsv
Mar 31 2016 17:11
Hm yeah, but how did you get it now? Because it was not registered either
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:11
Doesn't @Data resolve that?
Mats
@Matsv
Mar 31 2016 17:11
Yes
Data makes
get
set
but not on final
get only
and tostring
etc
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:11
Yeah lombok is such a useful library :D
But you are not able to create some kind of set of all the protocols right now, right @Matsv ?
And that's what we need right now
Mats
@Matsv
Mar 31 2016 17:13
Hm yeah, but you don't really need that for this plugin though
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:13
Well for the /viaversion list command ;)
Mats
@Matsv
Mar 31 2016 17:13
Oh yeah
Woops
forgot
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:13
Or just keep it like that, and keep a list
Mats
@Matsv
Mar 31 2016 17:13
No
If we just change the api method
getPlayerVersion
Myles
@MylesIsCool
Mar 31 2016 17:14
Originally in my development version
I did use a Protocol class
instead of just an int
but I came into the issue I said that you can't get a version string from int :(
Mats
@Matsv
Mar 31 2016 17:14
Well, except you store the Protocol class in PlayerConnection
Myles
@MylesIsCool
Mar 31 2016 17:14
I mean there could be a version registry ;)
Mats
@Matsv
Mar 31 2016 17:14
UserConnection
or whatever that class is called :P
Myles
@MylesIsCool
Mar 31 2016 17:15
where would it get the number from after being given it?
(by the packets)
Mats
@Matsv
Mar 31 2016 17:15
Oh true
Iḿ stupid
Myles
@MylesIsCool
Mar 31 2016 17:15
if you had a protocol registry
you could do it
Mats
@Matsv
Mar 31 2016 17:16
Hm let me try something
Myles
@MylesIsCool
Mar 31 2016 17:16
well a version registry
haha
Hate me on my formatting, wrote it outside a compiler
I know the new Set<> line doesn't work, but you get the idea
Mats
@Matsv
Mar 31 2016 17:18
Hm could be but is making v_1_7_1 static vars still needed if you can get it by a version?
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:19
Well it's more convenient while coding
Much easier to use Protocol.V_1_7_1.getId(); , otherwise you would still need to use hardcoded protocol version values
I know it's not optimal resource-wise, but it's quite easy to use
Mats
@Matsv
Mar 31 2016 17:20
package us.myles.ViaVersion.api.protocol;

import lombok.Data;
import lombok.NonNull;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class ProtocolVersion {
    private static final Map<Integer, Protocol> versions = new HashMap<>();

    static {
        new Protocol(4, "1.7-1.7.5");
        new Protocol(5, "1.7.6-1.7.10");
        new Protocol(4, "1.8.x");
        new Protocol(108, "1.9.1");
        new Protocol(109, "1.9.2");
    }

    public static void register(Integer protocolId, @NonNull Protocol protocol){
        versions.put(protocolId, protocol);
    }

    public static Protocol getVersion(int id){
        return versions.get(id);
    }

    public static boolean containsVersion(int id){
        return versions.containsKey(id);
    }

    public static Map<Integer, Protocol> getVersions(){
        return Collections.unmodifiableMap(versions);
    }

    @Data
    public static class Protocol {
        private final int id;
        private final String name;
    }
}
Hm yeah but does some class use the v1_7_1
and v1_8
Oh yeah I see
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:21
The downside still is, that you need to use hardcoded protocol versions to check if a user is using a specific version
Mats
@Matsv
Mar 31 2016 17:21
it checks if version is higer then
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:25
Yeah that's basically what I said ;) But you don't register them right now?
Mats
@Matsv
Mar 31 2016 17:25
I do, in the static {}
Oh I dont
woops
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:26
And you mix Protocol and ProtocolVersion ;)
Mats
@Matsv
Mar 31 2016 17:26
Where?
I renamed it like that on the gist :P Was quick
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:27
Hahaha yeah these are just concepts, not working pieces of code ;)
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:29
@Data doesn't create getters D:
Mats
@Matsv
Mar 31 2016 17:30
Uh it does for me?
Do you have the Lombok plugin installed on intellij
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:30
Yeah, I have
Ah nvm, found the problem ;)
So this would be the final ProtocolVersion.java?
Mats
@Matsv
Mar 31 2016 17:32
Hm no, possibility to get all versions
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:33
Oh yeah, forgot that ;)
Mats
@Matsv
Mar 31 2016 17:33
And you can just instead of checking if it exists return versions.get(id)
It'll just return null if it doesn't exists
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:33
Yeah I hade some argument about that with myles, he preferred containsKey if I remember correctly as it was slightly faster
But because it will most likely always contain it, just get will be faster
Mats
@Matsv
Mar 31 2016 17:34
Oh is it? didn't know that
And maybe some containsVersion method
Happy now? :D
No jk xd
Mats
@Matsv
Mar 31 2016 17:37
Uhhh
Hmmm
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:37
Is there a better way for getProtocols?
Mats
@Matsv
Mar 31 2016 17:38
na
but
why do you only return the protocols?
Well it's not needed
But could be easy for the list command
to sort
:P
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:39
Hmm actually we don't even need a list, you could just create a HashMap<Integer, List<Player>>
Iterate through the online players, getProtocolVersion(), and put it in that map
Then iterate through the hashmap and use getProtocol(id) each time
Mats
@Matsv
Mar 31 2016 17:41
That s basicly what we are doing right now right?
Or do you mean something else
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:41
Oh didn't look at the new code, did not see you implemented this ;)
Mats
@Matsv
Mar 31 2016 17:42
:-D
Myles
@MylesIsCool
Mar 31 2016 17:44
looks fine excluding missing space on v1_9_2
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:44
Capatalise the V?
We had that in the previous one, although small v's look beter
Myles
@MylesIsCool
Mar 31 2016 17:44
there's a space missing lol
in the register line
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:44
Yeah I know ;)
But just something else
But capitalised v's or not?
Mats
@Matsv
Mar 31 2016 17:45
I'd say no
:P
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:45
^^
Mats
@Matsv
Mar 31 2016 17:46
Omg april first in 4 hours (Netherlands) :cry:
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:46
Yeah, guess we are not going to make this D:
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 17:51
#305 @MylesIsCool
Mats
@Matsv
Mar 31 2016 17:52
:+1:
Myles
@MylesIsCool
Mar 31 2016 17:59
is it tested
;)
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 18:00
No :D
Myles
@MylesIsCool
Mar 31 2016 18:00
are you on pc
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 18:00
Yeah I am, will test in a sec
Just installing mats' nodejs script
Myles
@MylesIsCool
Mar 31 2016 18:01
test before i pull cause i noob and dont know how to test PRs
or it just takes too long imo
haha
Mats
@Matsv
Mar 31 2016 18:02
Yeah it's a lot of work to test PR's before merging :P
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 18:03
Well you could rebase locally, just define
git remote add hugo https://github.com/HugoDaBosss/ViaVersion.git
git fetch hugo
git rebase hugo/master
And then build ;)
Mats
@Matsv
Mar 31 2016 18:04
Yeah, I see that as a lot of work, maybe it's just me being lazy
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 18:04
And stash after you build it
Mats
@Matsv
Mar 31 2016 18:04
:P
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 18:04
Hahahah yeah probably, it's still beter for the PR creator to test it
Since he already has it ;)
Myles
@MylesIsCool
Mar 31 2016 18:10
tell me when yo tested
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 18:32
Need to cook dinner right now, so I won't be able to for another hour
But you are not planning on releasing a new version right?
Mats
@Matsv
Mar 31 2016 18:32
Enjoy ;)
Mats
@Matsv
Mar 31 2016 18:54
@MylesIsCool #306
Lol travis bugged out because you was too fast :P
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 20:12
Isn't it strange you have two instances, one for the command and one for the auto complete?
Why don't just use the same instance
Mats
@Matsv
Mar 31 2016 20:46
It's the same right?
or do you mean the bukkit api?
fillefilip8
@fillefilip8
Mar 31 2016 20:47
"[quote uid=2897 name="Mylescomputer" post=1443582]As said in the main post, reload is not supported due to the way the protocol works.<br /><br />Thanks. Consider reading before posting.[/QUOTE]<br />Ohhh, okey, sorry i dont speak english and I will not read it"
11/10
I love it
Mats
@Matsv
Mar 31 2016 20:49
Oh lol thanks hugo
I really should sleep, making stupid bugs
Myles
@MylesIsCool
Mar 31 2016 20:49
sleep then :D
Mats
@Matsv
Mar 31 2016 20:49
@MylesIsCool #307
I will ;)
See you guys later :)
Myles
@MylesIsCool
Mar 31 2016 20:54
no
thats legit
jesus mats
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 20:55
Yeah didn't you hear about this @Matsv ?
Myles
@MylesIsCool
Mar 31 2016 20:55
it's coded in c#
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 20:55
Yeah it has been digitalized
Mats
@Matsv
Mar 31 2016 20:56
Well at least they make the important features first ;)
But the important question is, Does it have another protocol ID?
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:00
I can join a server with ViaVersion just fine ;)
But it is not the 1.9 protocol id
Because bungee is not supported
So probably 108 or 109
Mats
@Matsv
Mar 31 2016 21:00
Ah so we don't have to support it, probably 1.9.2 protocol is?
id
yeah
Myles
@MylesIsCool
Mar 31 2016 21:01
hugo
can you check your update
plz
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:02
Ughh, yeah sure ;)
Mats
@Matsv
Mar 31 2016 21:06
How do you get that?
it's working normally for me
:(
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:06
Latest prerelease
1.0RV something like that
Mats
@Matsv
Mar 31 2016 21:06
I'm on the latest
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:06
It's the holovision
Myles
@MylesIsCool
Mar 31 2016 21:07
I got reloads somewhat working
just doesnt work with protocol lib
yay
Mats
@Matsv
Mar 31 2016 21:07
Well do the people deserve a reload fix? :P
Myles
@MylesIsCool
Mar 31 2016 21:07
no
Mats
@Matsv
Mar 31 2016 21:07
:+1:
Put the 'smarter watch' in your offhand, youll get the time in your actionbar ;)
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:15
Yeah I know
And it will track your stats
Myles
@MylesIsCool
Mar 31 2016 21:16
weird how this new snapshot has better stability than any of the other mc updates shrug
Mats
@Matsv
Mar 31 2016 21:16
Yeah they worked on it since april second 2015
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:16
I think it should be just as stable as 1.9.2?
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:21
@MylesIsCool it's not working
Mats
@Matsv
Mar 31 2016 21:22
Woooo
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:22
No idea why, let me double double check
Mats
@Matsv
Mar 31 2016 21:22
:DDDD
oh
not
Woops
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:22
It's because of you @Matsv :angry: :angry:
You mistyped 47
Mats
@Matsv
Mar 31 2016 21:23
Well you copied it
I blame you
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:23
Hmm you probably should ;)
Mats
@Matsv
Mar 31 2016 21:23
Oh you copied my thingy before the other gist. the next gist i fixed it :P
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:24
Ahh that explains it ;)
The april fools is using 1.9.1, so 108 as protocol version ;)
Mats
@Matsv
Mar 31 2016 21:25
Ah, Mojang was too lazy to update to 1.9.2 :P
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:25
Yeah they were probably working on it before 1.9.2
Mats
@Matsv
Mar 31 2016 21:26
Or got it working and didn't want to solve merge conflicts :P
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:32
It's working btw now @MylesIsCool ;)
Mats
@Matsv
Mar 31 2016 21:44
See you guys later, I'm going to sleep now, forgot I would because of the snapshot whoops
Myles
@MylesIsCool
Mar 31 2016 21:45
Added reload support to some extent
forces me to kick all players if using protocol lib
but I suppose it's better than nothing...
Eventually I'll try get 100% compatibility but hey
Hugo Kerstens
@HugoDaBosss
Mar 31 2016 21:57
Hahaha yeah nice work ;)