#waterfall-dev

1 messages · Page 1 of 1 (latest)

hidden helm
#

I haven’t mentioned that I’m building against archaic versions, understandably always for the latest, it was built for 1637 (1.19 update).

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

#

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?

sour grove
#

mhm

vagrant phoenix
#

really, do i only need json for the suffix and prefix?

sour grove
#

yeah

trail plume
#

yes

sour grove
#

and displayName

trail plume
#

only display stuff is json

sour grove
#

if you use that

vagrant phoenix
sour grove
#

did you not look at client src? xD

#

don't feel too bad, it was 4am yesterday and i rewrote ours completely after 3h of work on it xD

#

literally yeeted it

trail plume
#

I don't recall the server caring about player on player collisions, given that player movement is 100% client sided

sour grove
#

iirc entity cramming is clientside

#

if that was the case why would we have teams? 😄

trail plume
#

cramming is a server thing

vagrant phoenix
sour grove
#

Oh wait yeah crammng is then collisions is client mb

#

collisions is client
cramming is server

#

if in doubt with packets there's always pakkit 😄

trail plume
#

non player <> player - server side

#

player <> player - client side

sour grove
#

be careful with proxy packets though, you're the only synchronization with it

vagrant phoenix
#

i'm basically only doing it on ServerSwitchEvent and PlayerDisconnectEvent

sour grove
#

btw electronic whilst you're here, does velocity not care about team packets?
Looked into that earlier for a personal project and couldn't see anything regarding it

trail plume
#

velocity doesn't handle scoreboards at all atm

sour grove
#

ohh so it's near impossible to do sorting or does it just forward?

trail plume
#

it just forwards the packets from the server, like a proxy

vagrant phoenix
#

How do plugins like BTLP accomplish using multiple format codes on a name in tab? ie. Bold and a color. I can do one or the other with a Team packet, but not both from my attempts.

trail plume
#

prefix/suffix

vagrant phoenix
#

Really? That’s what I assumed at first too, but it didn’t change the name.

trail plume
#

the "name" only supports a singular color, derived from the team

#

So, generally, you just replace that

vagrant phoenix
trail plume
#

Yes

vagrant phoenix
#

gotcha, how do you accomplish removing the actual player name from in between the two?

trail plume
#

afaik, you can set the display name or something

vagrant phoenix
#

aha gotcha. ty for your help

bleak current
#

I want to write a code under this code there is a system I want but I don't know how to do it

#

add a new readString
with a new variable called "key" or something
and done
the client now needs to send the key in the login process
cancel if the key is not correct

#

I saw 2 servers with private clients. You can't login to the server with any version other than your own client.
when i log in they show me a message i think they did it with bungeecord handshake package
I want to do this to my server but I have no information on how to do it bungee sided

lean gobletBOT
#

well just add a new field to read to the packet I assume and disconnect when it's not there?

#

not sure why you wouldn't just do it with plugins though

#

really no need to mod the proxy for that

bleak current
#

I think it would be more logical to do it through proxy because players should not login with any version, if they try to do it, a message should be shown because it will tell to use private client

#

I guess I'll have to find a developer on this but I can't find it

lean gobletBOT
#

pretty sure there is an event which can be used for arbitrary data in the login process

#

otherwise just use the plugin message channel to communicate with your custom client

wide maple
bleak current
wide maple
# bleak current can we talk a little privately

There is no discussion to be had here. Also I strongly recommend you use Velocity since you‘re developing your own plugin.
Velocity has api for login plugin messaging, probably the ideal thing for you to use

#

Both fabric and forge mod loaders have easy integration for login plugin messaging (presync)

#

As for how you‘d do this on Velocity
Take the PreLoginEvent:
https://jd.papermc.io/velocity/3.0.0/com/velocitypowered/api/event/connection/PreLoginEvent.html
Get the connection #getConnection()
Check the ProtocolVersion against what you want
If everything matches
Cast the connection to LoginInPhaseConnection
Send your request for token/whatever
https://jd.papermc.io/velocity/3.0.0/com/velocitypowered/api/proxy/LoginPhaseConnection.html#sendLoginPluginMessage(com.velocitypowered.api.proxy.messages.ChannelIdentifier,byte[],com.velocitypowered.api.proxy.LoginPhaseConnection.MessageConsumer)
Listen to the response in your consumer
then decide to deny or accept the connection

