Open smallshen opened 4 years ago
one thing forget, It doesn't works fine with some class that has val constructer
I don't think that use a Generic Typed invoke
is a good pratice.
About the ComponentBuilder, I will work on it, is something that could be more clean using DSL.
I think have a dsl support for https://github.com/KyoriPowered/adventure would be great. Since it have Bungeecord, Velocity, bukkit etc support.
There is a operator fun called "invoke"
after simply adding
could achieve
makes code cleaner, get rid of with(player) or player.apply { }
it works for anything after that three lines but might effect some classes that already have invoke fun
it looks like the component in net.md_5.bungee.api.chat.ComponentBuilder having a dsl support but actually no