#waterfall-dev

8550 messages · Page 7 of 9

trail plume
#

(The contrib guide from like paper 1.16 might be more fleshed out and useable)

lunar quail
#

Anything I do in the Waterfall-Proxy folder is totally ignored

#

git says its already up to date

trail plume
#

you need to commit in -Proxy

lunar quail
#

I see

#

no main manifest attribute

trail plume
#

running the wrong jar

lunar quail
#

which is the correct one? this one was in ...-proxy/proxy/target

trail plume
#

bootstrap

lunar quail
#

If I add new event, will the PR be accepted? or it this only for small patches

#

btw modified jar working good, thanks

trail plume
#

I mean, "yes"

#

but, I got a hugeass backlog and bungee is generally dead to me right now

wicked lantern
#

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

boreal crown
#

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.

lofty oyster
#

where are the good docs for waterfall

trail plume
#

"the good docs"?

#

I mean

tulip pivotBOT
trail plume
#

and spigots wiki for some stuff

lofty oyster
#

hm

#

im not even sure if im able to use the api

#

with minehut

#

lmao

limber berry
#

can you even run waterfall on MH?

lofty oyster
#

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

boreal crown
#

Very good JD

trail plume
#

Pretty sure that it just stores the name that the client sent in the handshake

boreal crown
#

Kind of interesting how PendingConnection has stuff documented while Protocol doesn't

trail plume
#

The project is lombok'd

boreal crown
trail plume
#

Yea, I er...

#

tbqh, the entire site is in a rework

finite girder
#

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?

trail plume
#

wrote a standalone app which exposes a rest API which does all of the magical state management for stuff

sharp isle
lean gobletBOT
#

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 ¯_(ツ)_/¯

finite girder
#

Atm i've done it with server pings and checking the motds and changing them when events happen

sleek jackal
#

Is PlayerHandshakeEvent or PreLoginEvent called first?

#

i assume handshake

vocal pumice
#

i think so too

hexed rune
#

Can I know why nobody first replies on GitHub issues

And why ServerKickEvent isn't working since 1.19 update?

trail plume
#
  1. my care for going deep into "doesn't work" issues is minimal
#
  1. that event has been shaky for years
#
  1. afaik, 1.19 has literally changed nothing here
hexed rune
hexed rune
trail plume
#

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

hexed rune
#

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

trail plume
#

from a quick skim of the 1.19 update, I can't see any changes which would induce that

hexed rune
#

But why then 1.19 only is having this problem?

trail plume
#

I don't know

hexed rune
#

No, my plugin isn't the issue since was fine before

#

Another thing i saw

#

On bungee is totally broken

trail plume
#

Unless the server changed something here, idk

hexed rune
#

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

trail plume
#

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

hexed rune
#

What do you think then?

trail plume
#

I don't know

hexed rune
#

I analysis in 1.19 bungee commit i see that nothing is changed in that

#

But why now the issue is there?

trail plume
#

I don't know

hexed rune
#

FlameCord (sorry for comparing) seems not affected

trail plume
#

as I said, theres not much to go off here which would imply a much deeper look into it

hexed rune
#

Other proxies such as aegis are just to throw away

trail plume
#

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

hexed rune
#

I just wrote down in console log what event are being fired

#

Even serverdisconnectevent isn't being fired now

#

Only playerdisconnectevent

wide maple
#

uh huh

wide maple
hexed rune
wide maple
#

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

trail plume
#

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

wide maple
#

as for the ServerDisconnectEvent- its never guaranteed to be called in the first place

trail plume
wide maple
#

if the downstream connection dies first then there’s no event loop left to get back to

wide maple
#

but we cant change it without breaking the event even more

hexed rune
#

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

wide maple
#

frankly I dont know how to fix this mess

hexed rune
#

the thing is

#

velocity is still perfectly fine

#

ik it is another proxy

wide maple
#

the event loop works very different on velocity

trail plume
#

as said, I'm not aware of any changes in the 1.19 patch which could affect that

hexed rune
#

i'm searching for the patch that broke it

#

but i can't find anything

wide maple
#

and it works on unmodified bungeecord?

hexed rune
#

nop

trail plume
#

Which is my point, nothing seems to have changed on that front

hexed rune
#

only waterfall has the chance of working

#