#

None of this is supported on Bungeecord/Waterfall

wicked lantern
#

Velocity-spam moment 🥵

wide maple
wicked lantern
#

I see it as a good thing, but I don't think it's right to promote velocity even if it's from Paper here. This channel is to discuss Waterfall and the plugins made on its base

trail plume
#

Only waterfall """supported""" solution for what they wanna do would be to fork waterfall, or basically to inject into the netty pipeline to hijack that stuff before it gets there

wicked lantern
trail plume
#

Well, yea, but that's not supported even though it's the obvious solution given the limitations of waterfall

wicked lantern
#

Well, this channel is for Waterfall and plugin development i guess. Solutions for this software.

#

Anyways i'm not the one to say which channel is for what, just my opinion.

trail plume
#

I dislike it, but on the nature that there's no supported way to do it it gets a bit weird

wicked lantern
wide maple
# wicked lantern To use some velocity stuff i need to change the license of bungee to velocity on...

strictly speaking you need to have original project attribution, at least license this part under the gpl or any compatible license and disclose your changes for users. Velocity is not under AGPL so if this is just for your own/your direct network use it doesn‘t need to be open-sourced to anyone (see agpl: network use is distribution)

But that all goes flying out the window since Bungeecord itself is all-rights-reserved and not compatible with GPL

I digress, we won‘t get at you if you:

  • Include attribution in the project, like a comment at the top of the file
  • Include the license header at the top of the file or a copy of the license and a list of taken files
    As for it having to be open-source, it can be kept private if you‘re using it strictly privately or as part/developer or network.
    But as general rule of thumb: If you give someone a finished jar you also have to give them access to the source-code
wicked lantern
#

Is oss i meean

#

yes i will add the attribution

wide maple
#

The bungee license itself is a massive headache

wicked lantern
#

yes

#

It's not something I'm going to use anyway, I just wanted to test how fast bungeecord could be with some optimization tuning, always it will be open-source, and never i will provide to someone the binary file.

wicked lantern
wide maple
wicked lantern
#

So i need to put this? @wide maple

#

On the waterfall patch i mean

wicked lantern
wicked lantern
compact topaz
#

hello i am trying to broadcast in specific servers only, how can i achieve that? i am using channels to receive from the spigot server and i want to send a message that has been recieved to specified spigot servers connected to the proxy.

compact topaz
#

ok i fixed by getting all players online and their current server, if it matches mine i just send him else not

wicked lantern
pearl ravine
#

I wonder if it is possible to send message between Velocity and the backend server without online player

trail plume
#

no

#

Not directly

pearl ravine
#

So a socket connection or a dummy player is required?

trail plume
#

use a message broker

#

failing that, sockets, etcs

pearl ravine
dusty spindle
#

Error: https://hastebin.com/ixujexeqed.properties
Does I need to use a other event for checking something like this?

  @EventHandler
    public void onJoin(PostLoginEvent event) {
        if(event.getPlayer().getServer().getInfo().getName().equals("lobby")) {

        }
    } 
trail plume
#

That's the login event

#

i.e. right after their session data has been checked with mojangs API

#

They're not even close to being logged into a server yet

dusty spindle
#

What would be the join event then?

trail plume
#

for having fully connected to a server, search for a Connected event

dusty spindle
#

Okay thank you.

#

Hmm ServerConnectedEvent is also not working

zenith grotto
#

Hi, how can I set the priority of a Listener based on a config value?

trail plume
#

Unless theres API to register an event manually you can't

#

"easy" option is to just have the same listner multiple times with an if check based on the priority

zenith grotto
#

ok, thanks

arctic thunder
#

How can I cancel respawn packets from being sent?

wicked lantern
#

For what?

arctic thunder
#

to prevent the loading world screen from showing when switching servers

wicked lantern
#

I don't think that possible actually, probably you can reset it

winter sky
#

How hard is it, to add a Server to the config programmatically ?

trail plume
#

trivial

