#waterfall-dev

1 messages · Page 20 of 1

trail plume
#

otherwise, outside of the events, you literally have no info of that without being set in the pipeline

lunar quail
#

So there is no way to detect this solely using a plugin?

trail plume
#

did you try the connection request thing?

lunar quail
#

I am not sure which thingy you mean

trail plume
#

the connection request builder

#

as I said, p. sure it lets you set a callback

lunar quail
#

Yes I have found it, there is a callback but I am not sure how do I use it to connect a player to a server. I normally use ProxiesPlayer.connect

trail plume
#

use the builder to create the connection request

lunar quail
#

I cannot set target on it

trail plume
#

then you just pass that to the connect method or something

#

Yea you can

lunar quail
#

There is only getTarget method

trail plume
#

P. sure it was in the method to create the builder

lunar quail
#

There is only stuff like setTimeout, retry..

trail plume
wicked lantern
lunar quail
#

oh, didn't notice that xd

#

Its usually named like setTarget

#

How do I pass the ServerConnectRequest to the player now?

#

oh, just player.connect(ServerConnectRequest )

#

This callback does not detect when the socket is closed before logged in, result is "SUCCESS" right after the socket is opened, does not care about that the socket was closed right after that before responding with minecraft login packet.

trail plume
#

oh, ouch then

#

idk, bungee never did a good job of exposing that mess

#

(and, I got tired of tweaking smaller things in the API and breaking shit)

#

To fix that, I'd need to add another concurrent connection request system alongside the existing one

lunar quail
#

there is no option for windows?

trail plume
#

git bash

#

that's literally a windows program

lunar quail
#

oh

#

xd

lunar quail
#

How do I edit this thing, everything i do is always restored back to original when i build it

trail plume
#

build with maven directly

#

otherwise, make sure to rebuild patches

#

heavily suggest reading the contrib guide

#

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