on some setups works, some not

wide maple
#

?!? So the issue is not in Waterfall at all

hexed rune
#

it is partially

#

because on some setups won't work, even with stock config

trail plume
#

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

hexed rune
#

that's why i'm asking, bungee created the issue, waterfall partially has it working

trail plume
#

I'd need much more information to find something to work off here and waterfall is really bottom of the barrel for me

hexed rune
#

can i help somehow?

wide maple
#

partially because its being fired in the same place as the serverdisconnectevent

#

and we know that event is broken

hexed rune
#

is something i really need (since people is using my plugin)

#

if i can contribute bisecting or i don't know

wide maple
#

From what I can tell it is broken because the event loop is already gone by the time it would be called

trail plume
#

I'd basically need a means to create a setup whre I can reproduce such an issue within a sane manner

hexed rune
#

sincerely idk why bungee is totally broken but on waterfall partially

trail plume
#

The event should stll afail be fired unless he changed something with that

hexed rune
#

on my setup is called fine

wide maple
#

because Waterfall calls the event too if there has not been a kick packet

trail plume
#

I'd need to go much deeper into the changes

hexed rune
#

but like on a friend one, only playerdisconnectevent is fired

wide maple
#

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

hexed rune
#

but why is this happening

#

that's my question

trail plume
#

Yea, I mean, what is the manner in which the client is being kicked here is the Q

hexed rune
#

nothing changed in those events

wide maple
#

but the client logic changed

hexed rune
#

mojang mojang

#

they introduce only bugs instead of features

#

whatever

wide maple
#

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

hexed rune
#

time to try i guess

trail plume
#

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

hexed rune
#

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

hexed rune
#

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 (?)

wide maple
#

did you /kick yourself to test?

#

the server is not expected to send a kick packet if it crashes ever

boreal crown
#

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

tiny nest
#

Waterfall is an improved version of BungeeCord, right? Could I request a feature what is missing from Bungee, will you implement it?

trail plume
#

depends

#
  1. being frank, dealing with bungeecord has left me heavily burnt out
  2. theres much stuff on my todo list which means that placement of a feature request could vary like crazy
tiny nest
#

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)

trail plume
#

er, yea, that's a pita of one

#
  1. fixing that would involve breaking the API
#
  1. 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)

tiny nest
#

Hm okay, I'll try it, thank you

trail plume
#

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?

boreal crown
#

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?

trail plume
#

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

boreal crown
#

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...

trail plume
#

you'd need to cast it to INet

boreal crown
#

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());
    }
trail plume
#

Yes

boreal crown
#

Okay, good

hexed rune
#

so yeah, i'm confirming an 1.19 issue

#

seems not sending the packet, or at least proxy isn't doing that

wicked lantern
#

Is ignored, like to send the brand

halcyon arch
#

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

tiny nest
#

Anyone has any experience what will happen if I’m trying to remove the fallback server?

trail plume
languid salmon
#

Hellow !
Could someone tell me where these errors come from and how to fix them or hide them from my console?

https://mclo.gs/qooNp9W

trail plume
#

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

languid salmon
#

ups, wrong channel...

wicked lantern
languid salmon
wicked lantern
#

Btw why you have viaversion on proxy?

#

Such as useless, and works bad compared to backend

wicked lantern
languid salmon
#

I find that it looks better when it changes the protocol (my server is 1.18x - 1.19 compatible)

wicked lantern
#

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.

languid salmon
wicked lantern
#

Well, some plugin that blocks versions for bungee, im pretty sure that exists.

languid salmon
#

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:<

wicked lantern
#

I mean, did you make sure your plugins are rigthly supportin 1.19/updated??

languid salmon
#

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

wicked lantern
cedar pawn
#

Are there a demo which could send messages using strings in a language file?