winter sky
#

Is there something already implemented or do I need to manually modify the config?

trail plume
#

Theres API for it

#

the proxies Configuration object thing has methods for it iirc

winter sky
#

Do you have maybe a Link or something? I am currently clicking through the Javadocs and I am not finding anything so far

#

This maybe

trail plume
#

Yes, that

winter sky
#

but it doesn't save to the config

trail plume
#

That's a POJO representationof the config

#

if you wanna actually modify the config afaik you'd need to do that yourself

winter sky
#

What would be easier modfiying the actual config.yml or just create a custom config and load the servers on startup. in your opinion

trail plume
#

I mean, ideally you'd just have your own config thing

winter sky
#

Ok thought so too. Another small question, is velocity replacing waterfall? is it worth it switching to velocity rn?

winter sky
#

Is it possible to wait inside the PreLoginEvent but don't let the user log in?

#

aka wait x seconds or until task is complete before continiung

wicked lantern
trail plume
#

it's an AsyncEvent

#

Use the intent system

crystal moth
#

Does doing async tasks on bungee actually help as much as doing it on spigot? Would it prevent the network experience lag spikes from larger tasks?

trail plume
#

well, depends on the contxt of where the event fires

#

You generally don't wanna be doing expensive stuff on the event loop

compact topaz
#

how can i add servers on runtime to my waterfall instance?

next osprey
#

When will waterfall be updated?
or is there documentation somewhere on how the "patch" system works?

bleak current
#

Bungeecord's update is currently broken afaik

next osprey
#

ouh, so we have to wait for their fix

bleak current
#

Could probably fix it ourselves, but waterfall isn't really a priority since paper isn't even updated yet

next osprey
#

alright

oak hinge
bleak current
#

yes

oak hinge
#

Okay, thank you! 😄

oak hinge
bleak current
#

yeah that was the issue

oak hinge
#

Thanks for the clarification!

compact topaz
#

since i am adding stuff but it seems that it doesn't change

bleak current
#

Is there an event like PlayerCommandSendEvent for Velocity?
Or how can I make it so particular players don't see a command registered on the proxy?

#

Oh, there is, PlayerAvailableCommandsEvent

lean gobletBOT
#

I would assume you define your permissions properly

#

best to ask such questions in the velocity channel though

bleak current
#

oh shoot, I just noticed it was the wrong channel, and yes, this is just to hide commands that are available to everyone by default and should be, I just don't want it to be visible because it will clutter the command suggestions list

lean gobletBOT
#

is anyone here messing with registering their own receicing packet listeners in bungee and could link some code? having some issues where my listeners wont fire on 1.19.3 anymore although I'm 100% sure I use the correct packet IDs for that version :S

carmine warren
#

does anyone know how I can go about changing a players skin?

#

all the things i found on google are outdated

wicked lantern
#

There isn't really a skin api

lean gobletBOT
#

changing skin is something that we don't support here as it leads to Mojang EULA violation 👀

wicked lantern
#

It does?

#

I understand the context that most people want to change the skin is for not being premium, but I do not see the problem if you have bought the game and is for something private

lean gobletBOT
#

you can extremely easily do stuff with it which goes beyond just skins which violates the EULA

wicked lantern
wicked lantern
frigid venture
#

Hay I have a problem I have downloaded to my server Waterfall via Git and (git clone URL)
I also ran the command that is on github (./waterfall b) after everything went through I put it on my desktop and now open with intellij everything loads except proxy and throws lots of import errors how can I fix this ?
https://prnt.sc/rpmKJmAi00pU

wicked lantern
#

@frigid venture I guess that somehow the module wasn't implemented properly on the main pom.xml

#

Try to add it

frigid venture
#

ok i try

#

It is already inside the porm.xml

wicked lantern
#

Try to do "mvn clean build"

frigid venture
#

It does not change anything

wicked lantern
#

I guess that try to build it again, clear your cache and that stuff

lean gobletBOT
#

also make sure you don't have some the desktop set to sync with OneDrive. (it is by default) I could imagine that messing with stuff

compact topaz
#

this is my current code for the solution

compact topaz
#

fixed my issue, just placed the redis publish inside the callback.

