#waterfall-dev
8550 messages · Page 1 of 9
What do these do?
What is the dofference between setting a PendingConnection to online mode and what effecrs does setting the UUID have?
If you set it to onlineMode it will force the player to authenticate with Mojang (using a challenge-response packet exchange)
Oh
Hm does bukkit offer something similar?
Not to my knowledge
Hm ok thanks
@bleak current is jartex waterfall?
For now it still is yes, but we will swap this year to something else, why?
Hey
Does TextComponent automatically parse messages with color?
So can I pass in "&aHello" as a string and it will be formatted for me
Use TextComponent#fromLegacyText
Use the downloads API
We've literally been warning we're getting rid of the jenkins for almost 2 years now.
Hello,
I currently make an network with synced data between servers but currently i have an issue with sync.
For retrieve data i pull it from mongo at login and save the change when player logout.
But when i switch the server the data is not saved because the data is pulled before save it from initial server (i use Bukkit.getScheduler().runTaskAsynchronously for no lock logout process).
So my question is : how i can correctly save the modified data with less possible impact on performance ?
Thanks.
There is no "clean" solution for this, not without implementing proper locking or basically taking control over the server switch process in a more useful/controlling way
people often just offset the data load by a few seconds or something
Hey im quite good at java and i want to fork waterfall but i have now idea where to start cause everything is in shell language???
How do i edit the java code
nice
And do i fork it or upstream it?
nice x2
so
there's this nice file in English, it's called contributing
usually helps out a lot
Ow thx
lol
Englis is native and googleing creates somtimes a problem for me
it's more or less a standard, I do wonder if the readme says anything about compiling as well
fork travertine if you're intending to maintain your own fork, otherwise, generally consult the paper contrib guides, etc
Yes, but, it's setup as a waterfall fork
Ah
Thx you guys so much
So fork Travartine and follow contribute.md
But whats w the python
lads how in the fuck do i use "wiggle" for waterfall patches
ooo i can just copy the apatch.sh from paper 
I just keep a copy of it in my PATH :L
apatch takes a path to the patch
or, you run apatch in the folder when it's merging and conflicts
yeah but doing so just gives me a vi diff screen
oh no wait i see
aaaaaaaaaaaa i'm thinking i'm starting to get it
So I want to be able to send players from one waterfull server, to another
Ex. player joins X proxy, then is sent to Y proxy. X proxy restarts but player is not kicked because they're now connected to Y
I'm trying to making a no-downtime server if that makes sense
Does anyone know how to go about this, or a similar open source project?
buzzer sound
you have made a fatal mistake
"then is sent to Y proxy"
so now, connection looks like this: client > X > Y > Server
that's what we really need, sound effects in chat, not dumojis
who the heck are you
I'm the very best, like no one ever was
No, you can't transfer people between proxies as there is
- too much state to deal with to magically do that
- You'd need to magically reconnect the client elsewhere, which the client doesn't support
Basically, you wanna look at rolling deployments
thanks 
rolloing deploys won't accomplish no downtime (it can mitigate sure if you distribute players across proxies)
o, an extra o
Well, "rolling", idea is that you pull out a server from the RR when it's pending an update, people only connect to updated instance, etc
would require some orchestration, no idea what tools there really are to deal with all that cleanly for mc
hm, I guess some delayed form of blue/green would work I see now
Did Waterfall has API for low level connection control? I would like to do a per-client/per-IP bandwidth limit but I can not find one in API docs.
currently I use a modified mmproxy before MC server/proxy to do this.
No, there is no API for such a thing in Waterfall.
where would i change the version?
would it be this?
that didnt change that
ive been able to change that with .getname
but i would like to change it from 1.7.x-1.16.x and just remove that
The "ProxyServer.getInstance().getServers()" method is deprecated, so what is now the correct way to add new servers to the proxy while the instance is running? 🤔
So is there any non-deprecated way to add a new server? 😅 Because I did not find any.
no
Wow, okay. 😂 Pretty nice, that there is currently no new method for that. xD But thanks for the help! ☺️
There is no reason for a new method
See the reason for the deprecation on the javadocs
It's just saying that "this is not API, expect changes" pretty much
It's not viable to replace that stuff without either basically just mirroring it or breaking API behavior
Yeah, okay. Than its fine I think.
I'm pretty sure velocity fully supports that, though you'll have to check. Just saying
imagine not using Velocity in 2021
Still in progress to move over 😦
@ zzzCat is there a special issue you’re trying to tackle with the plugin messaging?
the fact that it allows those to build up
when you server switch, your client resends things like the brand messages
bungee tracks every single plugin message packet send, so, at least the open issue heavily points to the brand message being a generic offender, but it seems that it tracks plugin packets sent after join
There's no real need for it to relay brand messages as the client sends those anyways on switch
Depends on the switch type but yes
My brains semi fuzzed out, som some level of shots in the dark here
I see, yea and I do understand, due to the hacky switch it does have to track that too
We always send join game, and the client always sends a brand message sometime after that
Wait are we talking up or downstream
So upstream; but the client doesn’t always get a join game on bungee
1.16+ yes it does
oh, yea, it uses respawn packets prior
So you do have to store packets that get received by the downstream server
But, there generally needs to be better handling there, as on newer versions it's just gonna let those pile up
Well then you might as well start hotwiring all rewriting that is done too
Entity meta rewrite disabling only takes care of part of it
It's a long issue which I gotta look into, my brain just hurts far too much to throw too much time into it
Got an issue on the tracker for that I can get a link to?
That reminds me @weary grove I forgot to ask this earlier but I want to PR a warning to velocity that will trigger if the server the client is joining responds with a UUID that is not the UUID sent to the player by velocity on connection to the proxy. I’ve run into this sticky issue twice now in the wild:; objections?
I’ll take a look zzzCat
My thinking is is, store the client brand, on join of a new server, just send it
No need to stuff it in a bounded list
Unless the channel is not registered yet you don’t need to store it at all
Just delayed write
Maybe lock the write till switch complete
But that should take care of it
It's more a "don't write to the damned list" for that stuff
I suspect it’s more again than meets the eye here
The issue here is that 1.16+ always causes the brand message to be resent
at least, that's what I'm getting from the issue report
But we don’t need to store it for that. I just hope md_5 didn’t change the part I PRd again
When you switch enough servers or have enough mods, etc, those things will pile up
We'd need to store it for 1.15 and below
Yes. For anything else hold it until registration is through
Also;; wait no
I don’t get why you’d want to hold it
If you do then you’ll just end up resending the stuff from the last server
Eh anyway there is something im probably missing here
fromw hat you're saying, on 1.16+, or if you have metadata rewriting disabled, the client will send the brand message to the server
Should I make an effort to fix the duplicate team scoreboard bug non-destructively?
The issue is that bungee will just blindly store all of those brand messages as it stores all register plugin messages
There is no reason why we need to store every brand plugin message, however
^ ah, really I’m not sure about that part because MD reintroduced meta rewriting again on 1.16+
store what the client sends us and pass that on during a server switch
This bug is closely related to the switch logic in question
maybe this is just entity metadata rewrite disabled behavior then
hmmm
If you can do it non-derstrivpadndaknajnadspijfeojnaefnodsf
I can take a shot at it
See, my biiiigggest concern in general is plugins
Part of me was looking at making it possible to easily disable packets from being handled
if you're using not using metadata rewriting, and don't care about scoreboard plugins, we can shave a chunk of work off the api there and not have to worry about that one
i know that I wanted to provide a way to disable the old forge packet fix thing with effects
Also side note
Would paper be open to a reimplemented modified bungee API with adventure support
Someone I know has that cooking on the stove
Wether the world wants it or not
Yea
having a sane common text platform between the two is a goal
Just, paper first, and no idea if kash had any intents there or if it was gonna be the magical dream what one day I'm not dead
Path#resolve
getPluginsFolder().toPath().resolve("ServerListPlus").resolve("mapart") etc.
Download one and start it. Stop it. drop you plugin in. Start it again.
np, wasn't not only my work.
you're putting that into a loop?
also catch (IOException ignored)
have fun debugging
exceptions are your friends, not your enemies
have the compiler detect bugs first, have fail-fast exception throws detect bugs second
waterfall is a bungeecord fork iirc
Yeah, waterfall is a fork of bungeecord. Paper is a fork of Spigot
so how do i listen for incomming ByteStream packets in Bungeecord..
There are few packet which use ByteStreams, most use netty ByteBufs. Secondly, that is unsupported. You can register a channel handler to do it anyway, but be warned, its very finicky
there aren't enought travertine documentation
it's waterfall with 1.7 proto support, no need for docs for that specifically
Heyo
Is there a way to disable the packet limiter? It kicks people who rapid auto craft things and such.
ViaVersion has this feature, thanks anyway.
in your own plugin? sure
otherwise if you are just using waterfall try the helpchanne
p u s h t o m a s t e r
is there a quit reason on the proxy like there is on backend servers
anything in javadocs?
haven't seen anything so far but the bungee docs also don't have search so it makes it slightly tougher
Why is the PermissionCheckEvent called ~7 times for each executed command from a player? Shouldn't a single call be enough for that? 🤔
Depends on what the checks where from
the execute chain only calls it once, but, nothing stopping plugins doing their own checks, etc
I only have my own plugin installed and that comes without any internal permissions checks on command execution, i use the normal Command class and enter there the permissions needed. I only give a result back, when the PermissionCheckEvent is called and i then saw that this done on startup for each registered command twice and when the command is executed 7 times. 🤯
are you passing any arguments to the command?
it has one arg
There are some perm checks when joining, etc, as it resends the command list and has to check what commands to send to players
typing arguments will also run a perm check due to the tab completion
Ahh, I see... Thx. ☺️ So many calls then, but okay, now I know the cause of them 😅
Is it possible with API to send data between bungee instances?
Simple data, like text
no
Use redis for that.
I'm getting player's offline UUIDs through Mojang's API. I have run into a problem where it is now returning null every so often.
I am thinking it is because I am querying it too often, but 1) I don't think that is possible. And 2) I don't know any other way to do it.
I'm thinking of trying to use a sort of backup UUID. Basically, I think it is actually querying it twice in the same tick (I can't seem to figure out why) and I am thinking that just having a public static UUID previousUUID; in my UUIDFetcher class will fix it, but I don't know if this will cause any problems.
If anyone has any ideas they want to offer, I'm all ears.
Regarding #2 - learn how to implement caching/rate limiting. Caching can be done with a library like Caffeine or Guava and is straight forward. Rate limiting your requests can be implemented, though you may need to rework your code somewhat to account for the fact that you can no longer make a request at any given time.
Having a mutable field such as public static UUID previousUUID is very likely to go wrong. There are already many ways in which that is wrong.
I've never worked with Libraries before. How would I add one to my IJ maven project?
First set up a proper build system
static state for something that occurs across multiple threads is generally not a good idea
then add the dependency to your build file
mojang returning null would likely be an API limit or something, that's why you're supposed to check the response codes
In this case, you said you're using maven, so add another <dependency> entry
Okay. So, how exactly would I go about doing this? I've never worked with caching before.
I would assume I am going to make a caching system that will add the uuid and name to the cache if the name isn't in the cache whenever I query it. Then, when I just get it from the cache?
That seems pretty straight forward.
No need to reinvent your own caching. Use a library which is made for that
you'd use one of the methods provided by your cache library which implements an atomic get-cached-or-cached-and-get
I'm using Caffeine by the way.
yeah, so use cache.get(key, Function)
(you can also use LoadingCache if you prefer to specify the cache loader at the time you create the cache)
What would I put in the Function part of cache.get(key, Function);
Sorry. I'm not used to Callables.
The actual retrieval of the value.
public String getCachedName(UUID uuid) {
return cache.get(uuid, (u) -> getUncachedName(uuid));
}
private String getUncachedName(UUID uuid) {
// Implement this how you would without caching
}
This way, the Function is only invoked if there is no value cached yet
I can't seem to find anywhere online how to instantiate the cache.
Caffeine.newBuilder
Cache is an interface
it's in the library README. i recommend you take a closer look at the documentation
I got this in my pom.xml, but I can't seem to use it...?
wait let me reload IJ
Okay. I think I got it working. Let me test it.
Looks like it works! :D Thanks!
Now... How would I go about making it so I can reload my config with a /plugin:reload command or such?
Build your plugin around the idea of live reloading. Make your logic resilient and introduce a way to re-initialize it with new values.
bit of a unique use case here...
I want to use waterfall for basically, just running a plugin. No server behind it or anything. Waterfalls contacts an API and gives the user an auth code. At the moment I am running the code on the LoginEvent to send the API request and then kick the user with the code.
I assume I dont want to do this with an intent because that could mean the user tries to join the server (which doesn't exist) and give an error.
However, ocassionally I get an took xxxms to process! warning in the console. Any recommendations
Apart from that, everything works fine. Ocasionally a user times out but i am putting that down to their internet..
@stark bone that happens if you hold an event hostage for long enough. That can happen when a database call or the method you execute on that event takes a certain amount of time to process. It’s harmless in your case
any idea how to prevent it?
don't take that long?
Yeh that's an option. Thanks anyway
2 second calc attempt shows that you got 250ms to do stuff before it shouts for the entire event
@stark bone either that or run an async task from the event- however thats not usable in your case
@trail plume
@stone fiber nuke him 
who am I nuking
is that the same guy
yeah
?kick @old trail "this is not a marketplace however, try the services and recruitment forum on spigot"
literally told him
How does one do like scheduled runtasklaters in waterfall api?
oh it has a scheduler
@ zzzCat I upstreamed Waterfall to after md_5 added a length limitable readString method and we are now facing an interesting dilemma- in the case of the login readString it’s perfectly reasonable to assume the sequence of characters is ascii and therefor only uses one byte per character.
That isn’t true however for the vast majority of other uses of the length limited read/write string methods where we have to assume UTF-8 is in use which can be up to 4 bytes per char
Now I propose we, instead of hacking in this method altogether, use md_5s method but make the max bytes per char configurable.
I should also, regarding that, go over the rest of the limited read/write string methods again to see if their length limits make sense
I’ll PR that later alongside some more mitigations for potential attacks
@weary grove do we have an oversight in this as well on velocity? I haven’t checked
We assume all strings are UTF-8. It's possible for us to potentially use ASCII in select places, but this is likely to cause issues as vanilla will accept UTF-8 names, especially for offline mode (and obviously that is very popular in China...)
Judging by that logic even Waterfall should use 4bytes/char in the login limit

Mojang's code writes UTF-8 so we have to accept UTF-8 too. No middle ground.
I saw his thing but have been too ill/busy to dig into it, but, what tux said, basically, for stuff like hostnames, we can just /4 the 'real' limit, otherwise it creates many varying issues when you start tryna apply these limits across the board
cheers for the PRs, been on my todo list but been too dead for it
had to do it anyway for the additional mitigations I'm working on
Well, I take the thanks back then

my brains trash and so are my jokes \o/
Hah. Almost as dead as my brain when I had to decide which method to keep for readString
md_5 was right for one
We had a length limit based on the VarInt byte len
but thats bad because each char can be from 1-4 bytes long
and we always assumed 1

not bad for usernames but commands and stuff
usernames except in the cases with offline mode are always ascii
I mean, usernames should always be \w{3,16} unless you have one of the 1/2 latter accounts mojang allowed at some point or some dumb plugin
you should know as well as I do that chinese people use unicode characters in their cracked networks
and yes- its stupid
which are also not valid usernames ¯_(ツ)_/¯
But they still exist
not in the official game
Well yes and no. I’ve seen my fair share of people with spaces in their name on the networks I’ve administered
People do dumb shit
Not a lot recently, the last time was around 2019
Those are official names, they exist
(and then people wonder why their plugins break, etc)
Yea I agree
it doesn't support it but it doesn't go prevent it either
one would hope that they'd filter that stuff, but, we're talking mojang here
pretty sure mojang removed space names a while back
yea I mean its been over a year since ive seen those
Really random question. Would anyone happen to have a link that describes the protocol change in encryption between 1.7 and 1.8+ clients? Wiki.vg seems to only have the modern info...
check the page's history?
I really need to push the changes for #600 and #601 I hope I have the time for that today
https://github.com/Xernium/Waterfall/commit/52a5fc2fae7450b9e72e09390425009888a2302e @ zzzCat I need an opinion
is there some way to check if a player connect failed?
There is either gonna be something in the log or no
Hi i got question is there anything wrong with getting player by name in bungee api?
so there is no need fort cache like in the bukkit api?
Five, lgtm
I’ll change a few exceptions to cached ones later then I’ll PR
I have some troubles with the timings of some events in Waterfall:
So a player disconnects from the proxy but however he manages to connect at the same time again, so the log states disconnected with: You are already connected to this proxy!".
First: Why can a player join (with the same mc client) before the disconnect event is called?
Second: After this message, the LoginEvent for the player is still called. Is that desired?
the server kicks the player already online
that would imply they disconnected in an unexpected manner, e.g. bad connection
they reconnected before their old connection had timed out
I knew from the player (teammember), that he disconnect normally via the gui.
apparently they didn't disconnect properly or some plugin mangled it
Okay, that case can happen sometimes. 😅 But why is the login event still called for a player that is already online on the same proxy?
because the new connection is logging on
the login event is fired as the person who DC'd tries to reconnect
it's their dangling connection which is booted
Yeah sure, but when the proxy already knows, that the player is still online, why would i have a login event for that? I mean than the proxy can just do without an event, as a player cannot exist twice anyway.🙈
yeah, we're having a similar issue:
- player joins on one connection A
- connection A gets processed, postlogin fires
- player somehow joins on another connection B
- connection A gets "already connected" and gets closed
- connection B gets processed, postlogin fires
- disconnect event fires for connection A
it fires the login event for the new player
not the old one
the login event is fired after the old connection is DC'd
then again, miiight be the event loop thing
ouch
I guess it could fire after, I forget how netty deals with that
here are the logs
[16:00:05] [/x:60363] <-> InitialHandler has connected
[16:00:05] [player|/x:60363] <-> ServerConnector [lobby] has connected
[16:00:06] [/x:60365] <-> InitialHandler has connected
[16:00:06] [player] disconnected with: You are already connected to this proxy!
[16:00:06] [/x:60363|player] <-> DownstreamBridge <-> [lobby] has disconnected
[16:00:06] [player|/x:60365] <-> ServerConnector [lobby] has connected
[16:00:11] [/x:60363|player] -> UpstreamBridge has disconnected
[16:00:17] [player|/x:60365] <-> ServerConnector [skyblock] has connected
[16:00:17] [/x:60365|player] <-> DownstreamBridge <-> [lobby] has disconnected
(compare port 60363 vs 60365)
Yea, I understand the issue now
the thing disconnects them before, but, as it relies on the handler the actual disconnection can be one on anothrer thread
Thats the situation and I wonder, why the Login event is called for the connection, that gets the "already online" notification.
(or even, just "ater")
yup
#603 go ham zzzCat woooo
Only real thing I think of is to remove the wording of "if ur a dev"
"for more info"
one sec
So how can I resolve the issue, that the player first logins and then afterwards disconnect again? 😅
You can't
Okay. Good to know. Do I get the information in the login event, that the player is still online and can't connect? 🤔
getPlayer for their UUID in the login event
should be null if it's not gonna fire, i think
So the old connection gets disconnected for already online and not the new one? 🤯
yes, as I've said multiple times now
one thing that might work is create a map UUID->ProxiedPlayer, then in postlogin insert mapping for the proxiedplayer joining in a synchronized block, in disconnect get the proxiedplayer from the map in a synchronized block and check if they're the same as the proxiedplayer of the event. if they are, removing mapping and fire your disconnect code
syncronization won't save your ass there
Ok... thanks. The whole thing with connections is pretty complicated. 😂
it's down to how netty works
or you could have a counter for every UUID, add 1 if player joins, remove 1 if player leaves. if it hits 0, you're good :P
Would it than not be better to just don't let the new connection connect? 😅 So that the "already connected" is called for the new connection and not the old one?
Please stop pinging
I mean, maybe, sorta, it's more on UX than "what works best for code"
we never decided the behavior there, that was spigot
Oh, its because I use the discord answer function and dont disabled that. Sorry!
Alright, than i will search for a good solution in my case. Thank! 😇
if you wanna create an issue on the tracker we can look into it, would need look into making it happen as a callback in netty if it lets us
I think I will do so. Thanks for the help and explanations already and the code snippet. ☺️ 🙈
I almost forgot Travertine, lol. Also, fixed/removed a redundant section while 3-way-merging
Ill go to bed now
ping me if I broke something
oh my sweet summer child
thanks
oh yes we've been there
#604 is the typical case of the chicken and the egg
Additionally- no. Just no. Blocking connections to wait for disconnect is straight out. There are too many problems with it
it's fixable, but I'm eer on fixing it for obvious reasons
there's enough people having issues joining as-is
If you want I can go into detail (with a poc) how this creates a massive issue by just trying to fix this
but that is not something I should discuss here
Does this get fired for the messaging channel?
Can't tell from the description if it's for the messaging channel or something like custom packets from mods
I assume it's fired for the messaging channel though
it's fired for all PluginMessages that get sent by the client or the server
Not really familiar with waterfall that much. What does that mean wrt my question?
this isn't waterfall specific
plugin messages are a vanilla concept: https://wiki.vg/Protocol#Plugin_Message_.28clientbound.29
And I assume the PMC uses these packets
it is the packet
Yeah cheers
is there anything like runTaskTimer like in Bukkit API?
schedule should do the right with enough parameters.
I took another look at #318 and fixing it is stupid-
Either unregister the team on getting it again or keep track of team / server mapping and reset&resend dynamically
Second one works reasonably well; it’s just a stupid workaround for a stupid issue
Or send teams with a random string. 🙂
That doesn’t work for obvious reasons
I should clean and publicize this so people with the issue can try it
why is the https://papermc.io/javadocs/waterfall/net/md_5/bungee/api/event/ServerKickEvent.html deprecated and what is my alternative?
huh why does bungeecord have way more methods? https://ci.md-5.net/job/BungeeCord/ws/api/target/apidocs/net/md_5/bungee/api/event/ServerKickEvent.html

why would waterfall remove those methods?
Let's check that
also not related to paper, but javadocs noscript works with paper docs
but on mds ci its activated
kinda weird behaviour
hm
that shouldnt screw with the javadocs
i know, but that just makes it weirder
well I might have an explanation- due to the way paper generates javadocs
lets see if I am right
I usually just javadoc:aggregate

i just site:site
lol
just got the javadoc plugin and made a maven generated docs site
site:site works with neither bungeecord nor waterfall out of the box
conclusion: md_5s apidocs are out of date
hm
want a side-by-side comparison? sec
@wide maple ok i've built the docs myself now. I guess something is wrong with the docs.
@wide maple guess what. The actual java files don't have that api
huh
so that means it got removed
but what should i use then?
hm yeah

well there we have it
yeah, but how would you fix that
hm lemme see how md generates his docs
aren't the build steps public?
nope lol
well yea
console is public

I have to yell at a certain someone really quickly
nice
ok lemme know when its fixed
@wide maple i think i know why
mds lombok
yes- so?
paper lombok
version not found
thats why it doesn't use delombok
right?
@wide maple
I dont think thats the issue
waterfall is simply missing the goal to properly deploy this
hm ok then
The way the entire thing works is badicslly fragile af, we basically run a a profile for the docs or something
Md followed suite in delombok ing eventually, never really looked af his attempt as I wasn't in the mood to fight with jenkins and stuff
No snapshot update from me today, I’ll get to it tomorrow.
wow, let down
ing
just log them in your method?
Does anyone know what the new snapshot (21w05a)'s protocol id for TabCompleteRequest is? I am having some trouble updating WaterFall / Bungee to 21w05a.
And it is caused by that.
@brittle panther unchanged. Only thing you should need to change is the protocol ID bit
?
I'm confused... I changed the SNAPSHOT_PROTOCOL. But, it's still giving errors.
Oh. By the way, this is the TO_SERVER TabCompleteRequest.
Error log?
This is all I have as (for some reason) it isn't logging anything (to file)...
And I guess you can have this. (Sorry for small print...) My console got cut off for some odd reason and I don't know how to fix it.
TacoRevamped is a custom mod I made.
uses any custom command args?
Like ArgumentTypes? No.
Cause those usually do that
Hmm.
I'm probably just going to wait for you to update yours tomorrow. Plus, I prefer WaterFall over BungeeCord and since I cannot find any good documentation on how to "patch" WaterFall, I'm just going to stick to doing custom BungeeCord builds.
Hah.
🏳️
Did you update it?
not yet
but this is going to be my stick-it-to-md_5
lets see if this builds given ive thrown the mitigations overtop
Yeah. I've already used your project as a sort of "what in the world am I supposed to do" model, and thus, I have updated (what I think) needs updated... But, ya know... It doesn't work.
Ive taken a long look at the networking and it doesnt appear anything has changed with tabcomplete
there might be another argtype I cant see just now
Oh. Another thing, that screenshot was from someone on 1.16 logging on to a 1.16 lobby.
Yeah.
I feel you.
This is why I came here to ask.
I ain't got a clue what I'm doing. I'm just a hobby programmer who has like a year of actual schooling under my belt in C#... Everything I've learned in Java is self taught.
It really is.
I actually think it is better than Java, but that's just my opinion.
I mean, it is the MS java, they created it because their own JVM flopped
Wait... I thought Java came from C?
I mean C is like the first actual OOP language.
at work I use rust and c# for a very few things. Java shouldnt ever be used in industry
iirc
thats cursed
e n t e r p r i s e j a v a
java is used everywhere, lmao
Why would you ever have to pay for a better Java?
support
lets rewind to here again 👀
😄
if you are already paying for Oracle SQL licenses and support you might as well pay for java support
Wait...
also pretty sure you can't just sell devices/software using oracle java without paying licensing fees
That's dumb.
That's like saying the person who gave you the lumber for your house owns the license to your house...
Oracle vs Google
it's a software platform
altho that is about the java api
you can use the freely licensed openJDK distro
since google doesn't just ship the jvm
But, if you're running an enterprise level production setup, the oracle specific tools offer a lot of features for monitoring your environment and for support if/when shit hits the fan on a friday night
¯_(ツ)_/¯
my father used to work for a company heavily relying on java and their oracle partnership for the software that they developed, shipped and managed for their customers (large energy companies) 👀
it's pretty common to not wanting to deal with database/jvm issues yourself lol
@brittle panther finished; but seriously- you should read the CONTRIBUTING.md for waterfall
You see, I spent like half an evening trying to figure out how to do that and then you say it is easy as reading that? Bruh...
I'll have to look into it.
reading is overrated
see- the waterfall-proxy folder is a fake git repo and the patches are the commits in it, whats applied over bungeecord
Yeah. I understood that.
if downstream changes you dont have to painstakingly update the git refs or wiggle in changes
I just didn't know how to do it for WaterFall.
commit it OR git stash it, then git rebase -i upstream/upstream, git stash pop, git add whatever, git commit amend, git rebase --continue
and then just rebuild the patches with ./waterfall rb
here is essentially what I did to update waterfall:
# Get the repo
git clone --recursive --branch 1.17-changes-pre https://github.com/Xernium/Waterfall.git Snap21w05aWaterfall/
# --recursive: Also clone the submodules in one go, is a good habit to always specify
# --branch <branch> useful if your branch is not the tracked master branch
cd Snap21w05aWaterfall
./waterfall p
cd Waterfall-Proxy
< I edit my file>
git stash
git rebase -i upstream/upstream
git stash pop
git add .
git commit --amend
git rebase --continue
cd ..
./waterfall rb
./waterfal b
# if everything works:
git add .
git commit
git push origin
Cool.

It appears my ViaVersion doesn't work... :/ Well, that's dumb.
@wide maple if you want, you can fix this tomorrow. I'll be fine.
y o u c a n w a i t
@brittle panther just mvn clean package my via fork
Hello. How can I get the player IP address with a non-deprecated method?
event.getConnection().getSocketAddress().toString(); returns /IP:PORT I have to parse this?
you have to cast the SocketAddress to an InetSocketAddress
the method is deprecated only because a "SocketAdress" can be something else than a "InetSocketAdress"
(the deprecated method does that too)
anyone knows how to do this ?
and also to do when i hover over this i get some information about server or something?
just listen on the ping event and change that
cloudflare
just look at it before you copy/paste links lol
Sorry I was on phone
I fail to see how that changes anything 
Doesn't matter
ah
thanks
Any plans for adding an endpoint to download latest versions of paper/waterfall?
the API offers multiple files
mhm yes
The "latest" endpoints just offer so much horror to deal with in terms of caching and stuff along with people mis-using the latest endpoints that we figured that with v2 it wasn't worth it
it's pretty trivial to create a script which will query the latest version from the API and fetch it
Cache invalidation was that difficult?
but, to be able to download a file, you need to know the build number as that is in the filename itself
Cloudflare
what happens when we push multiple builds over the space of a few hours, etc
I see
We've only got so many caching rules and dealing with that mess was not worth it for the headaches it consistently caused
So the complication is with cloudflare, not the app itself.
Is your API using c#?
tbh, I wouldnt mind a build that is outdated by a day. It still saves me the effort of going in and manually grabbing the latest build, uploading it, setting permissions on it.
Basically, it's not an issue we care to solve
We don't wanna have to persistently blow caches
There is also an API for purging specific files. A bit more work, but a possibility.
Okay, then don't
Basically, there is little interest on our side trying to chase issues which can easily be solved with an extra singular query to the website
just say it's "today's selected latest build"
Ok.
Can I do it then
Which language is the API written in? PHP, C#, Java?
We have no interest in accepting such an addition
Still easier than running build tools I suppose.
Thousands of devs will have to reinvent the same automation script based on the new API though. Collectively is more efficient to do it in one place.
somebody already did, it's literally a 3 line script or something
some randomer named sulu posted it somewhere, uses jq to parse the json response from the API
And others random one did it too
May as well keep a repository of pre-made scripts, ya?
or some pins or sth
then again no one would look through em probably
That's for paper. You're free to adapt it for waterfall
any notice for 1.16 support? (tag me pls)
#545 is a complete train wreck
#572 doesn’t fix the memory leak caused by it
it's a bandaid fix
but at least it helps
we're having a lot of players kicked because of that bug^^
My problem is that we silence it with this without fixing it
I’ll give my approval or amend something once I’ve looked over it in a few min
Do you have an easy way to reproduce it?
That’s gonna be the nail in the coffin if I can’t test it
Yea
We added a command to print the registered relay messages for a player. It seems like you just have to have a few fabric mods installed, and every time you switch the server on the network with the /server command (or some other way) it gets added again
Ah I see. Bungeecord doesnt account for that
this entire problem is completely insane
The proxy doesnt need to track it
well not for the relevant versions anyway
god damnit this is so stupid
I want a light-proxy mode config option to disable all of this nonsense rewriting
As of build 811 however, after the server change, WECUI does not work. The reason is that the server rejects the plugin message because it did not receive any REGISTER packets for the plugin channel. What Bungee did before was that it logged all the register packets and send them again when the user switches the server. The said commit however removes that functionality.
The description for the commit is "Remove artifacts from legacy forge support.". But this functionality is not only required for Forge, it is required for every mod that uses plugin channels, which are in fact a part of vanilla Minecraft.
makes sense imo
on 1.16+ or with the slow switching method you literally just need the current active channel
so this again all depends on the switching method
and yet better you cant use the fast switching method with fabric at all
you can but it breaks things because its uncalled for
i have no idea what you are saying makes sense
Imagine this:
md_5 does the following since 1.5(?) send a fake double respawn and clear all active effects of the player
this makes the switch quick
well it used to at least
the clients state does not get reset
since 1.6 you can also just send a JoinGame again to RESET the client state and registry followed by a respawn to place the player in game
since 1.16 this is mandatory
given that mods don't resync correctly if the client is not reset
this is a supremely stupid issue to have
this necessitates the proxy to rewrite all entity IDs because its not reset
If this functionality has been there since 1.6 and is required with 1.16, why don't we remove the old functionality?
I see
and on bungeecord its still objectively slower
and if we would just revert that commit we would still have issues because the client is not reset
which version is that fabric instance from?
Minecraft 1.16.4 if thats what you mean
thats what I mean
this issue should not exist
this. This again. It will haunt me till the day I die
let me check what Bungee version we are running
git:BungeeCord-Bootstrap:1.16-R0.4-SNAPSHOT:9c078b7:1539 by md_5
IT EXISTS because nobody is thinking right
I will make zzzCat happy with the patch ill propose in a few min.
I hope
Hi i got question is querying some site api is bad in command?
that would be epic, thanks
you'd make me happy at least^^
Here is my problem:
I can either make a config option to disable all bungee meddling in the connection
or check rewriting to see if relaying should happen
this will not fix the issue
but it shouldnt
we can still pull in what gerry proposed
what would the effects of that config option be?
Disable entity meta rewriting, disable tab list rewriting, disable channel relaying, disable fast switching and disable clear/resend of stored connection attributes
We could essentially call that velocity-mode cause thats how velocity works

That sounds like it might break a lot of plugins..
Surprisingly I couldnt think of anything that would break plugins
Entity meta rewriting is only required for fastswitching
so is channel relaying
and channel attributes
and the tablist rewriting is bungees way of messing with online/offline mode
that could remain active
that could also break plugins but that already has a config option
we were here before #waterfall-help message same systematic issue

God damnit
@twilit pewter has my stamp of approval for now. I don't have the energy left to think the TODOs through I left on it
I reafer with mods, sorry xD
Fabric should work, Forge won't work with any proxy.
F xD
Yea forge 1.13+ is turning out to be worse and worse
for forge would be supported?
If you want Forge support, there is some in-progress work but it's targeting Velocity.
and not waterfall?
what is the github?
The logic it requires is next to impossible to mod into bungeecord cleanly anyway. Also the WIP is not public
Well not yet
It's still a WIP and the work isn't public yet.

F
Tux if you knew how much time I wasted till now on this
velocity would work with bungeecord plugins? xD
Nope
At this point I just want to implement a switch server packet
Forge 1.12.2 and below works with Waterfall and Velocity, Fabric will work with both Waterfall and Velocity.
Well there is #545 
...might as well just switch to Fabric, IMO it's the better platform.
and velocity is not possible to download?? xD
For fabric
okey
Has it been considered to implement an uuid cache like the minecraft server's one? 
probably would be better than having multiple plugins contact mojang to know someone's uuid when theyre not online
if you like, make a common API plugins can use to lookup names and UUIDs
then try to get people to adopt that API
kind of like Vault, except that you should use proper documentation for your API, and don't mess things up as Vault is kind of messed up
From what I’ve seen, people commonly use LuckPerms for that purpose
can I host a waterfall server with many instances of minecraft servers that don't bind to ports
so that all the ports on a machine won't be used up
but it can still forward requests to servers
Aren't 65_000 - 1024 enough?
@warm flare what exactly are you trying to do here? If you don’t bind something to the port it’s still only able to be served by one service at a time
I guess yes
I think it would also be bad for other plugins to depend on an api like that
Because it also means the end user would have to install that plugin because it's gotta update it's database
imo it should be built in into the server like on the vanilla one
I mean, most plugins just store known UUIDs themselves if they really need them
I don’t agree with the modifications by Janmm14. If we are going minimal diff then this just isn’t right
Looking at it
I disagree with a lot of the sentiment
@wide maple I already tried to minimize diff. Do you have an idea of how to reduce the diff further? I am happy to change stuff as needed.
see my review
@vestal robin I was going for an additional constructor in that once case; and a method that calls the original one with the original signature and a false/true hardcoded
aka add public Base() {this(false);}?
no; I was going for not having a second base altogether but I need to at it again to see what I was thinking there
Kina busy right now but I’ll get back to it later
ok
Does the Bungee plugin messaging channel work the same for Waterfall?
yes
I'm trying to do a GetServer request from my Waterfall network using plugin messaging channel. Would "SomeSubChannel" below just be GetServer?
if (subchannel.equals("SomeSubChannel")) {
@Override
public void onPluginMessageReceived(String channel, Player player, byte[] message) {
if (!channel.equals("BungeeCord")) {
return;
}
ByteArrayDataInput input = ByteStreams.newDataInput(message);
String subchannel = input.readUTF();
if (subchannel.equals("SomeSubChannel")) {
String servername = input.readUTF();
}
}
yes
Thank you
@wide maple
I'm using BungeeCord plugin messaging channel to GetServer. My command class doesn't wait for the server to respond though, so by the time I set String serverType on my onPluginMessageReceived() method, the command class has already called the variable which returns null. What's the best way to wait for this variable to get set before proceeding?
block and wait for it or make it run after (e.g. with something like CompletableFuture#thenRun)
you most likely don't want to block unless you are running this on your own thread and know how to properly manage threading 👀
I’ll get to it tomorrow morning. I have a 53h work week behind me and I need some rest and some time to catch up
You can't wait, and blocking for stuff like that is dumb as you'll deadlock the server if you're blocking in the event loop
Just use a callback design or something
The problem with a callback is that this same plugin message channel will be used for a variety of different commands, not just one.
So, you gotta factor that I your design or just use caching or something and update the local data periodically
Is there another way to get the name of the Bungee server someone is on without using the plugin message channel?
I'm trying to make a plugin that plays a sound when you disable another player's sheild. Does anyone know how I would go about doing this?
wrong channel
whoops
I can completely understand that, take your time. I've also improved the patch at some points already.
Can I create a sort of universal callback in the onPluginMessageReceived() method? I have multiple methods that will be calling the same subchannel like GetServer. But since I can't pass variables into onPluginMessageReceived(), I'm not sure how to specify which method to run in the callback.
you could shove a callback into a map or something
it's not transactional, however
there is no promise of when you'll get a callback
if you need a reliable system, you wanna basically create something which is capable of tracking that stuff better or some form of caching
Could I also create a plugin for the BungeeCord server to create a sort of communication system?
yes
I'm trying to visualize how the BungeeCord plugin and the Bukkit plugin would communicate.
the plugin message channel is a system mojang added to the game for things to communicate over arbitary messages
I personally just stuff json around my own custom channel
Is there an easy example of two plugins communicating between Bungee and Bukkit?
I just don't really know enough about MC plugins yet to visualize it haha
I'm sure if you googled there are dozens of OSS plugins doing that stuff, and maybe some tutorials
open source software
Okay, thank you, really appreciate the help!
After a lot of testing I want to redesign the underlying channel initialization process to more closely resemble that of velocity. I’ll finish amending what I need to tomorrow but I hope I can obsolete all of this altogether. It might break some bungee plugins that use internals in the end. We will see.
Sigh I almost forgot adventure
@vestal robin the race condition i was talking about- ever tried a modded client with it? When the handlers swap for the next connection stage this one is discarded but the handler is left open. Don’t see a good way to fix it either- at this point it’s still a bad idea to add another timeout mechanism into that, there is already one for that. Not to mention when this one gets reached the existing global one will fire on a null object unless it’s freed before
Side note
I’m investigating a much more serious attack vector on bungeecord type systems at the moment

funny
Not supported here, but look into how the minecraft brand custom plugin message works
is the API built in the waterfall jar ?
Well, I mean, it has to be, but, like, use maven or gradle, see the readme, maven repo in the welcome channel or something
is there a method that returns all servers in bungeecord ?
it's stored in the configuration class iirc
Check ProxyServer, should have something like getConfig or something
yea
.jd
and i can get a server by a string ?
Yes, the string in that map is the name
alright, cool and ty
Is anyone going to fix the javadocs anytime soon?
Delombok isn't happening
There are none of the methods there should be
Are there limits of how much tasks the async scheduler can handle? For every player joining I will start 3 async tasks. Lets say I have 100 players joining at one time, I will create 300 async tasks queued. Is it possible to overwhelm the async scheduler?
There are limits to how much native memory your server has, though 300 threads is nowhere near that. Nonetheless, from a performance perspective, I'd not suggest creating 300 tasks at once.
Depending on your use case, you can group your work into 1 async task per player, and you can use a thread pool with a different thread management policy
Thanks for your Answer. I will take note on that and might implement something like that in the near future.
Future is a good point
You can chain futures to avoid having to deal with your threads yourself
That’s what I do and it works reasonably well
Is anyone going to fix the issue soon nobody bothered to report?!
I'll throw it on my to-do list, but, no promises on when
@ zzzCat not entirely true
Hm?
#waterfall-dev message we were there
But I didn’t find an easy way to fix it at the time
Well, I totally forgot
Same here
What is the purpose of this BungeeCord commit? https://github.com/SpigotMC/BungeeCord/commit/ebec582ce22a6e9876fe3c4b3868cd9651c4e767 Java 6 and Java 7 compatibility for a small part of bungeecord?
that isn't an event
there are a handful of netty threads which do most things
that event blocks the connection
but it will not hault your proxy
it's very hard to freeze your proxy
i don't think you can access it to a point where you can hault execution for other players
general gist is that asume that pretty much anything which isn't "Async" will block the event loop
it should only prevent that login from continuing iirc
Well, I thiiink auth is done on another thread
But, in general, the way bungee handles all of it's network stuff is pretty much shit
how do you think other servers manage
mojang auth isn't rate limited because otherwise every server with a shit ton of players wouldn't work
iirc they take player ip address in the MJ auth endpoint
they may ratelimit per ip address on their side
just like they do for login
Mojang doesn’t rate limit if the request is valid. Any others do count towards a rate limit
Which is why spam type attacks are more or less effective even if they don’t drown the proxy
There is sadly no real easy way to fix that
@bleak current careful. There is a timeout handler on the client for that. You can’t hold it for too long
I mean
I profile based on accounts before addresses

No- checking their account against known swarm or compromised accounts. Also a factor is the mc statistics data and account age and actions
Can’t reveal too much
I can neither deny nor prove that this exists
None really. But there is a list of old compromised accounts still out there
I’d wager about 6-8%
there aren't hundreds of millions
once the microsoft account migration begins that number goin way down
it is
public class LoginEvent extends AsyncEvent<LoginEvent> implements Cancellable
yes
has waterfall been patched to correctly respond to LoginPayloadRequests (well, in a way matching the vanilla client?)
Elaborate on what you mean? Login payloads can’t reasonably be used with proxies as there is no way to re-negotiate that
@wide maple vanilla client responds to every login payload with a "failed" response, bungee currently doesn't respond at all - I tossed up a PR to bungee fixing the issue
@sage cradle was it merged? If it was I’ll pull the update to waterfall in a few
Or if it wasn’t link it here so I can rebase it onto waterfall
it's a tiny fix, i don't mind giving md a little while to respond - but if he doesn't it'd be great to get that in waterfall
(also thanks cat, am still on mobile so grabbing links is tricky)
Hello! Sorry if here is not the right place for this kind of question, however, how can I start a fork of waterfall? Do you have anything for anyone who's going to fork or use waterfall's own jar?
fork travertine
Why?
because it's a fork of waterfall
I would like to fork to 1.8 until the latest version, not 1.7
Then delete the 1.7 patch
Okay
it's just a pre-setup fork of waterfall
With Travertine's jar?
is waterfall ever gonna get this lovely update too heh
https://github.com/PaperMC/Paper/commit/2a0ee4b65d63043564b0dfe001c7f9804a07b477
I'm not sure if it supports it with &, but I think it supports it with §
well yeah I meant that
&x works with BungeeDisplayName but not BungeeChat
so idek
it seems like it works tho
Yeah that should be included in the Bungeecord Chat thingy
this is my username in console lol
i forget the irc command
ok i can ping u in moss if i remember heh
.remind 12h @civic valve waterfall rgb stuff
come on korobi
don't let me down
.remind
smh
u broke it
Please paste large logs to a pastebin: https://paste.gg
mh