bleak current
#

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)```
wide maple
bleak current
#

I use a firewall

wide maple
trail plume
#

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

languid wagon
#

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

potent birch
#

iirc permission doesnt directly give the full yaml path

trail plume
#

do not use .'s in keys

languid wagon
#

that was the issue ^

somber cedar
#

How do i get player prefix?

wicked lantern
somber cedar
#

Nope, i want to use vault prefix but there is no vault on bungeecord

limber berry
#

I think on bungee/waterfall/velocity you're basically stuck with hooking into permission plugins directly, no nice friendly middleman to make life easy

wicked lantern
#

Plugins like luckperms can make that easier with the API built on.

sturdy flame
#

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?

sturdy flame
#

Thanks!

spark anvil
#

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?)

trail plume
#

generally, use your own channel

#

(make sure to validate that the sender is the server, etc)

spark anvil
#

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?

trail plume
#

Yes

wide maple
#

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

wicked lantern
#

proxy module dependency ig

#

But i don't know why you need initialhandler class

wicked lantern
ionic inlet
#

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 😮‍💨

trail plume
#

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

ionic inlet
#

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.

bleak current
#

Attempting to join forge server via waterfall as proxy

wicked lantern
wicked lantern
wicked lantern
#

Are yo using lastest build of waterfall?

#

oh, i thined by "via" you was meaning it

indigo locust
#

Does Bungeecord have an API way of loading Plugins at Runtime? Or do I need to use reflection

potent lichen
#

What are you trying to accomplish by loading plugins at runtime?

indigo locust
#

Writing a Mocking Library for Bungeecord

bleak current
trail plume
#

generally looks like the server tried to kick the player during an unexpected phase

bleak current
#

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?

trail plume
#

forge 1.13+ is not supported

#

older forge is shaky and depends on the mods, etc

bleak current
#

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?

trail plume
#

correct

wicked lantern
languid wagon
#

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

wicked lantern
#

Chatcolor be like

languid wagon
#

yeah it fixed it by doing chatcolor.translate

#

but now my issue is links aren’t clickable lol

wicked lantern
languid wagon
#

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

wicked lantern
languid wagon
#

i know java

#

i don’t know how i would be able to put click and hover events in a configurable message

wicked lantern
#

Get the string with the ClickEvent, that's all

viscid thunder
bleak current
#

Thanks

lean gobletBOT
#

Lightfall requires a mod though

#

so be aware of that

bleak current
#

It's a requirement even if you don't join a modded server?

#

If so yucky

sleek jackal
#

Is there a PlayerCommandPreprocessEvent (from bukkit) equivelant on waterfall?

#

or, a way to cancel a command

wicked lantern
#

If im not bad, #isCommand exists.

sleek jackal
#

Yep you're right, thanks

wicked lantern
fading wyvern
#

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()

lean gobletBOT
#

the proxy can listen on multiple with multiple listeners so you need to iterate through them

fading wyvern
#

oh, thanks

twilit pewter
#

Whats the difference between Handshake#getProtocolVersion() and Handshake#getRequestedProtocol()?

wicked lantern
twilit pewter
#

That's not really any help, i got that from the method names.

lean gobletBOT
#

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

twilit pewter
#

Ah awesome, thanks

twilit pewter
#

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?

trail plume
#

handshake doesn't have a kick packet

bleak current
#

earliest disconnect with message is in the login stage iirc

lean gobletBOT
#

couldn't you just let them join the proxy like normal but kick them afterwards?

twilit pewter
#

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?

lean gobletBOT
#

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

#

*)

twilit pewter
#

nope, it is right after iirc

lean gobletBOT
#

oof :S

#

kinda odd that a "Pre" event is after login data was already exchanged :S

twilit pewter
#

there is a PR for that but that also sucks

trail plume
#

oh, wait

lean gobletBOT
#

yeah, that implementation isn't good either

trail plume
#

that's... dum...

lean gobletBOT
#

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)

twilit pewter
#

Or, if secure profiles are enabled, just kick clients that don't support it with Outdated & secure profile required

lean gobletBOT
#

I mean... why not just adjust the translation key? xD

twilit pewter
#

or that

#

But I honestly think that my solution is cleaner

#

I'll open a PR to waterfall

glad salmon
#

is there a method to get the default fallback server?

wicked lantern
#

ListenerInfo

#

I don't know if Waterfall deprecated it or smth like that

lean gobletBOT
#

@glad salmon it uses a priorities list now. the first entry will be tried first, the second second etc.

wicked lantern
#

Or is other way to stop competly the proxy?

limber berry
#

don't ping cat

wicked lantern
#

sry, nvm i found better way

hidden helm
#

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?

trail plume
#

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

wide maple
#

Someone remind me to publish my papermc api gradle plugin someday

#

That’s still on my list of things to do

trail plume
#

five!

#

do stuf!

wide maple
hidden helm
# trail plume I mean, those are internals

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?

wicked lantern
#

Yes, updating the plugin

lean gobletBOT
#

why not just use api? 👀

wide maple
hidden helm
hidden helm
#

But just to clarify again, BC has no problems running but waterfall has (both are 1.19).

wicked lantern
#

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.

hidden helm
#

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…

wicked lantern
#

Just change i mean

wicked lantern
hidden helm
#

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.

wicked lantern
#

I mean what problem lol?

#

Im based on waterfall, and waterfall did the same upstream pull

hidden helm
#

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 😎

wicked lantern
#

So you basicly downgraded? xd

hidden helm
wicked lantern
#

Well yes, bungeecord droped back versions support

grave fulcrum
#

what is the minimum java version for waterfall

wicked lantern
grave fulcrum
#

course

#

gotta target all users

wicked lantern
#

cool

unkempt gazelle
#

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()?

sleek jackal
#

.getAdress().getHostString iirc?

unkempt gazelle
#

Deprecated but yh ig

trail plume
#

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

unkempt gazelle
#

What, like (InetSocketAddress) e.getPlayer().getAddress()?

lean gobletBOT
#

yes

#

of course you should check that first

unkempt gazelle
#

I mean, what's the difference between that and just using getAddress() on its own?

#

Both trigger a deprecation warning

#

Imma check they work

trail plume
#

No, use getSocketAddress() and cast, not getAddress()

unkempt gazelle
#

Ooh I see

#

Works perfectly. Thank you!

bleak current
#

My Mojang Cape is not showing on my Server

#

Can you help with what? is it a problem with the server?

verbal turret
#

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?

wicked lantern
wicked lantern
tight pulsar
#

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

trail plume
#

Because bungeecord assumes that the classloader it's running in is the system classloader

tight pulsar
#

ah ok

nova bluff
tight pulsar
#

edit: crap i did setproperty instead of getproperty

wicked lantern
#

nice one

bleak current
#

hi! Can i change player's nickname with using bungee/waterfall api?

#

or reflection

sleek jackal
#

no

#

oh

#

yes

#

you can set the display name, not sure how to change player name

lean gobletBOT
#

pretty sure you can? the api might just not support it though

#

scoreboard api in bungeecord is pretty basic tbh

wide maple
#

The players username is the one thing you must never touch

#

But that’s only partially true

bleak current
#

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?

ashen niche
#

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?

trail plume
#

er, can't super literally call this.getClass()?

ashen niche
#

this does'nt work

trail plume
#

I mean in the super

ashen niche
#

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

trail plume
#

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

ashen niche
#

this is clear

wicked lantern
# trail plume I mean, you can't get that info because that info doesn't exist

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.

lean gobletBOT
#

probably due to compression of chunk data

wide maple
#

^

wicked lantern
#

Thanks, ill take a look

wicked lantern
# wide maple ^

Any ways i disabled compression threshold on spigot and waterfall and nothing changed

lethal summit
#

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

wicked lantern
lethal summit
# wicked lantern 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... 😄

wicked lantern
#

Yeah, is it.

boreal crown
#

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?

civic valve
#

bungee doesn't have any player cache iirc

lean gobletBOT
#

yeah, there is no cache, only online players exist

wicked lantern
#

What's actually the command to finish rebase on VIM?

unkempt gazelle
#

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?

bleak current
#

Can we remove these version posts?

#

I just want to write something different is that possible?

bleak current
unkempt gazelle
#

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?

unkempt gazelle
wary hamlet
#

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?

lean gobletBOT
#

e.g. with ConfigurationProvider.getProvider(YamlConfiguration.class).load(InputStream)

wary hamlet
#

yes but i cant load the custom class. it can not be cast

#

i have this: List<DatabaseEntry> databases = (List<DatabaseEntry>) configuration.getList("databases");

lean gobletBOT
#

you need to parse it

#

don't think bungee has a way to do that automatically

#

(unless registered with SnakeYAML directly I guess)

wary hamlet
#

mmh ok thx

foggy adder
#

What command do i use to build the jar

wide maple
wicked lantern
#

Yeah, if you do again waterfall build it will basicly delete all your changes, take care with that

wide maple
#

If you have an uncommitted patch either rebuild the patches or don’t use the build system

verbal turret
#

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)

lean oyster
#

hey

#

where i can find the waterfall dependency

#

latest

#

on github the repo doesn't work anymore

trail plume
#

The info looks correct

#

just, 1.19 instead of 1.18

lean oyster
#

.g

#

.g waterfall

lean gobletBOT
lean oyster
#

.g help

lean gobletBOT
trail plume
#

stop spamming the bot

#

tf you tryna do

lean oyster
#

i want only the maven repo

lean oyster
#

this reop not work

trail plume
#

"not work"

lean oyster
#

yes

#

my English is not so good

trail plume
#

that gives me literally nothing to go off

#

I can't help with 0 information, hows it not working?

lean oyster
trail plume
#

hit the build button

lean oyster
trail plume
#

try running from the terminal or whatever and providing the full build output

lean oyster
#

i try now to reset maven

#

maybe this can be helpful

#

i have fix it
thanks for the quick help

open saffron
#

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?

trail plume
#

I mean, you need to rewrite packets coming in

#

easy option, "just use via"

#

(in and out)

open saffron
#

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 :

trail plume
#

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

open saffron
wicked lantern
trail plume
#

You'd be better off tryna get flamecord to fix their compatibilies, get via to, or fork via and patch it yourself

wicked lantern
open saffron
wicked lantern
open saffron
trail plume
#

that's on you to figure out

open saffron
#

or I put ViaVersion only on my paper servers

#

a friend who uses FlameCord told me he does it like this

#

thank you anyway ^^'

bleak cosmos
reef sonnet
#

hello someone has the waterfall 1.16?

#

help

shrewd root
slim dawn
#

when update waterfall to 1.19.2?

trail plume
#

Not needed

#

.2 and .1 are the same proto version

slim dawn
#

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?

trail plume
#

Not enough info

#

it kicks them how?

slim dawn
#
<-> 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

slim dawn
trail plume
#

No

#

reproduce without plugins and show full logs

#

running with the flag given there

slim dawn
brazen hamletBOT
slim dawn
#

electroniccat

trail plume
#
  1. with the flag
#
  1. 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

slim dawn
#

wait

trail plume
#

In the error you copied earlier, "launch waterfall with", that goes before -jar

#

but, it's probs what I already said

slim dawn
#

my flags:
java -Xms500M -Xmx3500M --add-opens java.base/java.lang=ALL-UNNAMED -jar server.jar --nogui

#

on bungeecord

wicked lantern
#

what a flags

#

Why always people asks less Xms

lean gobletBOT
#

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

raven frigate
#

I know this is most likely lame question from yall, but how do I check if .getFrom( ) is available in ServerSwitchEvent?

lean gobletBOT
#

what do you mean by "is available"?

verbal turret
#

is there a way to tab-complete bungee-level commands?

trail plume
#

yes?

verbal turret
#

how exactly? I don't see a tab complete method on the Command class

verbal turret
#

so if my command implements that it will be picked up automatically then?

trail plume
#

off the top of my head, yes

verbal turret
#

kk, awesome. that helps a ton

raven frigate
#

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

wicked lantern
#

Why do you think that bungee haves g+command name

#

Just do for your proxy command "g+name" and for spigot keep withot g

raven frigate
raven frigate
#

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?

trail plume
#

ServerKickEvent has the kick message in it?

raven frigate
#

Isn't spigot actually kicking the player?

#

I guess you could keep the connection with proxy..

#

Im just dumb sorry

trail plume
#

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

raven frigate
#

Yeah figured that a few moments ago

raven frigate
#

Kinda forgot what a proxy is apparently

raven frigate
#
    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 );

        }

    }```