lean gobletBOT
#

that would breaks lots of stuff that is currently taken as a guarantee so no, it really shouldn't

#

the people that want something like that are also not chaining smart proxies but use a proper proxy like HaProxy

wicked lantern
#

the connection is readable before start decoding -> Could i remove that exception?

        if (!ctx.channel().isActive() || !in.isReadable()) {
            in.release(); //release instead just return
            return;
        }
#

Because this exception would be useless then ->

                if (in.isReadable()) { //Already verifying if is readable
                    // Waterfall start: Additional DoS mitigations
                    if (!DEBUG) {
                        throw DECODE_FAILED;
                    }
                    // Waterfall end
                    throw new FastBadPacketException("Packet " + protocol + ":" + prot.getDirection() + "/" + packetId + " (" + packet.getClass().getSimpleName() + ") larger than expected, extra bytes: " + in.readableBytes()); //NullCordX - Cached exception
                }

It would return before this happens, only would keep it for debug

trail plume
#

Not sure you understand what that code is doing

wicked lantern
trail plume
#

It throws an exception if it's readable, as it shouldn't be readable from there on

#

That buf passed jnto there is a deframed packet, i.e. if the thing is read properly, there should be no more readable bytes left

winged thicket
#
Applying: Add message for outdated clients that don't support secure profiles
  Patches applied cleanly to Waterfall-Proxy
scripts/build.sh: line 6: mvn: command not found
sleek jackal
#

install maven

winged thicket
#

thanks

humble gust
#

md_5 is stupid or smth?

#

He broke my plugin lmfao, cause it expected void setPing(int) and now it's setPing(Integer) lmfao

lean gobletBOT
#

there was some reason for that iirc

#

it's not api so ¯_(ツ)_/¯ really not his problem lmao

humble gust
#

I cannot think of a single reason?

#

The ping cannot be null?

lean gobletBOT
#

a simple recompile fixes this so I really don't see the issue

humble gust
#

It does, just doesn't see a reason why he did that

lean gobletBOT
#

it might have something to do with different versions not having specific fields. and you can't null primitives

#

other packets don't do it that way though so not sure ¯_(ツ)_/¯

trail plume
#

The packet changed, much of the stuff is optional now

lean gobletBOT
#

interersting

#

so you can have players without ping? thonk

trail plume
#

The thkng has an action now

#

So it can say, just change the game mode, rather than sending everything again

lean gobletBOT
#

ah, I see

humble gust
lean gobletBOT
#

update it ;)

unkempt gazelle
#

Can someone help me with using local dependencies with Maven on IntelliJ? Posting here because I'm making a Waterfall plugin. Everything's fine in the IDE and during compilation but I get a java.lang.NoClassDefFoundError: net/buycraft/plugin/BuyCraftAPI. Here's the dependency in the pom.xl:

        <dependency>
            <groupId>net.buycraft.plugin</groupId>
            <artifactId>BuycraftX</artifactId>
            <version>11.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/BuycraftX.jar</systemPath>
        </dependency>
unkempt gazelle
#

I've also tried using the following:

        <repository>
            <id>lib</id>
            <url>file://${project.basedir}/lib</url>
        </repository>
