These are chat archives for MylesIsCool/ViaVersion

15th
May 2016
Phineas
@Phineas
May 15 2016 14:13
People can't join on the latest 1.9.4 version
Mats
@Matsv
May 15 2016 14:14
What spigot version do you use?
And if you are using bungeecord, do you use the latest?
Phineas
@Phineas
May 15 2016 14:14
[10:14:19 INFO]: This server is running CraftBukkit version git-Spigot-e4d4710-e1ebe52 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
[10:14:19 INFO]: Checking version, please wait.
I have the latest bungee, yes
Mats
@Matsv
May 15 2016 14:14
Any errors in the console?
What's the output of /version ViaVersion
Phineas
@Phineas
May 15 2016 14:14
No
It just says
Mats
@Matsv
May 15 2016 14:15
Hm but 1.9.2 does work?
Phineas
@Phineas
May 15 2016 14:15
I think so, yes
Trying now..
Yep
works 1.9.2
Mats
@Matsv
May 15 2016 14:16
Hm could you give the output of /version viaversion
And /pl
Phineas
@Phineas
May 15 2016 14:16
[10:16:36 INFO]: ViaVersion version 0.7.3-SNAPSHOT
[10:16:36 INFO]: Author: _MylesC
Mats
@Matsv
May 15 2016 14:17
Use the latest viaversion
You are 8 versions behind
:P
Phineas
@Phineas
May 15 2016 14:17
Uh
I just pulled from git
Mats
@Matsv
May 15 2016 14:17
From upstream? :)
Oh wait you didn't fork it
Hm, do you have unstashed changes?
Phineas
@Phineas
May 15 2016 14:18

cd /home/frosted/bungee/deploy/plugindrops

wget https://github.com/MylesIsCool/ViaVersion/archive/master.zip
unzip -o master.zip
cd ViaVersion-master
mvn package
rm ../master.zip
cd target
cp ViaVersion*.jar ../../FrostedProtocol.jar
cd ../../
rm -rf ViaVersion-master

Mats
@Matsv
May 15 2016 14:18
/ uncommited
Oh
Like that
Phineas
@Phineas
May 15 2016 14:18
Thats what I do
Mats
@Matsv
May 15 2016 14:19
Hm did you make sure every other possible ViaVersion jars files are gone from the plugin folder?
Phineas
@Phineas
May 15 2016 14:20
It goes to the template folder then I just recreate the servers with a cmd
should work
wait
I might know the issue, one sec
Alright I fixed it :p
Mats
@Matsv
May 15 2016 14:21
:)
Faizaan
@SirFaizdat
May 15 2016 20:06
Kotlin is a godsend
Mats
@Matsv
May 15 2016 20:07
Oh? What's your experience with it?
I asked some people but mostly didn't use it
:P
some features looks pretty interesting
Faizaan
@SirFaizdat
May 15 2016 20:08
Let's just say I've never fallen in love with a programming language before, and then I found this
    override fun onEnable() {
        server.pluginManager.registerEvents(this, this)
        logger.info { "Hello, world!" }
    }

    @EventHandler fun onJoin(event: PlayerJoinEvent)  {
        event.joinMessage = "Welcome, ${event.player.name}!"
    }