raven frigate
#

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

sleek jackal
#

.hasKey?

#

or contains idk

raven frigate
#

ye its containsKey but that is set on join and removed on disconnect, so there is no way the key isnt set

sleek jackal
#

try debugging it

raven frigate
#

will do

#

Hah Im dumb

#

It was ServerDisconnectEvent instead of PlayerDisconnectEvent where I was removing the key from the hashmap

boreal crown
#

Waterfall yells at me for this when I handle the ProxyPingEvent.... Not sure how I could actually improve this.....

wide maple
boreal crown
#

?

fathom thicket
#
[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

wide maple
fathom thicket
#

no, do I disable it?

wide maple
#

yes, also waterfall has to run on a different port from the server if youre doing both instances on the same machine

fathom thicket
#

they aren't on the same machine

wide maple
#

what did you bind the proxy to?

#

127.0.0.1:port ?

fathom thicket
#

nah

wide maple
#

or the external address:port

fathom thicket
#

external address:port

wide maple
#

and you used the ip:port not a hostname?

fathom thicket
#

yea

#

it's the IP, not a domain or a hostname

wide maple
#

are you using a hosting panel?

#

or docker in general

fathom thicket
#

it's a hosting panel

wide maple
#

pterodactyl?

fathom thicket
#

nah

#

private panel, owned by a friend

wide maple
#

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

fathom thicket
#

yea fair enough

wide maple
#

could be either the interface is privileged, doesnt exist, or something else is already running on that port

fathom thicket
#

alright, apparently it's run on pterodactyl

#

my bad lol

echo flax
unkempt gazelle
#

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

trail plume
#

Basically, the logic for sendMessage doesn't do that

#

only way to fix that is to use components

unkempt gazelle
#

So like, make the whole message clickable?

trail plume
#

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

unkempt gazelle
#

Ah right. Thanks

hearty linden
#

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 ?

hearty linden
#

ok, thanks anyway 🙂

somber cedar
#

What is the best api plugin to create inventory guis from proxy?

wicked lantern
#

Bro, that's kinda stupid why you would create an inventory trougth the proxy

somber cedar
#

well punishments gui or smthg like this

unkempt gazelle
#

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

unkempt gazelle
#

(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)

echo flax
#

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

boreal crown
#

Anyone having an idea what exactly is not working here?

sleek jackal
#

outdated dependency?

boreal crown
#

Issue is already solved... kind of.
Was the minimizeJar option deleting classes it thinks aren't used only for Caffeine to require them...

tight falcon
bleak current
#

Feel free to PR :)

