#waterfall-dev
8550 messages · Page 7 of 9
Anything I do in the Waterfall-Proxy folder is totally ignored
git says its already up to date
you need to commit in -Proxy
running the wrong jar
which is the correct one? this one was in ...-proxy/proxy/target
bootstrap
If I add new event, will the PR be accepted? or it this only for small patches
btw modified jar working good, thanks
I mean, "yes"
but, I got a hugeass backlog and bungee is generally dead to me right now
When you build with bash first time, (applying patches) Next time if you dont want to lose your progress just do mvn clean install or smth like that
I'm a little confused regarding the ProxyPingEvent's PendingConnection and ServerPing classes.
From my personal experience does ServerPing$Protocol#getProtocol() return the Protocol version of the pinging client, right?
If so, I assume getName() gives the client's username? Or would I use getName() from PendingConnection?
I basically want to obtain the client's protocol version and name in the ProxyPingEvent, but since Javadocs are a myth in BungeeCord itself am I not sure what to use here.
where are the good docs for waterfall
and spigots wiki for some stuff
can you even run waterfall on MH?
yea
u can
and custom plugins
just no idea if it will work or not since MH does the proxy stuff for you
and i got no idea on how a proxy works lmao
Very good JD
Pretty sure that it just stores the name that the client sent in the handshake
Kind of interesting how PendingConnection has stuff documented while Protocol doesn't
The project is lombok'd
I'm btw surprised that Velocity Javadocs aren't included in that page yet
Wonder what the best way to check the status of a different waterfall server is (e.g. waiting for players, game in progress)
Currently I can think of
A) Using PluginMessage but it seems inefficient sending to all servers
B) Using a SQL db to store the state of each minigame and reading from there
Is there any better way to do this?
wrote a standalone app which exposes a rest API which does all of the magical state management for stuff
You can use redis pub/sub or any message broker
technically MySQL/MariaDB to store the state with registered notifiers would be the best of both worlds (in memory shared state cache + pub sub)
but sql notifications seem to be rarily used so dunno if there are issues with it ¯_(ツ)_/¯
Atm i've done it with server pings and checking the motds and changing them when events happen
i think so too
Can I know why nobody first replies on GitHub issues
And why ServerKickEvent isn't working since 1.19 update?
- my care for going deep into "doesn't work" issues is minimal
- that event has been shaky for years
- afaik, 1.19 has literally changed nothing here
I said the reason on GitHub issues
From Bungee 1.19, only playerquitevent is being fired on server stop, on 1.18 (even waterfall) was working fine
Which doesn't give me much to go off without spinning up instances and messing around to test stuff around an event which has been janky for years
Literally nothing changed
I'm assuming md5 did another mess with bungeecord
I was messing around for testing the new version (1.19) and after some accurate test(s) I'm here to report that ServerKickEvent isn't started if a connected sub_server crashes (or just runs /stop).
Apparently, the issue is gone if /kick (or /ban) and /restart are being executed.
Another thing I saw after some debugging is that the proxy is using PlayerDisconnectEvent if a sub_server goes down (even in /stop) instead of kicking the player.
The issue is here after 1.19 BungeeCord's update.
Waterfall version: 1.19-496
Spigot instances: Paper 1.19-13
This is full message
Logs don't say anything apart from "proxy lost connection", latest waterfall updates don't change anything related to that
from a quick skim of the 1.19 update, I can't see any changes which would induce that
But why then 1.19 only is having this problem?
I don't know
No, my plugin isn't the issue since was fine before
Another thing i saw
On bungee is totally broken
Unless the server changed something here, idk
On waterfall sometimes works sometimes not
Only proxy 1.19 is affected, since I tried in old instances and newer one but still the bug is here
So I'm assuming that again, something broke from normal BungeeCord side
It was too strange that nothing broke in 3/4 updates, then md5 came up with a new bug
I can't see anything which would induce it, but, god knows
I don't have the commitment to waterfall to try to dig into that mess right now
What do you think then?
I don't know
I analysis in 1.19 bungee commit i see that nothing is changed in that
But why now the issue is there?
I don't know
FlameCord (sorry for comparing) seems not affected
as I said, theres not much to go off here which would imply a much deeper look into it
Other proxies such as aegis are just to throw away
Can i do something?
I mean, if something changed, I'd need to work out what
I can't see anything which changed which would affect this and would have to do much deeper testing/analysis than I care to do for waterfall right at this time
I just wrote down in console log what event are being fired
Even serverdisconnectevent isn't being fired now
Only playerdisconnectevent
uh huh
the player kick event cant fire if the server crashes because there’s never a kick packet to handle
then why in 1.18 was working fine?
if you sigkill a minecraft server it will have the same behavior
the server does send a kick packet on crash in 1.18 because its still able to it seems like
it should call the event on a random kick, but, that's purely waterfall doing that
that event has always been caveated af
am not aware of any real changes there
as for the ServerDisconnectEvent- its never guaranteed to be called in the first place
if the downstream connection dies first then there’s no event loop left to get back to
this is the issue with bungees event manager .call(…) function
but we cant change it without breaking the event even more
then how i'm supposed to fix it?
i have 200 servers online that are using my plugin, and still they didn't move to 1.19
i don't know if they will be happy if everything is broken
frankly I dont know how to fix this mess
the event loop works very different on velocity
as said, I'm not aware of any changes in the 1.19 patch which could affect that
and it works on unmodified bungeecord?
nop
Which is my point, nothing seems to have changed on that front
?!? So the issue is not in Waterfall at all
as said, that event has always been kinda broken af, we have a patch which fires it in. some extra places vs bungee, but, am not aware of any other changes there
that's why i'm asking, bungee created the issue, waterfall partially has it working
I'd need much more information to find something to work off here and waterfall is really bottom of the barrel for me
can i help somehow?
partially because its being fired in the same place as the serverdisconnectevent
and we know that event is broken
is something i really need (since people is using my plugin)
if i can contribute bisecting or i don't know
From what I can tell it is broken because the event loop is already gone by the time it would be called
I'd basically need a means to create a setup whre I can reproduce such an issue within a sane manner
sincerely idk why bungee is totally broken but on waterfall partially
The event should stll afail be fired unless he changed something with that
on my setup is called fine
because Waterfall calls the event too if there has not been a kick packet
I'd need to go much deeper into the changes
but like on a friend one, only playerdisconnectevent is fired
cat there’s nothing
I checked
the only variable is 1.19 behavior
I expect downstream to die before upstream
thus no event loop to fire event upstream
Yea, I mean, what is the manner in which the client is being kicked here is the Q
nothing changed in those events
but the client logic changed
if it works with the current version of waterfall and a 1.18.2 server/client
then it is 100% because of 1.19 logic
time to try i guess
Mojang doesn't particularly care about proxies as much as minimal accomidations
it doesn't help that bungee is massively scuffed here in some fronts
trying with 1.19 proxy
but 1.18 client
1.8 works fine, the thing is i also tried with 1.19
and was working, but for some, not
what the heck is going on
anyway, testing proxy & paper at version 1.19 with 1.18 client
@wide maple i'm sorry for ping, seems that on non-working setup with 1.18 client now the issue is gone
now i'm trying with normal bungeecord
confirmed
1.19 client issue
now everything is working fine
confirmed even in older versions with updated proxy, the issue is 1.19 not sending a kick packet i think (?)
did you /kick yourself to test?
the server is not expected to send a kick packet if it crashes ever
I'm a bit lost here... What event should I use if I want to get the player's name and IP during their join?
Should I use PostLoginEvent?
Also, how would I exactly obtain the IP the player joins with? Need this stuff for caching
Waterfall is an improved version of BungeeCord, right? Could I request a feature what is missing from Bungee, will you implement it?
depends
- being frank, dealing with bungeecord has left me heavily burnt out
- theres much stuff on my todo list which means that placement of a feature request could vary like crazy
Look at this: https://github.com/SpigotMC/BungeeCord/issues/1619
I'm trying to use Bungee in a Docker environment so it's a pain in the ass thing that couldn't use hostname to connect to containers (ie. if a container crashed and restarted the environment assign a new IP for it)
er, yea, that's a pita of one
- fixing that would involve breaking the API
- some level of "urrrgh"
I mean, maaaaybe I can do it without breaking the API but I've been burned by that shit so many times that it makes me weary af
if you wanna toy uorself, in the api, util class, there is a methdod called getAddr
replace the constructor at the end with a call to InetSocketAddress.createUnresolved()
idk what other implications that might have
(You'd also need to disable netty dns in waterfall.yml)
(but, assuming docker, you've already done that)
Hm okay, I'll try it, thank you
.
PostLogin will have their confirmed IP
Well, their player name
PreLogin will have it before its validated with mojang, etc
also, assuming that you mean the IP they had in their client?
Yes. The IP the client tries to connect from to the proxy
I'm not sure if I can just use getAddress because it's deprecated, but the alternative available doesn't seem to have any way of obtaining the IP?
Well, if you mean their actual IP address, getSocket or something, see the JD for that deprecation
if you mean the address that they shoved to connect to, i.e. my.pretty.server, get the pending connection, it has the vhost on that
Their own IP
And as I said. getAddress is deprecated because of BC accepting Unix sockets and the only alternative I can see here is getSocketAddress but this seems to have no method nor info about getting the IP from it...
you'd need to cast it to INet
So this would work?
@EventHandler
public void onJoin(PostLoginEvent event){
InetSocketAddress address = (InetSocketAddress)event.getPlayer().getPendingConnection().getSocketAddress();
plugin.getCore().getPlayerHandler().addPlayer(event.getPlayer().getName(), address.getHostString());
}
Yes
Okay, good
i tried everything, /restart /stop and all
so yeah, i'm confirming an 1.19 issue
seems not sending the packet, or at least proxy isn't doing that
Is ignored, like to send the brand
Is there some sort of AsyncTabCompleteEvent like in paper? Because i have to wait for a database query to finish before sending the suggestions to the client
Anyone has any experience what will happen if I’m trying to remove the fallback server?
no, that happens on the network thread iirc, and there are wider issues to solve to get an async tab complete event there
Hellow !
Could someone tell me where these errors come from and how to fix them or hide them from my console?
something opened a connection and didn't send anything for 30 seconds
stuff like that is generally janky server lists type stuff or random crud on the internet
generally, use firewall to block it
ups, wrong channel...
Holy shit you have a lot of plugins on your proxy
I don't think so x)
Btw why you have viaversion on proxy?
Such as useless, and works bad compared to backend
At least for me yes, you have some useless plugins for a proxy.
I find that it looks better when it changes the protocol (my server is 1.18x - 1.19 compatible)
You can just use some other plugin that is exactly for that, make priorited server 1.18 Up.
Viaversion on proxy,nah just avoid It.
Do you have any idea for this?
Well, some plugin that blocks versions for bungee, im pretty sure that exists.
I just removed and potentially found a plugin. I put it in my list of plugins to test.
But however, I still have the problem with the read timed out D:<
I mean, did you make sure your plugins are rigthly supportin 1.19/updated??
I switched from FlameCord to WaterFall, because I didn't like then, and in the end I find myself spamming with these errors (or in FlameCord there was an option to hide I think)
I will test without plugins
?? Flamecord It just toggles handlerboss messages, use a log filter or do It yourself.
Are there a demo which could send messages using strings in a language file?
Does anyone know how to fix this error? I do use a fiver wal
11:20:32 [INFO] [NiekonFlames,/14---------:63269] <-> InitialHandler has connected
11:20:42 [SEVERE] Error authenticating NiekonFlames with minecraft.net
java.net.UnknownHostException: sessionserver.mojang.com: Temporary failure in name resolution
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:933)
at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)
at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:852)
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1367)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1301)
at java.base/java.net.InetAddress.getByName(InetAddress.java:1251)
at net.md_5.bungee.http.HttpClient.get(HttpClient.java:65)
at net.md_5.bungee.connection.InitialHandler.handle(InitialHandler.java:486)
at net.md_5.bungee.protocol.packet.EncryptionResponse.handle(EncryptionResponse.java:56)
at net.md_5.bungee.netty.HandlerBoss.channelRead(HandlerBoss.java:114)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800)
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:487)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:385)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:833)```
disable netty dns in the waterfall config and see if that fixed it
Do not work
I use a firewall
well- fix your system DNS and ensure the session servers are reachable
Bruh
Your server failed to lookup the IP address of the session server
check your DNS setup
That's pretty much all we can say on a DNS issue
i need some help with my configuration
i have it set up like this
public void setupRoleMapping(Configuration configuration) {
Configuration roleSection = configuration.getSection("roles");
Collection<String> permissions = roleSection.getKeys();
for (String permission : permissions) {
System.out.println(roleSection.get(permission));
this.permissionToRoleMap.put(permission, roleSection.getLong(permission));
}
}
the keys are not null
they show up properly
but the values are null
not sure if im missing something plainly obvious
have u tried printing permission
iirc permission doesnt directly give the full yaml path
do not use .'s in keys
that was the issue ^
How do i get player prefix?
I Guess that your plugin haves that?
Nope, i want to use vault prefix but there is no vault on bungeecord
I think on bungee/waterfall/velocity you're basically stuck with hooking into permission plugins directly, no nice friendly middleman to make life easy
I mean that is for backends
Plugins like luckperms can make that easier with the API built on.
Where can I find the latest API version of Waterfall to import it with Gradle? Or do you keep it in sync with the Paper version such that the two are always the same?
Thanks!
what's the best practice for custom bungee<->paper messaging? should i add a listener that provides an extra subchannel on BungeeCord or is it better to use a custom channel (in which case doesn't that mean the client knows about it/can mess with it?)
generally, use your own channel
(make sure to validate that the sender is the server, etc)
what about on the server end? how can i tell the difference between a packet from a client and from bungee?
ohhh should i make bungee cancel incoming packets from client before they get to servers in the first place?
Yes
Since that’s unsupported you won’t get help with it here for obvious reasons
But I’ll say this much; you’ll somehow have to get the artifact into your project environment

Hi everyone! Anyway I can easily debug:
could not decode packet! java.lang.IndexOutOfBoundsException: readerIndex(4) + length(1866) exceeds writerIndex(5): PooledSlicedByteBuf(ridx: 4, widx: 5, cap: 5/5, unwrapped: PooledUnsafeDirectByteBuf(ridx: 6, widx: 6, cap: 2048)
Values of length(var), ridx, widx and cap vary.
Someway I can get a stack or the packet thats causing this?
I think its probably caused by one of our plugins 😮💨
There is a system property which lets it produce a bit more info in the debugger for some stuff
can't say entirely as stuff like that gets kinda nasty
I'll look for such a property, thank you.
Its only towards 1.19 clients too, all other versions we support over ViaVersion work fine.
I have been able to figure out it only happens when another player comes close to the 1.19 player.
Don't use ViaVersion on proxy is useless firstly and wont work on it now, also on your backends use "viaversion dev" from jenkins builds
Yes is it, some of your plugins is oudated.
I don't use viaversion
Are yo using lastest build of waterfall?
oh, i thined by "via" you was meaning it
Does Bungeecord have an API way of loading Plugins at Runtime? Or do I need to use reflection
What are you trying to accomplish by loading plugins at runtime?
Writing a Mocking Library for Bungeecord
I'm using the latest waterfall
generally looks like the server tried to kick the player during an unexpected phase
Joining the server directly when setup that way works fine, whenever waterfall is in between it gives the error I've shown. Is forge just generally unsupported?
Ah, that's the reason then
I'm running forge 1.15.2
I imagine there is no way to resolve that, I'll just have to deal with it and run the forge server separately?
correct
You have an option, use a fork called ligthfall with modern forge support.
hey im not very familiar with bungee's basecomponents
how would i serialize a string into a basecomponent and keep thecolors?
this.broadcastedMessages.add(TextComponent.fromLegacyText(messages));
i have this
but the messages arent colored
Chatcolor be like
yeah it fixed it by doing chatcolor.translate
but now my issue is links aren’t clickable lol
TextComponent message = new TextComponent( "Click me" );
message.setClickEvent( new ClickEvent( ClickEvent.Action.OPEN_URL, "http://spigotmc.org" ) );
player.sendMessage( message );
idk how to do it in a config though
it’s easy to hardcore
hardcode
anyways i figured it out, the person using the plugin had a color code in the middle of the link so the client wasn’t reading it as a url
You should lean java ig
i know java
i don’t know how i would be able to put click and hover events in a configurable message
Get the string with the ClickEvent, that's all
You could try Lightfall, a waterfall fork that has modern forge support
Someone else mentioned that too, wasn't bothered enough to re-build my docker image yet though
Thanks
Is there a PlayerCommandPreprocessEvent (from bukkit) equivelant on waterfall?
or, a way to cancel a command
I thing that you will need to use the chatevent
If im not bad, #isCommand exists.
Yep you're right, thanks

Hey everyone, how can I retrieve the ip-address and the port of the proxy my plugin is installed on? On a Paper-Server one can achieve this information with Server#getIp() and Server#getPort()
the proxy can listen on multiple with multiple listeners so you need to iterate through them
oh, thanks
Whats the difference between Handshake#getProtocolVersion() and Handshake#getRequestedProtocol()?
With the first method you get the protocol version, with the second you get the requested
That's not really any help, i got that from the method names.
from the code it looks like "request protocol" is the next state that the handshake wants (status vs login)
seems to have nothing to do with the protocol version
itÄs the fourth field: https://wiki.vg/Protocol#Handshake
*it's
Ah awesome, thanks
I want to disconnect clients below 1.19 from joining before the secure-profile check, so that outdated clients still get "Outdated clients" instead of "requires secure profiles". From what I've seen the only event fired before that check is the PlayerHandshakeEvent, however if I disconnect people in there they client doesn't get the disconnect message I've set
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerHandshake(PlayerHandshakeEvent e) {
if (e.getHandshake().getRequestedProtocol() == 2) {
if (e.getHandshake().getProtocolVersion() < ProtocolConstants.MINECRAFT_1_19) {
e.getConnection().disconnect(new ComponentBuilder("Outdated client").color(ChatColor.RED).create());
}
}
}
Client just get's "Disconnected". Is there any better way of doing that or am I doing something wrong?
handshake doesn't have a kick packet
earliest disconnect with message is in the login stage iirc
couldn't you just let them join the proxy like normal but kick them afterwards?
The proxy checks for secure profiles really early
And now my issue is that when you try to join with 1.18 or lower you don't get "Outdated version" because you don't even reach the backend server, so you just get the "requires secure profile" which is super unhelpful for users
Or can I disable "enforce secure profiles" in the config and manually check for that at a later stage?
yeah well my thought was that you would just not require secure profiles but just kick outdated clients/non-secure ones after they joined but I guess then the client wont accept that the server requires secure profiles afterwards
(I also already handle the outdated client stuff on the proxy itself, not on the server behind it)
I just use the PreLoginEvent, that might be before the whole secure profile stuff takes place (at least it looks like it from the login packet flow on wiki.vgr
*)
nope, it is right after iirc
oof :S
kinda odd that a "Pre" event is after login data was already exchanged :S
oh, wait
yeah, that implementation isn't good either
that's... dum...
tbh just having an event for it (or including it in the PreLoginEvent instead of manually handling those states) would solve this ¯_(ツ)_/¯
right now you can't even bypass the slot count with the event lol (something that works in the Bukkit API)
Or, if secure profiles are enabled, just kick clients that don't support it with Outdated & secure profile required
I mean... why not just adjust the translation key? xD
or that
But I honestly think that my solution is cleaner
I'll open a PR to waterfall
is there a method to get the default fallback server?
@glad salmon it uses a priorities list now. the first entry will be tried first, the second second etc.
Or is other way to stop competly the proxy?
don't ping cat
sry, nvm i found better way
Hello 👋 how can I access profile properties on handshake? The class which represents properties in normal BungeeCord is net.md_5.bungee.protocol.Property, however, there seems to be no protocol package when building for Waterfall. Were the classes moved to another package or how can I access those classes?
I mean, those are internals
if you want to access those you'd need to build waterfall and install it to your own local repo or whatever yourself
Someone remind me to publish my papermc api gradle plugin someday
That’s still on my list of things to do
you do stuff first
Yes, however my plugin is built primarily for BC and Waterfall users report that the plugin cannot load because the class is not available. With 1.19 release the Property class was moved to another package, is there any possibility Waterfall kept it at the previous location?
Yes, updating the plugin
why not just use api? 👀
Just use the new location? It wasnt removed from the api and you should always only use latest with bungeecord or waterfall anyway
I haven’t mentioned that I’m building against archaic versions, understandably always for the latest, it was built for 1637 (1.19 update).
But just to clarify again, BC has no problems running but waterfall has (both are 1.19).
I mean, that's not posible
I use waterfall on most of my plugins, by changing it worked, they don't even touch location thingy.
Yes, I agree. However, it seems like for some reason protocol package is just missing. It doesn’t even display in 1.19 waterfall docs…
Just change i mean
For example, i handle a 1.7 fork and i updated
I know, but I don’t know what you are trying to tell me guys. I mentioned the plugin was already updated to 1.19 (where BC included the changed class location) and everything is running fine, just waterfall has problems.
So that’s not about my code but rather where the class went, because my users get class not found when they try to use the plugin.
I mean what problem lol?
Im based on waterfall, and waterfall did the same upstream pull
Okay nevermind, just found out they were using an older release which did not support it. I am away so I had no other verify existence of the problem. Thx and have an awesome day 😎
So you basicly downgraded? xd
No, they upgraded to the latest release of my plugin 😉
Well yes, bungeecord droped back versions support
what is the minimum java version for waterfall
Java 8. but recommendable is always lastest stable.
cool
So with waterfall, to get a players' IP and port you do #Player.getSocketAddress() right? But like, that gets the player's IP and port. My question is: Is there a better practice way of getting just the IP rather than using #String.substring()?
.getAdress().getHostString iirc?
Deprecated but yh ig
Well
so, basically, what you'd wanna do is getAddress and instanceof InetSocketAddress
then you should be able to cast it and avoid the deprecation
What, like (InetSocketAddress) e.getPlayer().getAddress()?
I mean, what's the difference between that and just using getAddress() on its own?
Both trigger a deprecation warning
Imma check they work
No, use getSocketAddress() and cast, not getAddress()
My Mojang Cape is not showing on my Server
Can you help with what? is it a problem with the server?
does net.kyori.adventure work with waterfall (specifically for components), or do i need to go back to the root BaseComponent apis for the waterfall/bungee part of my system?
It works, but is not built in, you will need to use base components ig
It even can be your client any ways i don't thing that this is even related to "waterfall"
I built a launch wrapper for server software, and it works fine for paper, but for some reason waterfall refuses to load plugins/modules, any ideas?
I'm using the latest build
Paper
Waterfall
I launch the server files using this
Because bungeecord assumes that the classloader it's running in is the system classloader
ah ok
makes sense thanks for clarifying
Alright i got it to work!
Used https://github.com/CGJennings/jar-loader/blob/main/src/ca/cgjennings/jvm/JarLoader.java
edit: crap i did setproperty instead of getproperty
nice one
pretty sure you can? the api might just not support it though
scoreboard api in bungeecord is pretty basic tbh
The players username is the one thing you must never touch
But that’s only partially true
I will describe the problem in more detail. I have a database where the data I need about the players is stored. When connecting, I need to change the nickname of some of them and assign the UUID along with all the items on spigot servers (because usercache.json stores both the nickname and the UUID, I don't think everything will be as I wish).
uuid is changing with using reflection
maybe there are some ways to solve my problem without focusing on the bungee api?
Hey, in general, i decided to make a custom constructor for interacting with inheriting classes (commands) that use an annotation with variables: name, permission, aliases. There was such a problem, super cannot get the class of the inheritor, which is created in the constructor, it produces null, in the case of super(this), "this" cannot be referenced before the supertype constructor is called. How can you get an inherited class without using variables for the constructor?
er, can't super literally call this.getClass()?
this does'nt work
I mean in the super
from this.getClass() i would have already received inheriting class, and from there i would take data from the annotation, but this is not called in superclass
I mean, you can't get that info because that info doesn't exist
there is literally 0 way around that other than hardcoding the class name
otherwise you'd need to initialise that later
but, inside of the thing which BaseConstructor extends
you can call "this", and get that info
this is clear
Hey electronic, i was testing stuff on my test server and i noticed that when you enter the proxy and move to the spigot (like switching to proxy -> server) the cpu consumption goes up disproportionately for a few moments (waterfall), happens also on BungeeCord on vanilla without plugins and that stuff.
Do you know why is caused? So i can take a look and try to fix it up.
probably due to compression of chunk data
^
Thanks, ill take a look
Any ways i disabled compression threshold on spigot and waterfall and nothing changed
ERROR: java.lang.NoClassDefFoundError: net/md_5/bungee/api/ChatMessageType
But in waterfall I see an enum called ChatMessageType maybe it was in 1.16 or before a class and now I updated to latest and see it's an enum, so maybe the error appears therefore, but dunno how to fix it
What api are you using of waterfall
The project itself doesnt hook into waterfall but uses a project to compile with latest waterfall, so 1.19 and on the server its the same jar - 1.19
Oh i see I used before 1.14 chat-api from waterfall and now the whole project (bootstrap) 1.19
maybe thats the reason... 😄
Yeah, is it.
I checked this https://github.com/PaperMC/Velocity/pull/357/files
When I get a ProxiedPlayer through getPlayer(String), would that be like getting a OfflinePlayer in Spigot using getPlayerExact?
Like will BungeeCord get any data it has, or is that just null for players not connected to the proxy yet?
bungee doesn't have any player cache iirc
yeah, there is no cache, only online players exist
What's actually the command to finish rebase on VIM?
Is there a way to register perms whilst the plugin is running on Waterfall? Like some waterfall equivalent of bukkit's #PluginManager.addPermission()?
Nvm, found it. For those curious, it's done in the constructor of a bungee Command
On another note, is there a waterfall equivalent of #Bukkit.broadcast(message, permission)? Or do you just have to loop, check which players have perms and send to them individually?
second
Can we remove these version posts?
I just want to write something different is that possible?
{
return new ServerPing(
new ServerPing.Protocol( bungee.getName() + " " + bungee.getGameVersion(), protocol ),
new ServerPing.Players( listener.getMaxPlayers(), bungee.getOnlineCount(), null ),
motd, BungeeCord.getInstance().config.getFaviconObject()
);
}```?
When you make a command in Waterfall, the constructor is Command(String name). That name doesn't seem to be the command label so what actually is it? Is it just for storing purposes?
As ever, I found out after I ask. The "name" is the main command
in spigot i can use ConfigurationSerializable to load a custom class from yaml config. how can i load a custom class in bungeecord? anyone have a tip?
e.g. with ConfigurationProvider.getProvider(YamlConfiguration.class).load(InputStream)
yes but i cant load the custom class. it can not be cast
i have this: List<DatabaseEntry> databases = (List<DatabaseEntry>) configuration.getList("databases");
you need to parse it
don't think bungee has a way to do that automatically
(unless registered with SnakeYAML directly I guess)
mmh ok thx
What command do i use to build the jar
depends. If you are a developer/have a non-build patch executing mvn clean package would do it. for non debug purposes just run ./waterfall b
Yeah, if you do again waterfall build it will basicly delete all your changes, take care with that
That’s why I worded it like that
If you have an uncommitted patch either rebuild the patches or don’t use the build system
I'm having a bunch of trouble connecting to my database via Spring-DataSource.
private static ApplicationContext loadSpringContext(Plugin plugin, File... configSources) {
var pluginClassLoader = plugin.getClass().getClassLoader();
Thread.currentThread().setContextClassLoader(pluginClassLoader);
try {
Class.forName("org.mariadb.jdbc.Driver");
plugin.getLogger().info("Found MariaDB Driver");
} catch (ClassNotFoundException e) {
plugin.getLogger().warning("Unable to find MariaDB Driver");
}
var appBuilder = new SpringApplicationBuilder()
.resourceLoader(new DefaultResourceLoader(pluginClassLoader))
.sources(SpringRoot.class)
.bannerMode(Banner.Mode.OFF);
includeApplicationYMLFromPluginResources(appBuilder, plugin);
includeConfigSources(appBuilder, configSources);
return appBuilder.run();
}
this is confirming that the driver is definitely there and accesible
but i'm getting an error that says "failed to determine a suitable driver class" every time
wondering if this is an issue unique to trying to load spring up underneath waterfall?
(and yes i know spring is heavy and overkill for this, it's just that this is 1 module of 4 out of a larger project that uses spring for the core data module so being able to load that core data module up in the 'small' waterfall module would greatly simplify things)
hey
where i can find the waterfall dependency
latest
on github the repo doesn't work anymore
(DiscordBot) Waterfall A point in a river or stream where water flows over a vertical drop or a series of steep drops. (https://duckduckgo.com/Waterfall?v=i&kp=1)
.g help
(DiscordBot) The Help (film) A 2011 period comedy-drama film written and directed by Tate Taylor and based on Kathryn... (https://duckduckgo.com/The_Help_(film)?v=i&kp=1)
i want only the maven repo
this reop not work
"not work"
that gives me literally nothing to go off
I can't help with 0 information, hows it not working?
hit the build button
try running from the terminal or whatever and providing the full build output
i try now to reset maven
maybe this can be helpful
i have fix it
thanks for the quick help
Hello can someone enlighten me to make a system where the player can connect to several versions a bit like ViaVersion for learn how it works, is it quite complicated to reproduce, or, it is quite simple, I guess I can use the PreLoginEvent event no?
I mean, you need to rewrite packets coming in
easy option, "just use via"
(in and out)
the thing is that I use FlameCord and I have a lot of error messages when I join with several versions using ViaVersion, then it works but at each connection I have an error message that comes from the source code of ViaVersion
the first error on starting server :
Because they made incompatible changes
you'd need to take that to flamecord
Waterfall lets you disable entity metadata rewriting and leaves those classes around for compat reasons
the second error at each connection :
Bro read what he said
You'd be better off tryna get flamecord to fix their compatibilies, get via to, or fork via and patch it yourself
Firstly, here forks are not "supported", and flamecord deletes competly entity meta data https://github.com/2lstudios-mc/FlameCord/blob/master/Waterfall-Proxy-Patches/0032-Disable-entity-Metadata-Rewrite.patch
yes I know it says that something is null but I don't have access to the code of ViaVersion ^^'
Remove that patch i sent and re-build it
how can I correct them myself?
that's on you to figure out
or I put ViaVersion only on my paper servers
a friend who uses FlameCord told me he does it like this
thank you anyway ^^'
Via plugins should be on backend servers anyways
just download the latest
when update waterfall to 1.19.2?
but I have one issue
if player takes damage, he kick him
I uninstall all plugins from bungee & lobby
and the problem persists
U can help me with this problem electroniccat?
<-> DownstreamBridge <-> [lobby] - bad packet, are mods in use!? Couldn't read all bytes from a packet. For more information, launch Waterfall with -Dwaterfall.packet-decode-logging=true```
look at 1:20min on video
u can join to my server for test it?
message.txt by @slim dawn: https://paste.gg/d85ad7cada8d4e61aefe153bb46959e3
electroniccat
- with the flag
- and I said, without plugins
given that you've only got 1 plugin installed, which has caused issues in the past, you probably wanna go check for updates to that thing
wait
In the error you copied earlier, "launch waterfall with", that goes before -jar
but, it's probs what I already said
my flags:
java -Xms500M -Xmx3500M --add-opens java.base/java.lang=ALL-UNNAMED -jar server.jar --nogui
on bungeecord
hosts tend to recommend/assign them like that to save on memory and can oversell machines easier
also it's not normal with non-server applications to assign everything at once. in a normal environment and short lived programs you only want to use as much memory as you need to leave room for other programs, the os and the file sytem cache
*system
I know this is most likely lame question from yall, but how do I check if .getFrom( ) is available in ServerSwitchEvent?
what do you mean by "is available"?
is there a way to tab-complete bungee-level commands?
yes?
how exactly? I don't see a tab complete method on the Command class
so if my command implements that it will be picked up automatically then?
off the top of my head, yes
kk, awesome. that helps a ton
Hello, is there a way to pass command onto player's proxiedserver? I have a command name conflict in proxy and spigot, so I would like to just let the spigot server handle it
*paperspigot
Why do you think that bungee haves g+command name
Just do for your proxy command "g+name" and for spigot keep withot g
Well I have registered a command /build to send you to the build server, it has been added for convenience not for any necessary functionality, making it /gbuild would not really help it
I believe that is not possible unfortunatelly
Speaking of which, is there an event for any command with the possibility of cancelling the event before reaching a spigot server?
ServerKickEvent has the kick message in it?
Isn't spigot actually kicking the player?
I guess you could keep the connection with proxy..
Im just dumb sorry
I mean, for kicks initiated from the backend, it will fire that event, if you wanted full access you'd need to hook into outgoing packets
as for cancelling commands, if unsigned, the chat event should work
Yeah figured that a few moments ago
I thought the connection with proxy is cut along with the player getting kicked
Kinda forgot what a proxy is apparently
public void onCommand( ChatEvent event ) {
String message = event.getMessage( );
ProxiedPlayer player = ( ProxiedPlayer ) event.getSender( );
if( message.substring( 0, 1 ).equals( "/" ) && ! authenticated.get( player.getName( ) ) ) {
event.setCancelled( true );
}
}```
message.txt by @raven frigate: https://paste.gg/f8cb7d6c75ff41cba0c20c1bac911350
Anyone has any idea why this error pops in when I send any command but am set to authenticated?
To clear up, authenticated is a hashmap of string and boolean
ye its containsKey but that is set on join and removed on disconnect, so there is no way the key isnt set
try debugging it
will do
Hah Im dumb
It was ServerDisconnectEvent instead of PlayerDisconnectEvent where I was removing the key from the hashmap
Waterfall yells at me for this when I handle the ProxyPingEvent.... Not sure how I could actually improve this.....
cache the data that is not dynamic
?
If you mean caching favicon, I already do that (At least for the image data) using the FaviconHandler:
https://github.com/Andre601/AdvancedServerList/blob/feature/favicon-support/core/src/main/java/ch/andre601/advancedserverlist/core/profiles/favicon/FaviconHandler.java
[WARN]: Using PROXY protocol for listener /IP HERE, please ensure this listener is adequately firewalled.
[WARN]: Since PROXY protocol is in use, internal connection throttle has been disabled.
[WARN]: Could not bind to host /IP HERE
io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Cannot assign requested address
``` anyone know the cause of this?
I'm super new to Waterfall
trying to connect a paper server to a waterfall server
are you using haproxy? otherwise you dont want to use proxy protocol
no, do I disable it?
yes, also waterfall has to run on a different port from the server if youre doing both instances on the same machine
they aren't on the same machine
nah
or the external address:port
external address:port
and you used the ip:port not a hostname?
it's a hosting panel
pterodactyl?
does it use docker? because it sounds like that
please understand we cannot exactly help with private solutions, you will have to take that up with your friend then
all we know is that the address you tried to assign is not available to the JVM for whatever reason
yea fair enough
could be either the interface is privileged, doesnt exist, or something else is already running on that port
how is it hosted
Links sent through #ProxiedPlayer.sendMessage() aren't clickable. Is there some way to change this?
The plugin is meant to take args from a command and show select players
So they're not JUST sending links, they're sending messages that may contain links that need to be clickable
Basically, the logic for sendMessage doesn't do that
only way to fix that is to use components
So like, make the whole message clickable?
No
I mean, you can make the whole message clickable, but, if you want just the link to be clickable you'd basically need to write your own serialiser or something
if you use the adventure platform stuff, there are ways to just convert a string to a component and then use a regex filter over the component to basically do stuff like that
Ah right. Thanks
Hello, i'm trying to cancel the ChatEvent so that all the players except one still see the message sent. Is it possible with Waterfall or only with the paper API ?
Only paper for 1.19 or newer
ok, thanks anyway 🙂
What is the best api plugin to create inventory guis from proxy?
wtf
Bro, that's kinda stupid why you would create an inventory trougth the proxy
well punishments gui or smthg like this
Can someone help me with TextComponent? I'm using the ComponentBuilder to merge to TextComponents (let's call them sub-components). If the sub-component has a link, I want it to be clickable but ONLY that sub-component. However, it seems that making one sub-component clickable makes all the following ones also clickable with the same link. Is there a way to cancel this?
I've tried setting the click event of the next sub-component to null but that's not worked
(Also while I'm on the topic, if anyone knows a way to carry colours over into the next sub-component, that'd be amazing <3)
i don't really think there is one to make a gui through the proxy
with that said, how i'm doing it is that i have a custom punishment system that runs on the proxy, and then i extend upon that with guis on paper / sponge servers
Anyone having an idea what exactly is not working here?
I use Caffeine in this class here:
https://paste.helpch.at/nipucihaqi.java
And I initialize the class here: https://paste.helpch.at/idewovezon.java
outdated dependency?
Issue is already solved... kind of.
Was the minimizeJar option deleting classes it thinks aren't used only for Caffeine to require them...
https://github.com/PaperMC/Waterfall/blob/master/BungeeCord-Patches/0006-Fetch-modules-from-the-Waterfall-API-endpoint.patch#L31
One little thing I noticed: In this patch shouldn't the API link be api.papermc.io instead of papermc.io/api?
/api was the old endpoint
Should ideally be api.papermc.io yeah
Feel free to PR :)
You can't manually edit patches via the webeditor, otherwise the hashes won't be updated, see the contributing guide
Yeah i know how to edit patches, i see.
Is the change just from papermc.io/api to api.papermc.io or are there other changes required for the URL?
Also, the contributing guide is... outdated?
Like doing git rebase -i upstream/upstream only returns a fatal: invalid upstream 'upstream/upstream'
So not sure what happens here
@bleak current Do you have some input on this ^
It's really frustrating when you want to update a patch (Because I don't think a new one is needed here) but the contributing guides are wrong
Works for me, are you cd'ed into Waterfall-proxy?
yeah it could definitely be made a bit clearer
Okay, I'm confused... I made the changes I wanted and made the ./waterfall rb at the end...
Is it doing the patches on the branch I created or does it default to master?
Okay, I think I got it
yeah, you did it right
Also, quickly improved the contributing file a bit... Mainly some formatting fixes
Spend some time cooking up a change for the contributing file... Feedback appreciated
https://paste.gg/p/Andre601/3329a6fd83a84570843aceba939b157f
Bump, still an issue
The structure of the component is what matters
i.e. you'd wanna structure them so that the components following your link, aren't a child of that one
https://spark.lucko.me/ioD1ZWlBIY if you filter by sources here you'll see Floodgate has a Netty handler that's taking up a good chunk of CPU, but it's also listing Brigadier when that shouldn't even be happening? As addInjectedClient requires a channel.
https://github.com/GeyserMC/Floodgate/blob/master/bungee/src/main/java/org/geysermc/floodgate/inject/bungee/BungeeInjector.java#L136 is the source but please don't look too hard. I'm pushing for less Netty for future refactors.
Is this some weird profiling bug or legit?
I mean, that would look like a bug
And the weird thing is that multiple spark profiles are reporting the same thing, so it's not a one-off
So appending text components to a component builder makes the new component a child of the existing component? Is there any way to get around this? This is how I'm forming the builder RN: for (String s : strings) { builder.append(toComponent(s)); }
Yes
I have an interesting issue, when importing Waterfall using gradle, it works mostly. But the Class BungeeCord cannot be found, is there a way to fix that?
do I need to also manually add the Bungeecord api?
Use something like https://oss.sonatype.org/content/repositories/snapshots
To get the proxy and call BungeeCord
any ways, why?
why what?
why you need to use bungeecord main class
so I can access the instance and get the PluginManager?
The BungeeCord class is not part of the api module
Yep, i sent him a repo that haves the proxy module imself
so I need to also add the Bungeecord-api?
Also you can do getServer() on your plugin instance or somrthing like this, i dont remember
I think you can do that without instance bungeecord
then I would need an Instance of the Main Plugin Class
Yes
or ProxyServer, its the same as the BungeeCord class
If you want to use the BungeeCord class just use the bungeecord-proxy artifact instead of bungeecord-api
^^
Changing the repo will do absolutely nothing without using another artefact.
I just used this solution, so I don't need to add another repo / artifact
Any suggestions on how I could improve performance here?
https://paste.helpch.at/voyefemidu.cs
The actual event handling:
https://github.com/Andre601/AdvancedServerList/blob/feature/improve-fakeplayers-creation/bungeecord/src/main/java/ch/andre601/advancedserverlist/bungeecord/events/PingEvent.java
I mean, with the time variability there, make sure that you're not tryna get reasonable measurements out of unreasonable overloaded harwdare
outside of that, work out where the performance hits are, it's pretty hard to say where the time is gonna be spent without digging deeper into that code
You can split the tasks
So you don't huge load the event once ig
My guess is the Favicon handling as I allow 3 separate sources to be used as input: file name (Will then take from a folder), url or player name (uses mc-heads).
I do cache the created favicon in the end to reduce calls and such, but there is obviously the initial spike at the start...