I don't know how to describe it, it's the kind of thing that you have to try for yourself to see how awesome it is
Mats
@Matsv
May 15 2016 20:09
Yeah it looks good, couldn't you also use just normal Java with it
or was that something else
Faizaan
@SirFaizdat
May 15 2016 20:09
Yes
Mats
@Matsv
May 15 2016 20:10
Can't you btw just use event fun
instead of @EventHandler fun
Faizaan
@SirFaizdat
May 15 2016 20:11
No I don't think so
But yes, Java classes can be used alongside Kotlin classes, and the other way around as well
Mats
@Matsv
May 15 2016 20:13
Oh yeah I see
was looking at a kotlin code
you'd have to use this to make that work
import org.bukkit.event.EventHandler as event
Faizaan
@SirFaizdat
May 15 2016 20:14
But then you do @event
Mats
@Matsv
May 15 2016 20:14
Nope
only event
Faizaan
@SirFaizdat
May 15 2016 20:14
I just tried it and it's an error
Faizaan
@SirFaizdat
May 15 2016 20:14
Hmm
Mats
@Matsv
May 15 2016 20:14
Oh strange
Faizaan
@SirFaizdat
May 15 2016 20:15
Oh wow
That's Kotlin 0.12, I'm using 1.0.2
They must've changed it
I didn't know about the "as" feature though, that's useful
My productivity has gone up drastically, because there's no need to write all the extra code to do something simple
Mats
@Matsv
May 15 2016 20:18
But Is everything in kotlin like JavaScript 'val'(well var)?
Faizaan
@SirFaizdat
May 15 2016 20:18
I could even write onDisable like this:
override fun onDisable() = logger.info { "Goodbye" }
val is for constants, var is for non-constants
I really enjoy writing in it, the only thing stopping me from porting my open source projects is that Kotlin isn't as popular as Java, so there may be fewer contributors
Then again, Java can be written alongside it
Mats
@Matsv
May 15 2016 20:23
Hm yeah, I'm going to try it out soon when I have more time
But the autocomplete knows when it's a certain class if the type is Val?
Faizaan
@SirFaizdat
May 15 2016 20:24
Yes
Type inferencing and smart casting are my two favorite features
override fun onCommand(sender: CommandSender, ...) {
        if(sender !is Player) return
        sender.getInventory().doStuff()
}
As opposed to ((Player) sender).doStuff();
Mats
@Matsv
May 15 2016 20:27
Ah that's great
thats the thing I hate about Java :P
Faizaan
@SirFaizdat
May 15 2016 20:28
Another thing is the null safety
Mats
@Matsv
May 15 2016 20:36
Oh yeah
I like the data class
little bit like Lombok but easier :)
Faizaan
@SirFaizdat
May 15 2016 20:39
And more easy to spot
Mats
@Matsv
May 15 2016 20:39
True true
Faizaan
@SirFaizdat
May 15 2016 20:39
My eye usually jumps past class annotations because they're usually @SuppressWarnings
Mats
@Matsv
May 15 2016 20:39
are you good with JavaScript?
Faizaan
@SirFaizdat
May 15 2016 20:39
Not really , no
Mats
@Matsv
May 15 2016 20:41
Hm yeah well I use Lombok for almost everything so I don't really have that problem, but probably others will
Faizaan
@SirFaizdat
May 15 2016 20:43
As soon as I saw Hello world in Kotlin I got deeply interested
fun main(args: Array<String>) {
      println("Hello, world!")
}
is much simpler than
public class MyClass {
          public static void main(String[] args) {
                       System.out.println("Hello, world!");
          }
}
Mats
@Matsv
May 15 2016 20:54
When is in kotlin a method static?
Faizaan
@SirFaizdat
May 15 2016 20:54
There are no static methods
However there are two ways to achieve the same effect
Either by creating package level methods (i.e. not in a class) or by creating a companion object within a class
So if you want to access a plugin's main class statically, this works:
    companion object {
        fun get(): Prison {
            return Bukkit.getServer().pluginManager.getPlugin("Prison") as Prison
        }
    }
In other classes, you'd just call Prison.get()
Mats
@Matsv
May 15 2016 20:59
Ah :)
Faizaan
@SirFaizdat
May 15 2016 20:59
That's another thing I actually like about Kotlin
The absence of static, it causes a lot more problems than it solves
The fact that everything in Bukkit is static prevents things such as unit tests and easily implementing custom behavior without editing CraftBukkit itself
Mats
@Matsv
May 15 2016 21:13
Yeah true
Mats
@Matsv
May 15 2016 21:54
If anyone is interested, you can also join #viaversion on the spigot irc
Faizaan
@SirFaizdat
May 15 2016 21:55
What's the difference between this and the IRC?
Myles
@MylesIsCool
May 15 2016 21:57
i sing on the irc, i don't sing here ;)
Nah nothing we're hoping to support both so we can help more people aha
Faizaan
@SirFaizdat
May 15 2016 21:57
Ah
Mats
@Matsv
May 15 2016 22:10
Such a good license, http://www.wtfpl.net/txt/copying/
Faizaan
@SirFaizdat
May 15 2016 22:11
(applause)
Phineas
@Phineas
May 15 2016 22:12
If people try to send packets before PostLogin, it kicks them (Proxy - lost connection to the server.)
Like by pressing w before fully logged in
Mats
@Matsv
May 15 2016 22:13
Any errors in both consoles?
Phineas
@Phineas
May 15 2016 22:43
No, I think its the packet spam thing though
I changed it to -1 and it doesn't seem to be happening now..
Mats
@Matsv
May 15 2016 22:51
Hm
Myles
@MylesIsCool
May 15 2016 23:03
if you up the values
it probably will fix it