bleak current
#

You can't manually edit patches via the webeditor, otherwise the hashes won't be updated, see the contributing guide

wicked lantern
boreal crown
#

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

bleak current
#

Works for me, are you cd'ed into Waterfall-proxy?

boreal crown
#

nope... that isn't really mentioned in the file tho

#

(or not as prominent)

bleak current
#

yeah it could definitely be made a bit clearer

boreal crown
#

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

bleak current
#

yeah, you did it right

boreal crown
#

Also, quickly improved the contributing file a bit... Mainly some formatting fixes

boreal crown
trail plume
#

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

flat arrow
#

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?

trail plume
#

I mean, that would look like a bug

south mantle
#

And the weird thing is that multiple spark profiles are reporting the same thing, so it's not a one-off

unkempt gazelle
# trail plume The structure of the component is what matters

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)); }

wintry ginkgo
#

what event is called when player disconnect from proxy?

#

ServerDisconnectEvent?

winter sky
#

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?

wicked lantern
#

To get the proxy and call BungeeCord

#

any ways, why?

winter sky
#

why what?

wicked lantern
#

why you need to use bungeecord main class

winter sky
#

so I can access the instance and get the PluginManager?

chilly coral
#

The BungeeCord class is not part of the api module

wicked lantern
#

Yep, i sent him a repo that haves the proxy module imself