.
.
.
        <dependency>
            <groupId>net.buycraft.plugin</groupId>
            <artifactId>BuycraftX</artifactId>
            <version>11.0</version>
        </dependency>```
wicked lantern
#

This isn't related to waterfall development

sleek jackal
#

do you have buycrsft on your proxy

unkempt gazelle
wicked lantern
unkempt gazelle
#

Thanks, I noticed that. Please refer to my previous answer

unkempt gazelle
sleek jackal
#

they’re making a waterfall plugin i don’t see how this is not the right channel??

#

that’ll fix your issue then

#

need the plugin on proxy

wicked lantern
sleek jackal
#

huh

wicked lantern
#

"yes"¿

sleek jackal
#

i don’t get your point

#

they’re using waterfall, creating a plugin using the waterfall api and have an issue with it

wicked lantern
#

My point is that it seems to me that it is totally out of sight that in this channel, it seems to me correct if someone asks about something of Waterfall specifically, not an external plugin that works with the base of it

sleek jackal
#

no

#

this is also for waterfall plugins

#

as the channel topic says

wicked lantern
#

But isn't a waterfall plugin, is a bungeecord one.

sleek jackal
#

bruh

#

can you read

wicked lantern
#

You're not understanding me

sleek jackal
#

“i’m making a waterfall plugin”

wicked lantern
#

I didn't see any Waterfall thing that isn't already on BUNGEECORD

sleek jackal
#

so they can still use this channel??

wicked lantern
#

I didn't see that reply always when some one asks a bungee or spigot stuff, but how ever sorry.

unkempt gazelle
sleek jackal
#

make sure you downloaded the bungee version of it

unkempt gazelle
#

As far as I can tell, it's all in the same Jar but I can't tell it which version to use since no config has loaded

#

It's throwing [00:51:55 WARN]: Error loading plugin BuycraftX java.lang.NoClassDefFoundError: org/bukkit/plugin/java/JavaPlugin. I'm assuming that's it thinking it's a bukkit server

sleek jackal
#

yes that jar is meant for bukkit

unkempt gazelle
#

Yeah but it has all the bungee stuff in it? I guess I'll try and find out how to make it work

unkempt gazelle
#

Anyway, I don't really get why you need BuycraftX on the server to make it work though. I thought the whole point of the compiling with the jar linked was that the jar file would take all the necessary code from Buycraft and use it so you wouldn't have to have Buycraft on the server (unless fetching a specific instance)

unkempt gazelle
wicked lantern
unkempt gazelle
#

Oh

wicked lantern
#

Try with methods

unkempt gazelle
#

The API that I'm referencing is under the common dir

#

So I figure it should work regardless of platform

#

If that's what you mean

#

Like, this is what it looks like:

import net.md_5.bungee.api.plugin.Plugin;

public final class StoreChecker extends Plugin {

    @Override
    public void onEnable() {
        // Plugin startup logic
        BuyCraftAPI api = BuyCraftAPI.create("*code*");
    }```
wicked lantern
#

I think that it haves modules

lean gobletBOT
bleak rover
#

Is there any way of setting a player's IP address / masking a player's IP

#

I've read every single document and thread on Spigot

wicked lantern
#

Any ways, why?

wicked lantern
#

What's the point of -Dwaterfall.acceptInvalidPackets=true

#

I don't understand why accepting invalid ping packets, it can open up problems with attacks I think.

lean gobletBOT
#

accepting invalid packets might lead to bugs when parsing them

wicked lantern
lean gobletBOT
#

what's the patch?

#

ah I you mentioned the property, found it

#

that patch just adds an option that a ping packet can be received at a time where it shouldn't be. not sure how that would change anything

wicked lantern
lean gobletBOT
#

the option is there if people want to for whatever reason allow those packets

shadow robin
#

hi, i am writing my client, when i try to connect to the server, i get this error "bad packet, are mods in use!? No more bytes reading varint"

torpid agate
#

You messed up some package during the join process of the client

shadow robin
torpid agate
#

Im not into the protocol sry

shadow robin
#

np

lean gobletBOT
#

read the wiki.vg on the login process

lean gobletBOT
#

wrong channel?

idle birch
#

yep sorry 🙂