Can i cancel switch on ServerSwitchEvent event?
Why would you cancel it
well i want to make something like whitelisting system
is the event cancellable?
i've changed to serverconnectevent, and this one is cancelable but if i cancel it still connects me
probably boils down to the circumstances in which the event is firing/being mutated
oh, no, nvm
If the event is cancelled, it pretty much bails out of the logic which attempts to connect somebody somewhere, so, probs either not being cancelled or something is uncancelling it
Can i mute listener X took Xms to process event?
Why you would do that
cause i got warnings when redis take 50ms to process
I mean, it is stupid to filter the log of a stacktrace that is saying that X plugin is taking longer than usual to pass the event. It is better to fix it instead of hiding it
how can i fix it when using redis?
Is the plugin oss?
Well probably you can split the tasks of the listener so gets faster to process
I don't know how is built that, so i can't say too much
But definitly use a LogFilter to hide a warning like that feels stupid
It is made for a reason, not to be annoying. It is to inform you that something is wrong in the process and it took longer than usual
Events generally block stuff, sometimes it's nothing of care, sometimes, it's the entire network pipeline
Can adventure-api be used on a waterfall proxy
using adventure-platform, yes
cool ty
@trail plume did we find any solution to that serverkickevent issue?
I found the cause but no good solution
The cause is the event loop thread not being able to join back into the event pool.
Changing that fundamentally screws with the networking though and not doing it also fundamentally breaks the event
Don’t think we can fix it without breaking something else
I should note
If you want something that definitely works then add your own channel handler into the pipeline, you can get notified on closing.
It’s just not a pretty solution
oof moment
how's the chat signing protocol for proxies looking?
hacky || ass
so, apart from this, what should i do for making it work? the main feature of that plugin is working on kicking
Hello, when i use Server#sendData or ServerInfo#sendData on Bungeecord, the plugin i received in the spigot "onPluginMessageReceived(String channel, Player player, byte[] bytes)" is the first one or is there a way to send data from a specific player? It seems that the ProxiedPlayer#sendData dont send to the server which makes sense i guess, should I not use Player on onPluginMessageReceived for waiting a response for a specific request i did by a specific player?
dependeicy information is useless
which dependency information?
All you provided was a list of the libraries your project uses
dependencies { testImplementation(kotlin("test"))
compileOnly("net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT")
implementation("net.dv8tion:JDA:5.0.0-alpha.19")
implementation("io.requery:requery:1.6.0")
kapt("io.requery:requery-processor:1.6.0")
implementation("io.requery:requery-kotlin:1.6.0")
implementation("mysql:mysql-connector-java:8.0.30")
implementation("com.zaxxer:HikariCP:5.0.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.4")
implementation("com.github.minndevelopment:jda-ktx:fc7d7de58af04e25eb58c0e8b4923621e3179719")
implementation("com.squareup.okhttp3:okhttp-brotli:5.0.0-alpha.10")
}
sorry, my client doesn't respond now, I will send you a detail as soon as my client reply
I don't do support by proxy
well I'm dev of his server and he is admin, and I don't have access to console, anyway. I misused word.
Hello, is the ChatEvent still supported in 1.19 ? I'm using a plugin that replaces some strings with others but it seems like after the update it does not work anymore.
I'm trying to event.setMessage and in a debug output the right message is shown but in chat, it is not
No, the event still fires but modifications won't apply unless you take over chat handling
BungaCord updated netty and build failed? do they actually test this stuff?
also technically speaking having builds that fail when an error was made somewhere is kinda the whole point of CI
runs
(although that's more a thing with big projects that are impossible to fully compile on dev machines)
I'm sorry but i don't understand what you mean by "take over chat handling" . I don't see what i'm supposed to do to change the message
You can't change the message
The only way to do it now is basically to handle chat on the proxy
Hi, do you all know if its possible to run .append() in a forEach() loop?
I don't see why it wouldn't, but I'm having some trouble making it work.
I mean, yea
I mean, depends on what it is
if it's an immutable object and append returns a brand new object, you're potentially gonna have some headaches
This is what I'm working with so far
@Suppress("Unused")
@CommandAlias("vote|votes|votesites")
class VoteCommand(private val configuration: ProxyConfiguration) : BaseCommand() {
@Default
fun onVoteCommand(sender: CommandSender) {
val siteList = ComponentBuilder("VoteSites").color(ChatColor.DARK_GREEN)
PlayerData[sender.name]?.voteTimes?.forEach {
val siteName = configuration.voteSites[it.key]
val color = if ((it.value - System.currentTimeMillis()) <= 8400000) { ChatColor.GREEN } else ChatColor.RED
siteList
.append(
ComponentBuilder("$siteName/n")
.event(HoverEvent(HoverEvent.Action.valueOf(it.key)))
.event(ClickEvent(ClickEvent.Action.OPEN_URL, it.key))
.color(color)
.create()
)
}
sender.sendMessage(siteList.create())
}
}```
sendMessage() wont accept whatever data type siteList.create() is
apparently a Array<out BaseComponent>? ?
Yea, bungees chat API is pretty shoddy
You might need to do something like create()*, I forget what the thing was to get it to explode an array
oh, * goes before the thing
I was reformatting this to be expandable
sender.sendMessage(
*ComponentBuilder()
.append(```
If I try to stick it in the for loop, it just causes errors
Thanks, that was the lead I needed, I'll see if I can do that another way.
Basically, I do not know if the component builder is immutable or not
or, well, no, now I'm just mentally gone in general
Hello there!
Duplicating question from #paper-dev coz, my question could be related to waterfall too.
Is it possible to use Remote JVM Debug feature in the IntelliJ IDEA debugging the plugin, on a server that is started under the Waterfall proxy?
yes
how to log message in console without plugin prefix?
getProxy().getLogger() ? 🤔
Using sout, using the log4j logger
Can i use \n in a string to get to a new line when i send a message to a player ?
I think so?
Yes, you can
Trying to change the following message: https://gyazo.com/0e53393e31a07b901d6dd8a338d1fb13
I tried putting the messares.properties in the root dir (where the waterfall JAR is) but that seemed to make no difference, and going through the API I don't seem to be able to catch the event that causes this message anywhere and set my own custom message, does anyone know of any way of changing it short of doing so in the JAR itself?
Thanks!
The thing will load the file from the disk assuming its in the place where your proxy is running
Weird. it didn't seem to do so
file named messages.properties correct?
Don't need an _en or anything at the end?
you just copy the file out from the jar and shove it in the cwd of the proxy
That's what I've done
oh
this is embarassing
it works now
I think I spelt it wrong first time 💀
Thank you for the help ❤️
Amy ways #waterfall-help i think
Does anyone know how i would automatically copy the jar to a location after building? im using maven + intelliJ
is there a way to specify it directly in the pom.xml? i did that with paper but the pom.xml of velocity is different
Yes
tbh that's not really how you are supposed to use maven but ¯_(ツ)_/¯
It's the fastest and easiest way i know of to just press one button and have everything build and put in place 😅
Unless there are better ways without having to use commands every time please tell me i really don't know much at all about maven
Why, after applying patches just do mvn clean install or something like that, you will get Waterfall binary on /boostrap package
moving the output folder to some other folder generally breaks the concept of using maven
and, as said, theres people who copy the jar using antrun
or theres stuff like symlinks, etc
@Bekaert your IDE's run configuration is usually what you want to use for copying the plugin and starting the server
(or a makefile)
*"building, copying and starting" of course
What would be the best way to get a player by their UUID (who can be offline)?
Waterfall doesn't have a concept of offline players
Yes but many proxy plugins are able to get uuids from names and vice versa. So I was wondering how they are doing this
Like punishment plugins
They either just have their own cache, like a database
or just have their own logic to lookup against mojangs API
Ok thanks
Why would you make a single task async
You will save multiple's?
Just wondering if it can be done inside an async method
Bungee doesn't have a concept of a main thread
And the things generally gonna boil down to the data structures in play
If your data structure can be accessed concurrently, it's probs not gonna be a concern
I mean does the network control thread count? Historically some of the stupider events are still called from that context
Alright thanks 😄
When i want to cancel the ChatEvent, is there a way to remove the blank line (if possible without a paper/spigot/bukkit plugin)?
Or only with a plugin on every connected server and not just a waterfall plugin?
There are 2 ways
- Cancel PlayerChatEvent on spigot server
- PacketListener and remove ChatPacket before is caught by proxy (I don't recommend this)
I need the packet, so ill do the first way
Uh, second way definitly i wouldn't count it as a way.
Does it just edit the message to be “ “ or what does bungee do to cancel it?
or as empty
how to check client version on waterfall
I think that the protocol version is exposed on the players connection somewhere
getProtocolVersion() (With handshake)
Also getVersion() method of the initial handler
That's hacky way
Does bungeecord has another channel for plugin messaging? One with "namespace:path" format.
Perfect, thank you :)
In the second line it throws an nullpointer exception, but the file exists
Why does it work when I use the default waterfall jar than only waterfall-config + waterfall-native?
.load(new File("config.yml"));```
One would guess the the environment you're in hasn't registered the YamlConfiguration provider thing
means it's not the project itself that's the problem, but that the environment has not registered the listener and that is why the problem occurs
cause its an alone instance working with waterfall and not in a waterfall server 😄
ah youre right, with the waterfall-config, the Yamlconfig class isnt included in the jar. then I have to take the whole waterfall jar itself 😄
for velocity dev use #velocity-dev
though same thing was asked in velocity-help a few hours ago, see #velocity-help message
oh rip, that's why I didn't find anything haha
Hey electronic, i was looking the protocol & velocity protocol's implementation. On the StatusResponse packet (readString) you could limit the received data to 65536 on the DoS improvement patch.
Don’t see why not, if you PR it then it’ll likely be pulled
Sure, but i suck at editing patches, i will see contributing file. Also EncryptionRequest/EncrptionResponse packets could be limited tho.
I will make a proper pull request
You remind me
There’s something that absolutely does need doing too
Sigh
This is too ugly to use
Mostly for my own network i backported almost all those from velocity.
I have another question why does waterfall send 3 exceptions instead of the same cache in MinecraftDecoder? Velocity only sends one called as "DECODE_FAILED"
Did some byte change?
Probably an oversight. Being on lifesupport waterfall isn’t getting much love
No, just me attempting to limit the asn1 containered player key in some way
It’s unnecessarily complicated
Well, I tried to change that, limit some packets that were not and in exception attack it improved something (besides I added a boolean property called logStacktraces in the handlerboss)
Not a good solution. I’d rather you add a class like Quiet*Exception (trace-less) and filter that in the logger
part of the seperate exceptions was generally to know what was going on
I think they would not accept a pull-request adding the option to disable the logs by "debug" but it would always be toggleable. Since the logs are proven to be quite wasteful in an attack.
I see.
One of the big headaches of caching exceptions is that you lose information about stuff which otherwise would be useful, not to mention even the people running in stupid environments expect help too
reducing the cost of exceptions during the login process is generally something I aim to do, but, honestly, bungeecord in general has me burned out (ontop of just general burnout)
The issue for hardening is trying to avoid having exceptions thrown by something that’s outside of the direct control of the system.
Catching those and re-throwing a cached exception is the stupidest that can happen
I will leave the exceptions to someone else, the pull request I will make will only limit some unlimited packets that are missing in the Waterfall protocol
I saw this from Janmm
upstream generally doesn't care to invest time into resolving that sort of stuff
Although honestly it's not too bad so far, bungeecord closes the connection after the first exception when the isActive channel triggers, so isn't that easy to kill bungee by way exceptions
Wasn’t a fan of that PR because some of the design changes are unnecessary, plus it has quite a bit of stolen/non attributed code too
and throwing in a fuckton of work on waterfall generally kinda feels wasteful especially as I tend to see stuff that ends up in waterfall butchered upstream or upstream just ends up doing weird things
Always they point as out of scope instead of avoiding the issue
Velocity seems like doesn't have even some bungee exploits
The issue is also there’s no clear distinction between active and inactive
That’s bungees biggest issue
Something you can’t exactly change
Velocity deals with state better, and is smarter about when to stick in the pipeline, and better about data validation, etc
Yes.
For an experiment we are looking into how viable it is to make most of the networking run on rust and use jni bindings for api
ç
I have another existential doubt, right now how is waterfall if someone starts to saturate Encryption requests, since there is no established limit it will be saturated? I tried limited/unlimited and only was a few % usage of difference
Something like ->
private final QuietException OVERSIZED_PACKET = errorBuilder("A packet could not be framed because it was too large");
public void oversizedPacket(int packetCount, int expected, int actual) {
if (DEBUG) {
throw new CorruptedFrameException("Packet #" + packetCount + " could not be framed because it was too large (expected "
+ expected + " bytes, got " + actual + " bytes.");
}
throw OVERSIZED_PACKET;
}
Has waterfall an api for tab completer ? Because Bungee one doesn't work well for me
exact same as upstreams, and a command define event
outside of that, the thing generally works fine, just its only called for commands registered on the proxy
is there any dev version of waterfall?
no
All commits of Waterfall are instantly a update. But why you would like a dev-branch
No just got me curious.
Hi, i want to collect the online time for players so my first thought was to store the join date and calculate the timespan between join & quit. So basically everytime a player quits the proxy i calculate the difference and update it to my store. Is this a reliable way of doing this? I mean the quit event should always be called unless the proxy dies, right? Is this so "reliable" that i could expand this to things like player money etc?
how does che BungeeCord channel work, is it available via waterfall?
i currently have this code which was taken from the spigot wiki and it should apparently send a message on all bungee servers.
tho i don't see any message in the servers
does anyone know why?
Yes, the channel exists on waterfall and works the exact same as in bungee
then my aren't my messages showing in the servers
there could be a problem with my code definetly but every check seem to pass without problem.
Outside of making sure that you're actually connected through the proxy, no idea
wdym by actually connected
i.e. make sure that you're actually connecting to waterfall and not the backend server
my servers are set up correctly
i can log-in and switch servers in game
i've finally got an error.
apparently the channel wasn't registered
The channel is bungeecord:main for 1.13 and newer
Spigot does some mangling for the BungeeCord channel, so you just wanna leave it as that, otherwise it breaks
issue they have is that they didn't register it
Hiya. I'm attempting to implement Teams this into a custom plugin of mine, but I'm struggling to find any documentation for Teams anywhere. I'm attempting to add prefixes, suffixes, color, etc in tab, but I'm not having much luck. I would be extremely grateful if you had any suggestions or snippets of code that you could share. thanks
public void initTeam(ProxiedPlayer player) {
Team team = new Team();
team.setName(player.getName());
team.setDisplayName(player.getName());
team.setNameTagVisibility("always");
team.setCollisionRule("always");
team.setColor(1);
team.setPrefix("test");
team.setSuffix("test");
team.setMode((byte) 0);
team.setPlayers(new String[] {player.getName()});
for(UUID p : connectedPlayers) {
ProxyServer.getInstance().getPlayer(p).unsafe().sendPacket(team);
}
^this Team is net.md_5.bungee.protocol.packet btw
and more specifically, the client is disconnecting with "Connection Lost" when this packet sends.
I strongly suggest avoiding touvhing the scoreboard on the proxy. especially the api for it on the bungee is not fully synced with the client in some cases
(also of course that's not how you use the scoreboard api... the packet sending methods are for packets, not random objects)
ok well I guess you could use the Team packet (which I'm not sure you are using?) if you try that then check the error which cases the disconnect I guess and fix the issues that error points out
Yea i'm using the Team packet and getting no console or client errors. If you don't recommend touching the scoreboard on the proxy, how would you recommend manipulating the Tablist on a bungee network?
I would not recommend manipulating it. if you really need to use the api of established plugins like BTLP or GlobalTablist
mk, i'm not fully ready to use an api of something else yet as i'd really prefer to keep this within the current plugin. I'll keep trying to figure out the Team packet issue i guess, but the only error im getting from it is a MalformedJson exception
Prefix and suffix have to be json chat not text
Aka while yes the type is string
The data is json chat
Good look figuring that out with bungee chat
Heyo- I’ve got a similar question to the guy above- so we got the stuff figured out with proxy teams and stuff however when we send a PlayerlistItem it doesn’t like the team players- and doesn’t change the prefix, but when we don’t change a PlayerlistItem the teams work perfectly,
Am I missing some type of data in the PlayerlistItem that needs to be persistent in terms of the teams to work?
how are you trying to modify the playerlistitem? the playerlistitem contains only UUID, displayname, username, gamemode, and properties(cant remember what these are). the rendering of the Team stuff(prefix, suffix, etc) is done on the client.
managed to figure it out 🙂
out of curiosity, how do you handle other team attributes such as collision or nametags, do you completely ignore them ie not use them?
Using packets for them
managed to achieve this
just regex based tab syncing, i.e skyblock.* will see each other n shi
gotcha, i'm using packets as well, but i was trying to get something like no collision, ie setCollisionRule("never"); working, but havent figured it out
interesting, did you do anything from the backend server or only by pushing the packet from bungee?
you broadcasting the team packet to each user?
yep
even to self?
yep 100%. how did you format the collision json? team.setCollisionRule(ComponentSerializer.toString(TextComponent.fromLegacyText("never")));
thts what i did^
using net.md_5.bungee.protocol.packet.Team right?