winter sky
#

so I need to also add the Bungeecord-api?

chilly coral
#

Also you can do getServer() on your plugin instance or somrthing like this, i dont remember

wicked lantern
winter sky
#

then I would need an Instance of the Main Plugin Class

chilly coral
#

Yes

shrewd root
#

or ProxyServer, its the same as the BungeeCord class

chilly coral
#

If you want to use the BungeeCord class just use the bungeecord-proxy artifact instead of bungeecord-api

chilly coral
#

Changing the repo will do absolutely nothing without using another artefact.

winter sky
trail plume
#

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

wicked lantern
#

So you don't huge load the event once ig

boreal crown
surreal jasper
somber cedar
#

Can i cancel switch on ServerSwitchEvent event?

wicked lantern
#

Why would you cancel it

somber cedar
#

well i want to make something like whitelisting system

trail plume
#

is the event cancellable?

somber cedar
#

i've changed to serverconnectevent, and this one is cancelable but if i cancel it still connects me

trail plume
#

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

somber cedar
#

Can i mute listener X took Xms to process event?

wicked lantern
somber cedar
#

cause i got warnings when redis take 50ms to process

wicked lantern
somber cedar
#

how can i fix it when using redis?

wicked lantern
#

Is the plugin oss?

wicked lantern
#

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