frigid hazel
#
file = new File(ProxyServer.getInstance().getPluginsFolder() + "/config.yml");``` How could I make it have its own folder? Doing `"/SlashLobby/config.yml"` does not work, so I'm quite confused on this.
frigid hazel
#

Thank you!

gusty swan
#

is there a way to fix this?>

Could not transfer metadata io.github.waterfallmc:waterfall-api:1.19-R0.1-SNAPSHOT/maven-metadata.xml from/to jitpack.io (https://jitpack.io): authentication failed for https://jitpack.io/io/github/waterfallmc/waterfall-api/1.19-R0.1-SNAPSHOT/maven-metadata.xml, status: 401 Unauthorized
shrewd root
gusty swan
lean gobletBOT
#

remove jitpack

gusty swan
wicked lantern
gusty swan
wicked lantern
#

Reload maven

lean gobletBOT
#

is the proxy async scheduler also running async tasks a "tick" later or how does that work there?

#

and this is for waterfall

#

looks like it will actually run instantly

#

also TIL that there is no way to get bck to the thread that you were on originally on bungee

#

there should probably be a utility method for that on paper too instead of creating your own threads 👀

cloud turtle
#

i can't get system print to work, im trying to debug on waterfall

#

it works on bungeecord though, what is the correct way to print debug to the console when using waterfall

cloud turtle
#

i figured it out, was related to print line and buffer

cloud turtle
trail plume
#

what

#

The proxy uses log4j, no matter what you do, your output goes through l4j

#

Your general headache is going to be that the loggers are not setup to print debug level sstuff

#

you can dynamically adjust the levels programatically, but for most people, they just tend to print stuff manually

#

(System.out should work fine, but, that is intercepted by the logger stuff, and there is weird cases where you can trip l4j up with that to my understanding)

wicked lantern
lean gobletBOT
#

debug shouldn't be printed to the console anyways

#

runs

wicked lantern
wicked lantern
lean gobletBOT
#

;_;

unborn gust
#

can I run waterfall plugins on standard BungeeCord?

shrewd root
#

but why running it on bungeecord? ig waterfall would be a better option

subtle radish
#

if a plugin is "made for waterfall" that usually means it uses something waterfall provides that bungee does not

#

its no different to how spigot plugins will run on paper, but paper plugins will not run on spigot

wicked lantern
shrewd root
#

yeah meant it with that

wicked lantern
bleak current
#

how do I define getDataFolder? where do I import it from?

shrewd root
bleak current
shrewd root
#

then you have to create an instance of your main class

#

singleton or constructor, anything you like

unborn gust
#

how can I sort TabList?

trail plume
#

scoreboard entries are sorted by the team name

unborn gust
#

oh frick
wrong channel

unborn gust
trail plume
#

using the team names

#

the team name doesn't need to line up with your role names

unborn gust
#

ooh dumb me 😄

#

didn't realize it

earnest otter
#

We're trying to synchronize multiple servers regarding their inventory of chests for example.
I heard, that waterfall has a way to let servers communicate with each other.
Sadly I can hardly find documentations about waterfall or bungeecord.
Is waterfall the correct software to communicate between servers?

lean gobletBOT
#

no, waterfall is a proxy that goes in front of your server so your players can switch without reconnecting

#

it has some communication abilities (via plugin messages) but those come with their normal limitation (that they requier a player to be connected to the source and target servers)

earnest otter
#

thanks

wicked lantern
#

I think he's searching for a messager like Redis

zenith grotto
#

Hi, I get this error every time i send a scoreboard objective packet to a player. Ideas? Thanks

// API Version: 1.19-R0.1
// Client Version: 1.19.2  

String sbName = plugin.getScoreboardManager().generateSbName(staffer); //Generates a random name for the obj
String sbValue = ChatColor.translateAlternateColorCodes('&', Config.SCOREBOARD_STAFF_TITLE.getString());
ScoreboardObjective sbObj = new ScoreboardObjective(sbName, sbValue, ScoreboardObjective.HealthDisplay.INTEGER,(byte) 0);
player.unsafe().sendPacket(sbObj);
lean gobletBOT
#

are you sure you are using the correct packet?

#

also pretty sure the display name of an object needs to be a json component

wide maple
#

either shade/use kyori adventure or figure out how to convert that with bungeecord-text

zenith grotto
subtle radish
#

json keys are strings

hexed rune
#

Hi guys, i need this dependency (not necessarily this specific version) for my plugin, it's available from bungee but I can't find it on waterfall.

    <dependency>
        <groupId>net.md-5</groupId>
        <artifactId>bungeecord-proxy</artifactId>
        <version>1.8-SNAPSHOT</version>
    </dependency>

i was only able to find those:

https://nekobin.com/yisateleva

lean gobletBOT
#

just replace it with the waterfall values

#

of course you need to manually build waterfall/deploy it to a repo to find the internal classes

#

that's not in the official bungeecord repo either

hexed rune
#

found it

lean gobletBOT
#

pretty sure threading in bungeecord is a mess so ¯_(ツ)_/¯ ? xD

zenith grotto
#

What's the best way to update the score name in a scoreboard? I need to update a timer but I dont want to create every second a new scoreboard objective with a different name.

lean gobletBOT
#

Objectives have a display name

#

you can just change that

zenith grotto
#

I want to change the "display name" of a score

lean gobletBOT
#

a "Score" doesn't have a display name

zenith grotto
#

i mean the ScoreboardScore#setItemName

lean gobletBOT
#

a Score is an entry of a player/entity with a value for a specific Objective

#

what is your actual goal here?

#

also ScoreboardScore is not a class that exists in waterfall as far as I can tell?

#

also it looks like the item name is just the name of the entity/player that is displayed e.g. when showing it in the sidebar

#

so just remove the old score and add a new one with a new name, don't think you can actually modify that as the client will probably not accept it

#

one of the many reasons people tend to use team prefixes/suffixes instead of the actual score as they are more easily modifyable

#

*actual score entry name

zenith grotto
# lean goblet also `ScoreboardScore` is not a class that exists in waterfall as far as I can t...

net.md_5.bungee.protocol.packet.ScoreboardScore
net.md_5.bungee.protocol.packet.ScoreboardDisplay
net.md_5.bungee.protocol.packet.ScoreboardObjective

My bad, i'll try to explain myself better. I have scoreboard that looks like this:

ScoreBoardTitle

Name: Ender
Cooldown: %time%s

That time placeholder needs to be updated every second. To reach this goal what i did is basically send every second a new scoreboard objective packet with all the new scores. Probably this isn't the best method so my goal now is to only update the score containing the %time% placeholder. How can I do that?

lean gobletBOT
#

oh, that's not api...

#

no idea how you do that with packets, sorry, never bothered to look into that as there's APIs for that ¯_(ツ)_/¯

zenith grotto
#

I actually don't know, do you suggest to use the api instead of the packets ? the spigotmc wiki says "they aren't ready to use yet"

lean gobletBOT
#

it's usually suggested to do this kind of stuff on the minecraft server itself

fair flame
#

Does anyone now why this code not work?
package zytexpluginwaterfall.zytexpluginwaterfall.hub;

import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Command;
import zytexpluginwaterfall.zytexpluginwaterfall.ZytexPluginWaterfall;

public class hub extends Command {

public hub() {
    super("Hub");
}

@Override
public void execute(CommandSender sender, String[] args) {
    if ((sender instanceof ProxiedPlayer)) {
        ProxiedPlayer p = (ProxiedPlayer)sender;
        p.sendMessage(new ComponentBuilder("Ansluter till Hub!").color(ChatColor.RED).create());
        p.connect(ProxyServer.getInstance().getServerInfo("hub"));


    }
}

public static class Hub extends Command {
    public Hub(ZytexPluginWaterfall zytexPluginWaterfall) {
        super("Hub");
    }

    @Override
    public void execute(CommandSender sender, String[] args) {

    }
}

}

sleek jackal
#

remove the 2nd class

fair flame
# sleek jackal remove the 2nd class

Any of this? import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Command;
import zytexpluginwaterfall.zytexpluginwaterfall.ZytexPluginWaterfall;

sleek jackal
#

keep that

#

just the public static class Hub… stuff

fair flame
wide maple
#

you have two namespace conflicts with the names too

#

Also side-note: never use lower-case starting names for classes

fair flame
# wide maple You’re redefining your class in your class

package zytexpluginwaterfall.zytexpluginwaterfall.hub;

import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Command;

public class hub extends Command {

public hub() {
    super("Hub");
}

@Override
public void execute(CommandSender sender, String[] args) {
    if ((sender instanceof ProxiedPlayer)) {
        ProxiedPlayer p = (ProxiedPlayer)sender;
        p.sendMessage(new ComponentBuilder("Ansluter till Hub!").color(ChatColor.RED).create());
        p.connect(ProxyServer.getInstance().getServerInfo("hub"));


    }
}


    @Override
    public void execute(CommandSender sender, String[] args) {

    }
}

}
Where is the thing wrong? Can't find it

wide maple
#

…. you literally have the same method twice

#

the execute method