trail plume
#

Events generally block stuff, sometimes it's nothing of care, sometimes, it's the entire network pipeline

bleak niche
#

Can adventure-api be used on a waterfall proxy

trail plume
#

using adventure-platform, yes

bleak niche
#

cool ty

hexed rune
#

@trail plume did we find any solution to that serverkickevent issue?

trail plume
#
  1. don't ping
#
  1. I have no idea what you're going on about
wide maple
#

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

wicked lantern
#

oof moment

cloud turtle
#

how's the chat signing protocol for proxies looking?

wicked lantern
#

hacky || ass

hexed rune
sage bronze
#

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?

trail plume
#

dependeicy information is useless

novel pulsar
#

oops

#

i accidently deleted

novel pulsar
trail plume
#

All you provided was a list of the libraries your project uses

novel pulsar
#
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")

}
trail plume
#

yea, that information is useless

#

something called the varint methods with bad data

novel pulsar
trail plume
#

I don't do support by proxy

novel pulsar
#

well I'm dev of his server and he is admin, and I don't have access to console, anyway. I misused word.

hearty linden
#

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

trail plume
#

No, the event still fires but modifications won't apply unless you take over chat handling

gentle burrow
#

BungaCord updated netty and build failed? do they actually test this stuff?

bleak current
#

It failed due to an unrelated networking issue

#

The restarted build ran fine

lean gobletBOT
#

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)

hearty linden
trail plume
#

You can't change the message

#

The only way to do it now is basically to handle chat on the proxy

daring lantern
#

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.

trail plume
#

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

daring lantern
#

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>? ?

trail plume
#

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

daring lantern
#

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

daring lantern
trail plume
#

Basically, I do not know if the component builder is immutable or not

#

or, well, no, now I'm just mentally gone in general

open gate
#

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?

trail plume
#

yes

viscid terrace
#

how to log message in console without plugin prefix?

hazy dagger
#

getProxy().getLogger() ? 🤔

wicked lantern
zenith grotto
#

Can i use \n in a string to get to a new line when i send a message to a player ?

lean gobletBOT
#

I think so?

split osprey
#

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!

trail plume
#

The thing will load the file from the disk assuming its in the place where your proxy is running

split osprey
#

Weird. it didn't seem to do so

#

file named messages.properties correct?

#

Don't need an _en or anything at the end?

trail plume
#

you just copy the file out from the jar and shove it in the cwd of the proxy

split osprey
#

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 ❤️

wicked lantern
cloud matrix
#

Does anyone know how i would automatically copy the jar to a location after building? im using maven + intelliJ

trail plume
#

antrun

#

mvn ... && cp ....

#

symlinks...

cloud matrix
#

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

trail plume
#

Yes

lean gobletBOT
#

tbh that's not really how you are supposed to use maven but ¯_(ツ)_/¯

cloud matrix
#

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

wicked lantern
trail plume
#

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

lean gobletBOT
#

@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

civic stone
#

What would be the best way to get a player by their UUID (who can be offline)?

trail plume
#

Waterfall doesn't have a concept of offline players

civic stone
#

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

trail plume
#

They either just have their own cache, like a database

#

or just have their own logic to lookup against mojangs API

civic stone
#

Ok thanks

wicked lantern
#

You can implement that patch :))

civic stone
#

Thanks 😄

#

Also is it safe to save a Configuration async?

wicked lantern
#

You will save multiple's?

civic stone
#

Just wondering if it can be done inside an async method

trail plume
#

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

wide maple
#

I mean does the network control thread count? Historically some of the stupider events are still called from that context

civic stone
#

Alright thanks 😄

vocal phoenix
#

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?

brittle adder
vocal phoenix
#

I need the packet, so ill do the first way

wicked lantern
vocal phoenix
#

Does it just edit the message to be “ “ or what does bungee do to cancel it?

wicked lantern
#

or as empty

stray igloo
#

how to check client version on waterfall

trail plume
#

I think that the protocol version is exposed on the players connection somewhere

wicked lantern
wicked lantern
#

Also getVersion() method of the initial handler

brittle adder
wicked lantern
#

really hacky!

#

xd

cunning lance
#

Does bungeecord has another channel for plugin messaging? One with "namespace:path" format.

trail plume
#

bungeecord:main

#

but, don't use that in a bukkit/spigot/paper plugin

cunning lance
lethal summit
#

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"));```
trail plume
#

One would guess the the environment you're in hasn't registered the YamlConfiguration provider thing

lethal summit
#

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 😄

trail plume
lethal summit
#

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 😄

noble hatch
cyan garnet
#

oh rip, that's why I didn't find anything haha

wicked lantern
# trail plume

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.

wide maple
wicked lantern
wide maple
#

You remind me

#

There’s something that absolutely does need doing too

#

Sigh

#

This is too ugly to use

wicked lantern
wicked lantern
# wide maple This is too ugly to use

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"

wide maple
wide maple
#

It’s unnecessarily complicated

wicked lantern
wide maple
#

Not a good solution. I’d rather you add a class like Quiet*Exception (trace-less) and filter that in the logger

trail plume
#

part of the seperate exceptions was generally to know what was going on

wicked lantern
#

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.

trail plume
#

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)

wide maple
#

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

wicked lantern
#

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

trail plume
#

upstream generally doesn't care to invest time into resolving that sort of stuff

wicked lantern
#

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

wide maple
#

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

trail plume
#

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

wicked lantern
#

Velocity seems like doesn't have even some bungee exploits

wide maple
#

The issue is also there’s no clear distinction between active and inactive

#

That’s bungees biggest issue

#

Something you can’t exactly change

trail plume
#

Velocity deals with state better, and is smarter about when to stick in the pipeline, and better about data validation, etc

wicked lantern
#

Yes.

wide maple
#

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

wicked lantern
#

aikar ç

wicked lantern
wide maple
#

You’re saturating the thread pool for that

#

Once it’s full then it’s full

wicked lantern
# wide maple Not a good solution. I’d rather you add a class like Quiet*Exception (trace-less...

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;
    }
turbid mural
#

Has waterfall an api for tab completer ? Because Bungee one doesn't work well for me

trail plume
#

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

lusty hare
#

is there any dev version of waterfall?

trail plume
#

no

wicked lantern
fallow vault
#

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?

compact topaz
#

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?

trail plume
#

Yes, the channel exists on waterfall and works the exact same as in bungee

compact topaz
#

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.

trail plume
#

Outside of making sure that you're actually connected through the proxy, no idea

compact topaz
#

wdym by actually connected

trail plume
#

i.e. make sure that you're actually connecting to waterfall and not the backend server

compact topaz
#

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

wide maple
trail plume
#

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

vagrant phoenix
#

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.

lean gobletBOT
#

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

vagrant phoenix
#

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?

lean gobletBOT
#

I would not recommend manipulating it. if you really need to use the api of established plugins like BTLP or GlobalTablist

vagrant phoenix
#

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

wide maple
#

Aka while yes the type is string

#

The data is json chat

#

Good look figuring that out with bungee chat

sour grove
#

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?

vagrant phoenix
vagrant phoenix
#

out of curiosity, how do you handle other team attributes such as collision or nametags, do you completely ignore them ie not use them?

sour grove
#

Using packets for them

#

managed to achieve this

#

just regex based tab syncing, i.e skyblock.* will see each other n shi

vagrant phoenix
#

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

sour grove
#

oh we got ours working?

#

1 clients on 1.18

vagrant phoenix
#

interesting, did you do anything from the backend server or only by pushing the packet from bungee?

sour grove
#

you broadcasting the team packet to each user?

vagrant phoenix
#

yep

sour grove
#

even to self?

vagrant phoenix
#

yep 100%. how did you format the collision json? team.setCollisionRule(ComponentSerializer.toString(TextComponent.fromLegacyText("never")));

#

thts what i did^

sour grove
#

and do you have anything conflicting?
on server side

#

Why you serializing?

trail plume
#

it's a raw string value

#

it's not json?

sour grove
vagrant phoenix
#

using net.md_5.bungee.protocol.packet.Team right?