#waterfall-dev

1 messages · Page 3 of 1

boreal crown
#

thanks

languid parrot
#

i want to like make a fork of it of it's code but edited you know that's called fork

#

like adding things in the original waterfall

lean gobletBOT
#

well either fork it like normal or look at how Travertine did it

boreal crown
#

Does the proxy modify the player (connection) in any way?
I try to figure out the cause of an error in DecentHolograms and so far the only common thing I could find from all the reports is, that the servers run under a BungeeCord/Waterfall proxy.

The error in question: https://paste.helpch.at/zikamujade.swift
The first line of the plugin the stacktrace mentions: https://github.com/DecentSoftware-eu/DecentHolograms/blob/main/src/main/java/eu/decentsoftware/holograms/api/nms/PacketListener.java#L33

lean gobletBOT
#

that error cannot be caused by a proxy

#

that sounds more like a case where the plugin is simply not compatible with the server version

#

(as far as I can tell it should work though, I use similar code even behind a proxy without issues)

#

is this happening on every join? because I think if the player leaves before it was fully joined (which could happen more often on a proxy) then maybe that could cause the the handler to be missing?

cosmic burrow
#
            public void execute(CommandSender commandSender, String[] strings) {
                getLogger().info("Command Executed!");
                ByteArrayDataOutput out = ByteStreams.newDataOutput();
                out.writeUTF( "pumpkincore:main" );
                out.writeUTF( "Hello World" );

                ProxiedPlayer p = (ProxiedPlayer) commandSender;

                p.sendData("pumpkincore:main", out.toByteArray());
            }```
is this right how to send plugin message in waterfall?
#

it not sending anything in my paper server...

#

i have register the channel in waterfall plugin

    public void onEnable() {
        instance = this;

        getProxy().registerChannel("pumpkincore:main");```
#

then register this in paper plugin

    public void onEnable() {
        // Some Condition
        if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
            this.getLogger().info("We need Vault!");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        this.getServer().getMessenger().registerOutgoingPluginChannel(this, "pumpkincore:main");
this.getServer().getMessenger().registerIncomingPluginChannel(this, "pumpkincore:main", new PrivateMessage());
#

and this my PluginMessageListener in paper plugin

public class PrivateMessage implements PluginMessageListener {
    @Override
    public void onPluginMessageReceived(@NotNull String channel, @NotNull Player player, @NotNull byte[] messages) {
        System.out.print(channel);
        Pumpkincore.getInstance().getLogger().info("DEBUG: "+channel);
        if (!channel.equalsIgnoreCase("pumpkincore:main")) {
            return;
        }

        ByteArrayDataInput in = ByteStreams.newDataInput(messages);
        String subchannel = in.readUTF();

        String senderName = in.readUTF();
        String ggwp = in.readUTF();

        player.sendMessage(Component.text("You received a private message from: " + senderName + ", "+ggwp));
    }
}
#

there no output from


        System.out.print(channel);
        Pumpkincore.getInstance().getLogger().info("DEBUG: "+channel);```
cosmic burrow
#

still need help

trail plume
craggy oasis
#

What is the linux command to update the waterfall.jar to the latest version?

sleek jackal
#

rm waterfall.jar
wget newwaterfall.jar
java -jar newaterfal.jar

#

get the url from the website

craggy oasis
#

wget https://api.papermc.io/v2/projects/waterfall/versions/1.20 That's what I figured out so far

#

I don't really know where I can find the URL on the website

trail plume
#

you would need to parse the API responses

daring shardBOT
trail plume
#

or if you're doing it manually just right click the download button and copy the link

craggy oasis
#

How would I find what the correct API calls are to update the waterfall.jar through a .sh file?

cosmic burrow
#

if I send data from waterfall plugin

#

it will send to all server?

#

i want to make global player chat

#

so i have 2 server

#

1 paper plugin and 1 waterfall plugin

#

so i send data

event.getPlayer().sendPluginMessage(getInstance(), "pumpkincore:main", out.toByteArray());```
from paper plugin with AsyncChatEvent
#

after that waterfall plugin will send it back to all servers

#

like this

        if (!event.getTag().equalsIgnoreCase("pumpkincore:main")) {
            return;
        }

        ProxiedPlayer sender = (ProxiedPlayer) event.getReceiver();

        for (Map.Entry<String, ServerInfo> entry : ProxyServer.getInstance().getServersCopy().entrySet()) {
            String serverName = entry.getKey();
            ServerInfo serverInfo = entry.getValue();

            ProxyServer.getInstance().getLogger().info("ServerName: "+serverName);

            serverInfo.sendData("pumpkincore:main", event.getData());
        }```
#

it was successfully sent to waterfall and then returned to the paper plugin but only 1 origin server could receive it

trail plume
#

plugin messaging requires hijacking a players connection

#

if you only have 1 server with players on it, then only it will be able to send/recieve such messages

cosmic burrow
#

2 server paper with 1 same plugin

trail plume
#

so, you have 2 servers and 2 players connected through the proxy, each to different servers?

cosmic burrow
#

yes

trail plume
#

then it should work

cosmic burrow
#

not work

#

I don't know how to explain it so it can be understood

trail plume
#

You would need o check your listener setup on the backend

#

I don't really see how that could fail if you acually have 2 servers with players on logged in, they should both get the message

cosmic burrow
#

this my listeners

    public void onPlayerChat(AsyncChatEvent event) {
        event.setCancelled(true);

        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeUTF("PublicChat");
        out.writeUTF(event.getPlayer().getName());
        out.writeUTF(JSONComponentSerializer.json().serialize(event.message()));

        event.getPlayer().sendPluginMessage(getInstance(), "pumpkincore:main", out.toByteArray());
    }

    @Override
    public void onPluginMessageReceived(@NotNull String channel, @NotNull Player sender, @NotNull byte[] messages) {
        if (!channel.equalsIgnoreCase("pumpkincore:main")) {
            return;
        }

        ByteArrayDataInput in = ByteStreams.newDataInput(messages);
        String subchannel = in.readUTF();
        if (subchannel.equals("PublicChat")) {
            Player fromPlayer = Bukkit.getPlayer(in.readUTF());
            Component message = JSONComponentSerializer.json().deserialize(in.readUTF());

            Component chatRenderer = chatRenderer(fromPlayer, message);

            Bukkit.getOnlinePlayers().forEach(player -> player.sendMessage(chatRenderer));
        }
    }```
trail plume
#

I mean, that is never going to work as intended

#

fromPlayer will always be null on other servers

#

check logs, but, you probably wanna try printing out what is being recieved in that handle, but, idk

#

on he surface idk how the other server wouldn't get anything, I'd just expect whatever your chatRenerer method does to blow up, but MahiruShrug

cosmic burrow
trail plume
#

idk your logib, but, yea, you'd nee to always have an offline player, also noting that you probably want to send the UUID, not the name, or figure out a better way to handle that so that you're not causing lookups

craggy oasis
#

Is it possible to use waterfall to 'send' players to a Fabric server amidts other servers?

craggy oasis
#

I guess not haha

craggy oasis
#

Bump?

austere nova
#

I would recommend using Velocity, the bungeecord environment has almost no support for mods environments

craggy oasis
#

how similar are waterfall and velocity

#

Got a lot of my network going on waterfall

trail plume
#

same concept, different APIs, etc

craggy oasis
#

Anything else to note regarding the two?

trail plume
#

I mean, with a question as open as that, no

craggy oasis
#

Haha i meant like

#

Roughly positive/negative things to note about the two? Or when switching from Waterfall to Velocity

#

Also how much work would switching be? The thing I am mostly worried about is the whole message channel thingy that bungeecord has that I would need to rewrite and figure out again

trail plume
#

I mean, it's an entirely new stack which is still in development vs a piece of software which basically hasn't been developed in 10 years

#

it doesn't cater to java 6

#

how much that impacts you is going to depend on what you're doing

craggy oasis
#

Ah is waterfall outdated

trail plume
#

waterfall is currently EOL

craggy oasis
#

Oh?

trail plume
#

I had some setbacks on working on stuff due to health issues, but, I'm especially done with waterfall because theres little you can do without causing issues for plugins in order to actually try to improve it in any meaningful manner

#

after my last project resulted in weeks of constant changes in order to appease plugins, never again

craggy oasis
#

I see that on the website it says that Velocity is much faster

#

In what ways is it much faster?

trail plume
#

It's built from th ground up from our years of knowledge on netty and around how it works

craggy oasis
#

Does Velocity not support Fabric 1.20.4

trail plume
#

proxies and mods generally do not work together well

#

velocity has some extra support for stuff which can help, but, overall, YMMV, and you are somewhat on your own

#

wheeen .5 comes, theres some stuff I can work on to maybe improve compatability, but, it does require some help from 3rd parties to support fully potentially

#

(annnd last time we tried reaching out re modding stuff, nobody replied bar our existing discussion with forge, soooooo)

austere nova
wooden path
#

Is there a way to add more channels to the list of registered channels that gets sent to a player when they join the proxy?

ProxyServer.registerChannel doesn't appear to affect the channel list that is sent to the client.

trail plume
#

you'd need to handle that yourself

thick sedge
#

where i can find waterfall-proxy for maven?

trail plume
#

We don't publish that, you'd need to publish it yourself or find a public maven repo that does

topaz vergeBOT
#

(65f9bd9b2d5bd6481a0648ce) // @sacred coral (@thinker369 / 933208620550737930) has been banned by @trail plume (126975485493248000)
Reason: Quick-banned for sending a message in #waterfall-dev

cosmic burrow
#

how to disable waterfall command tab?

lean gobletBOT
#

don't grant the permission afaik

cosmic burrow
#

set to false?

#

my player don't have permission

lean gobletBOT
#

if the commands are granted by default you would need to set them to false, yes

lean gobletBOT
#

yes

cosmic burrow
#

but i still can access it

#

is there any Event API like PlayerCommandSendEvent in bungeecord or waterfall?

lean gobletBOT
#

pretty sure the ChatEvent catches that

#

Are you sure /skin is a command from the proxy?

cosmic burrow
lean gobletBOT
#

also not sure anymore if this is actually done automatically on the proxy, there might be a requirement to manually filter it out with the ProxyDefineCommandsEvent

#

ah, wait, I thought you meant the pre command event. Yeah the ProxyDefineCommandsEvent is the equivalent to that

cosmic burrow
#

ok thats work

#

is waterfall still keep send PluginMessage after there any player join?

vestal cedar
#

What? Do you mean if it will send a plugin message after no player is online?

lavish parcel
#

Hey, is there any timeout implemented on ServerInfo#ping?

honest coral
#

does a waterfall plugin work on bungeecord?

#

oh they probably wont

spiral mountain
#

Last tf

visual hinge
#

No, me last

chilly token
#

no, me

austere nova
#

Si.

steady pagoda
indigo basin
#

goodbye waterfall.

vale ibex
#

Last

torpid rampart
#

nope, you are not the last.

#

Also goodbye waterfall.

vale ibex
#

Dang it

steady pagoda
#

👋

torpid agate
#

Rest in Peace

peak geode
#

why?

#

is this part of "end of life"?

trail plume
#

you tried to connect waterfall to a server in online mode

peak geode
#

oh

chilly oracle
#

hi, I'm looking for a plugin that when my server crashes redirects me to the limbo server and when it comes back online it redirects the players back to the primary server, do you have any advice? if so, ping me

sleek jackal
bleak current
#

someone know how fix this?

trail plume
#

don't crosspost.

bleak current
#

ok?

atomic ridge
#

I added a waterfall to my server and everything worked during temporary testing when I ran waterfall using screen as root. However, when I dockerized waterfall, I'm getting this error.

#

My problem probably lies either in the startup, the Dockerfile, or the Docker Compose file.

#

waterfall config.yml:

#

docker-compose:

#

and dockerfile:

trail plume
#

Because containers are isolated, their local host is their own

#

You’d need to communicate over the docket interface, see their guides for recs, etc

plucky lava
#

Trying to debug/sort out an issue but just trying to learn more about how bungee/waterfall work:
What is the upstream bridge?

#

is upstream the client or the server

trail plume
clear plume
#

If I want to use a plugin channel, is it safe to use "BungeeCord", or is it equally safe to use "custom:channel"?

#

proxy.registerChannel("custom:channel")

trail plume
#

Use your own channel, don’t try to hijack somebody else’s

clear plume
#

But I listen to PluginMessageEvent and I can receive messages like this:

#

minecraft:brand -> [B@4c8d14c2

trail plume
#

yes, and?

clear plume
#

I'm worried about whether the custom channel can be controlled by the client sending plug-in messages?

trail plume
#

You just validate the sender

#

if the sender is not whatever bungee represents is a server connection, then ignore it

clear plume
#

Do this? :
val a: Connection = event.sender if (proxy.servers != a) { return }

trail plume
#

wat

#

check the sender in the event

#

see if it's an instance of whatever bungee considers a server connection

clear plume
#

Do this? :
val a = event.sender as? ServerInfo ?: return if (!(proxy.servers.values.contains(a))) { return }

trail plume
clear plume
#

Thanks

#

val a = event.sender as? Server ?:return if (!proxy.servers.values.contains(a.info)) return

trail plume
#

There is 0 reason to check that it's registered

clear plume
#

So if it is sent by the client, then event.sender will be ProxiedPlayer, and if it is sent by the server, will it be Server?

trail plume
#

yes

clear plume
#

Thanks

primal root
#

Hi there,
I am having an issue with development of my bungee plugin where it says the following, Cannot invoke "java.util.List.isEmpty()" because the return value of "net.md_5.bungee.api.plugin.PluginDescription.getLibraries()" is null
But I haven’t set the field not was it an issue before the 1.20.5/6 update

trail plume
#

spigot doesn't use nullability annotations in bungee properly

#

and so, if it's null now, it's null now

#

the thing is just loaded using snake, so, some level of "good luck" there

upbeat plaza
#

can someone
make a minecraft plugin which creates a custom encahnt for 1.20.1 and the enchant is called-

Shoot 3 + 1 arrow per level at the charge you shot at

sleek jackal
#

wrong channel, also not the place for that

vernal plover
placid crescent
#

💩

grizzled thistle
#

woa

frigid kelp
#

how can I block tab completion on 1.12 and 1.13 with waterfall?

lofty ridge
#

please don't, blocking tab completion is annoying as fuck to users :/

weary grove
#

I'm going to PR something to Waterfall, specifically tuning one Netty setting to hopefully bring down memory usage which can help with shared hosting and Docker

#

I've had it in Velocity for a while and it works fine

frigid kelp
#

@lofty ridge i'm just catering to my user base, they want it so they can't have their commands seen

#

l33t script kiddies gonna see they have bungeetablistplus or something

#

but i agree it's annoying

trail plume
#

I literally just added an event in waterfall for that last night for 1.13

frigid kelp
#

owo

remote condor
#

@trail plume out of curiousity, are the Varint21FrameDecoder and prepender just making sure the packet length is written to every packet, and that every packets length is less than or equal to the remaining buffer size?

trail plume
#

Yup

remote condor
#

tyvm

frigid kelp
#

@trail plume what do I need to provide for event.getCommands().remove()?

trail plume
#

The name of the command is the key

frigid kelp
#

thanks ❤

#

huh, when I try to send data over the WDL|CONTROL channel, i get this error

mental dagger
#

@frigid kelp plugin messaging channel ?

frigid kelp
#

yes, the plugin messaging channel is WDL|CONTROL

#

player.sendData("WDL|CONTROL", packet);

mental dagger
#

i am a plugin messaging channel pro as i am able to open books from it 😄

frigid kelp
#

doesn't help, it seems that the error is related to the channel having | in its name

mental dagger
#

there says literally everything about registering the channel ... @frigid kelp read

frigid kelp
#

The channel should be lowercase and should contain ":". i don't have the priviledge of doing that though

#

and from the wording, it would seem that this is a recommendation, rather than a requirement

#

while i hadn't registered the channels, registering them did literally nothing to help

#

@trail plume sorry for bothering, but do you have any idea why this might be? 👀

mental dagger
#

@frigid kelp it is a requirement

#

else it will throw IllegalArgumentException

#

i tested it before with doing AnnouncementsEverywhere for my plugin, but then it throw an exception that the channel should contain : and should be lowercase

main plume
#

1.13 uses an identifier format for plugin channels

#

i think it is ([0-9a-z_-]*:)?[0-9a-z_/.-]*

#

https://wiki.vg/Plugin_channels/World_downloader Regarding channel names: 1.13 has necessitated namespacing the channels, i.e. wdl:init, wdl:control, wdl:request instead of WDL|INIT, WDL|CONTROL, WDL|REQUEST. Support for both channel names has been backported to 1.12, and it will automatically select whichever channels are supported. If targetting older MC versions, make sure to listen and respond on both sets of channels.

frigid kelp
#

@main plume so I can just use wdl:control and 1.12 will pick it up?

main plume
#

Probably if the client is updated

#

Or just check if the player is 1.13+ and send the identifier format

frigid kelp
#

i'm just checking if the protocol version is <= 1.12 now, thanks 😛

ornate bloom
#

@trail plume Are Javadocs currently being generated as part of the build process for WF?

marble flint
ornate bloom
#

If so, which command? mvn javadoc:aggregate ?

frigid kelp
#

CRITICAL ISSUE

#

lmao

lofty ridge
#

already fixed @marble flint

marble flint
#

Thanks 😄 - didn't want to create a pr^^

lofty ridge
#

@ornate bloom javadoc:jar

ornate bloom
#

There aren't any hosted javadocs?

#

via web

#

Or does that also generate those, too

lofty ridge
#

not for waterfall currently

ornate bloom
#

I'm trying to get javadocs generating from the delombok'd source. Got it mostly working

trail plume
#

I actually jammed something together

ornate bloom
#

Using sourceDirectory like that will change your IDE's source dir, won't it?

#

Was trying to avoid that.

#

I was using sourcepath in the maven-javadoc-plugin

trail plume
#

That's why it's basically set at the top and then inside the configuration for delombok

#

It appears to be working fine, IDE seems to be happy with it

ornate bloom
#

Oh, was expecting IDE to complain about duplicate classes.

trail plume
#

Ah, shit, it does that now

#

Okay, so, never compile the javadocs, ez fix

ornate bloom
lofty ridge
#

yet another reason to hate lombok, too

#

:p

#

also, remember that you can use maven profiles

trail plume
#

Yea, I totally remembered that

#

👼

lofty ridge
#

:p

ornate bloom
#

When I run javadoc:aggregate, it fails because of missing @return's, even though it has -Xdoclint:none

lofty ridge
#

you have it wrong

#

you want

      <configuration>
        <additionalparam>-Xdoclint:none</additionalparam>
      </configuration>
#

(outside of executions)

ornate bloom
#

Nah, that's wrong for the version of javadoc I'm using

lofty ridge
#

o.O

ornate bloom
#

The version of the plugin Waterfall uses is not properly compatible with Windows

#

So I'm using 3.x

#

Not properly compatible on Windows when using a modern version of Maven, I mean.

lofty ridge
#
<configuration>
  <doclint>none</doclint>
</configuration>
#

?

ornate bloom
#

Looks like that's a valid option according to docs, will try that

trail plume
#

I just fixed a nice issue I had by linking bin/javadoc -> jre/bin/javadoc on my mac, javadocs plugin was nooot happy

ornate bloom
trail plume
#

Those need to be fixed anyways, hm

ornate bloom
#

wait wtf

#

is the 2.10.3 in there the maven-javadoc-plugin version?

#

I have <version>3.1.0</version> configured >_>

trail plume
#

current version is 3.1.0

ornate bloom
#

Yeah, and that's what it says in the pom, since I changed it to that. But the output there suggests it isn't using what I've configured?

#

In which case, kashike's old doclint additionalparams method might work...?

trail plume
#

Tried running mvn in the api folder?

#

Oh, it's done in Waterfall-Proxy, I thought it was API

ornate bloom
#

I was actually running it from Super, running in Waterfall-Proxy produces the same result, though. Except this time it's actually using the right javadoc plugin version 😛

#

There's a failOnError option, which also... doesn't work lol

#

So javadoc is exiting with 1, maybe the options aren't getting passed in correctly

#

Oh, look at the paths, they aren't the path to the delombok'd sources.

#

So none of my configuration is working

#

oh my god, I think it worked

#

gonna do a clean build and try again

#

no, it simply generated from the normal sources, and now I'm getting duplicate class errors in IJ, too lol

#

what a pain

#

Maybe we can just delete the delombok'd stuff automatically as part of the javadoc generation

trail plume
#

Yours might actually work in a profile fine

ornate bloom
#

Hm, yeah it might.

#

Gonna read up on profiles real quick

#

Oh, looks like IntelliJ by default automatically detects generated sources, so maybe we can break that detection.

#

Duplicate class issue aside, using a separate profile, seems javadoc:javadoc works. Just need to get it all aggregated.

#

javadoc:aggregate doesn't work for some odd reason 😛

#

LOL, found something where someone is using maven-antrun-plugin to generate the aggregated javadocs from the generated sources.

ornate bloom
#

Kinda ugly, but works.

#

Only one issue, it shows @NonNull annotations twice in the docs

trail plume
#

if IDEs can work with that, it's annoying, but it's more useful than bungees

ornate bloom
#

Maybe using a new maven-javadoc-plugin would fix it, or maybe there's a configuration to deduplicate.

#

Will check some more, but it's progress.

#

Hm, I don't think I even need to use the aggregate goal there since I'm explicitly specifying each source path. Let's see...

#

Nice, yup. Didn't need to use the aggregate goal. The whole reason I'm specifying each path is because the normal aggregate behavior doesn't even work for me lol.

ornate bloom
#

@trail plume I can PR this, but do we want to aggregate everything? I think Bungee's aggregated docs only has the API dependencies.

trail plume
#

We only really care about the API, especially given that lombok would be kicking us across the board otherwise

ornate bloom
#

Cool, only thing that sucks is we gotta specify each source path explicitly, but whatever.

#

Also if people want the javadocs for the non-API stuff, the jars are still there.

#

Man, I was really overcomplicating this, I thought there was more than just the one artifact that needed to be documented, and went down the whole aggregation rabbit hole lol.

#

When in reality it's just the one API artifact lol

#

Feel like an idiot, but whatever >_>

#

@trail plume Alright, good to go. I went down an unnecessary rabbit hole with aggregation when it was totally unnecessary lol.

#

If we ever want to generate docs for more than just the API artifact, at least I know how to do it now.

#

I actually have another small POM change that probably should be made, but it's a separate issue, can do it after that one gets accepted.

trail plume
#

Just trying it, and at least the javadoc site isn't working

bleak current
#

wait where can i access waterfall jd?

trail plume
#

They're not currently published, that's what I need to look into the PR for

bleak current
#

then what was the method to set config backend?

#

i don't have ide around

#

basically i want to make a pr which lets me to set waterfall's config

#

because currently it's hardcoded to use waterfall.yml

#

i'm thinking about 3 possible ways:

  1. use the backend/provider what you can set via bungee api and prefix keys with waterfall_ (that's what i'm doing)
  2. different method to set the backend/provider for waterfall specific
  3. deprecate the current setter, add enum which has bungee/waterfall config values and add a new method to set the backend but first parameter is that enum value
stone fiber
#

are we somewhere with the waterfall JDs that I need to be poked into publishing them or not yet

trail plume
#

I tried the PR and it didn't work, but I get a feeling that I just used the wrong command now

stone fiber
#

all good, mostly I wanted to make sure it wasnt all done and I was just not paying attention

ornate bloom
#

@trail plume What command were you running? I put the changes into the deployment profile alongside where the sources and javadocs configuration, so it runs under that profile.

#

I assume the typical build process for WF deployment is: mvn clean install -P deployment

#

That would build the docs as well as the sources jar

#

Docs would be in Waterfall-Proxy/api/target/site/apidocs

#

Actually, might be in Waterfall-Proxy/api/target/apidocs, without the site

trail plume
#

ah, that got it, I was calling javadoc manually, guess that was derping it

ornate bloom
#

If calling it manually, think you need to do mvn javadoc:jar -P deployment

#

but yeah it should all happen automatically as part of the deployment build process if you do clean package or clean install or clean deploy or whatever.

#

With the deployment profile.

trail plume
#

Oh, what was the other change that you wanted to make after?

ornate bloom
#

I assume it grabs that somewhere from the pom

trail plume
#

ah, probably

ornate bloom
#

So was figuring that would be a good opportunity to just update the POM to point to the right places now that WF is properly under PaperMC

stone fiber
#

electroniccat is gonna go rogue and fork waterfall back out

ornate bloom
#

lol

#

BungeeCord apparently has 2 separate links to javadocs lol

#

One to the api artfact's javadocs, and one to the chat artifact's

#

I could make that aggregated if we wanted.

trail plume
#

Well, it didn't blow up

ornate bloom
#

yay

stone fiber
#

I thought I moved the IRC notif to #waterfall apparently not

trail plume
#

(I have no idea if you can even access that)

stone fiber
#

byte cant no

#

you can add his GH name to the perms at the top of the proj and he'd be able to

ornate bloom
#

Just let me know if you guys wanted to aggregate more JDs with the API's docs, I know how to do that now. Most of the time was spent learning how to do that because I thought that's what we wanted 😛

#

Seems like BungeeCord intends api and chat to be documented

trail plume
#

I mean, if it's that easy to do, I'm wondering if it kinda doesn't make sense not too, only reason I didn't really care about aggregation was the whole potential of others being a pain

#

I'll probably also look into fixing the javadocs and maybe bumping the javadoc plugin, wondering why doclint doesn't like to be disabled though o.O

ornate bloom
#

Yeah it really is that easy, I can make a PR for you to try out if you want

#

wrt doclint, probably just need to fix whatever it wants us to fix

trail plume
#

If you wanna submit a PR for it go for it, api and chat are the major ones, I can't really see anything of consequence

ornate bloom
#

Cool, doing that now

#

done 😄

#

Oh wait

#

I messed up 1 thing, I forgot to do inherited => false lol

#

That makes the aggregated javadocs execution run for each module if I dont

#

Gonna force push to the feature branch

#

Alright, fixed. PR should be good now.

#

Would it be worth delomboking the sources jar? I have no idea, I assume it doesn't matter if you have the Lombok plugin for your IDE.

#

Actually, it's just a sources jar, doesn't matter any way. Lol

#

Wish I knew why @NonNull occurs twice in the JD >_>

ornate bloom
#

Made another small change to the PR. The doctitle defaults to ${project.name} ${project.version} API so for the aggregated docs it was showing Waterfall-Parent 1.13-SNAPSHOT API, fixed it to show as Waterfall instead of Waterfall-Parent.

#

Fuck me there's a windowtitle too lol

#

Same issue 😛

#

y u do dis javadoc

bleak current
#

epic

#

should've implemented this waaay sooner

trail plume
#

I do kinda wanna look into creating some dev scripts or something, saying that, I might get into playing with docker some more and see if I can get something decent working there

lofty ridge
#

here @bleak current

#

I've transcribed for you

#
#!/bin/bash
MEM="256M"
EXTRA_ARGS=${EXTRA_ARGS:=""}
JAVA=${JAVA:="java"}

if [ ! -f Waterfall.jar ]; then
    curl -L -o Waterfall.jar https://papermc.io/api/v1/waterfall/1.13/latest/download
fi

if [ ! -z "${JREBEL}" ]; then
    EXTRA_ARGS="${EXTRA_ARGS} -agentpath:/home/mark/.IntelliJIdea2018.1/config/plugins/jr-ide-idea/lib/jrebel6/lib/libjrebel64.so"
fi

if [ ! -z "${MIXIN_DEBUG}" ]; then
    EXTRA_ARGS="${EXTRA_ARGS} -Dmixin.debug=true -Dmixin.debug.verbose=true -Dmixin.dumpTargetOnFailure=true -Dmixin.checks=true -Dmixin.hotSwap=true"
fi

if [ ! -z "${LOG_DEBUG}" ]; then
    EXTRA_ARGS="${EXTRA_ARGS} -Dlog4j.configurationFile=log4j2_dbg.xml"
fi

if [ ! -z "${LCL_DEBUG}" ]; then
    EXTRA_ARGS="${EXTRA_ARGS} -Dlegacy.debugClassLoading=true -Dlegacy.debugClassLoadingFiner=true -Dlegacy.debugClassLoadingSave=true"
fi

if [ ! -z "${ORION_PRELOAD}" ]; then
    EXTRA_ARGS="${EXTRA_ARGS} -Dorion.allowPreloadLibraries=true"
fi

${JAVA} ${EXTRA_ARGS} -Xms${MEM} -Xmx${MEM} -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions \
    -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 \
    -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 \
    -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AggressiveOpts -XX:+AlwaysPreTouch \
    -Dcom.mojang.eula.agree=true \
    -jar ./Waterfall.jar \
    ${@}

if [ -f .dorestart ]; then
    echo "*** Restart requested ***"
    rm .dorestart
    exec ./launch.sh
fi
bleak current
#

err

#

but y

lofty ridge
#

:D

ornate bloom
#

damn lol

bleak current
#

idk how long i've used this script though

#

i remember intellij 2017.4.2 or something

#

or .2.4 or w.e how it was

#

as i was updating the jrebel agent path manually there

#

oh well i miss jrebel, sad that they killed free plans

ornate jasper
#

Dcom.mojang.eula.agree=true
waterfall

trail plume
#

So, we do need to look into bumping the javadocs plugin down the line, guess I'll work on the javadocs and fix them for doclint sometime

#

(Looks like they moved the javadoc bin at some point, and the older plugin doesn't expect/handle that)

ornate bloom
#

When I get some more time I can maybe help look into bumping it

#

Oh nice the PR was merged. Yay, hosted Waterfall API docs coming soon? 😃

trail plume
#

Hopefully, we should be ready to with that when you can Z

bleak current
#

@ornate jasper i simply copied that from my server launch script and replaced jar file name :p

#

there are other stuff which don't make sense: mixins, orion (paper mixin loader), legacylauncher debug flags etc.

stone fiber
#

@trail plume I'm mostly looking at updating the Paper one to use the new API and changing the implementation of it so the server-portion defines how rather than hardcoding it in the API

#

nothing really user-facing

#

so /waterfall can be a thing with little worry from me about "how it matches"

lofty ridge
#

uh

#

can you re-phrase that?

#

I can't understand what you said

stone fiber
#

🔠 🌮 so that partyparrot can lava

#

all I remember is electronic wanting to hold off on a waterfall command to see what i did with paper's

#

and my thing was Im not actually changing anything about how the user uses it

#

but idk if that was the question or not so I was waiting for another reply

lofty ridge
#

I feel like I'm missing part of the conversation Thonk

trail plume
#

Yea, I was mostly wondering if something fancy would pop out of it, but being able to create a heap dump in waterfall would be handy, and the fact that waterfall doesn't have a way to check if there are any updates just feels dumb

stone fiber
#

not really intending to make anything fancy

#

so it should be all good

remote condor
#

@trail plume is there another repo to get bungeecord-chat? sonatype repo is throwing a bad gateway rn

trail plume
#

Could use the paper repo, should be cached there

remote condor
#

url?

trail plume
remote condor
#

tyvm good sir

native apex
#

Hi guys. I have a question. Is there a way to passthrough the packet using method net.md_5.bungee.protocol.Protocol.GAME.TO_CLIENT.registerPacket<DefinedPacket>?

#

I'm trying to make bungee gui plugin, but as far as I get it, using that method make every packet of that id, even from spigots, go through the my subclass of DefinedPacket

#

Basically, I want to catch and read/write packets that's relevant to my bungee gui plugins, but let others untouched.

#

ATM I use

            Protocol.GAME.TO_CLIENT.registerPacket<DefinedPacket>(
                    PacketOpenWindow::class.java,
                    map(ProtocolConstants.MINECRAFT_1_8, 0x2D),
                    map(ProtocolConstants.MINECRAFT_1_9, 0x13),
                    map(ProtocolConstants.MINECRAFT_1_13, 0x14)
            )```
to register, and 
```java
player.unsafe().sendPacket(new PacketOpenWindow(BUNGEE_WINDOW_ID, windowType, windowName, size));``` to send packet
trail plume
#

Honestly better off generally using a packet plugin for dealing with all that stuff

native apex
#

Which ones?

#

Like viaversion? Well, we have to have it on spigots, and I'm not sure if there is a way to make via on both bungee and spigots working together properly.

trail plume
#

Quick google suggests that all of the tools for that broke \o/

#

But yea, that looks about right for registering packets

native apex
#

The thing is: my code from above looks into every PacketOpenWindow that comes from the person, and you have to implement public void read(ByteBuf buf) method... But I want to passthrough packets that's unrelated to my bungee gui plugin

bleak current
#

good luck with the gui plugin lol

#

minecraft inventory handling is a major pain in ass

native apex
#

I'm looking for thing like"if this PacketOpenWindow or PacketSetSlot is related to bungee gui, process it. If it's not, pass it through"

bleak current
#

i hacked MCProtocolLib on top of bungee and got a whole set of other needed packets

#

well you need to inject your own packet handler into netty pipeline

trail plume
#

You're going to have to read it if you use bungees mechanism

#

(You'll also need to write the write method too)

native apex
#

Basically, if I want to go that way, I have to inject, right?

trail plume
#

You're going to need to read part of the packet to check if it's relevant to you or not anyways

bleak current
#

kinda outdated

#

but might help

native apex
#

But what will happen if I check and then put that part to where it was and don't read anything else?

#

mikroskeem, thanks, I'll take a look at that.

bleak current
#

it's for 1.12 and won't work with 1.13 so be careful :p

trail plume
#

Well, once you have the packet and worked out you don't care, you can technically skip the bytes, but that would involve adding logic inside of your packets to check if it cares, which 👎

native apex
#

Wait, you mean if my read method will be empty, packet will be processed as usual?

trail plume
#

if your read method is empty is will throw an exception

bleak current
#

and i'm not sure if i need to inject other versions as well somehow - bungee supports 1.8-1.13 while i inject only one version

native apex
#

But what if I'll override it with empty method or one that just skips all the data?

trail plume
#

Bungee checks that the packet has been fully read after it's been processed, at minimum you'd need to read that entire stream

native apex
#

Thanks

#

Ah, btw, I think I've found a bug

            Protocol.GAME.TO_CLIENT.registerPacket<DefinedPacket>(
                    PacketSetSlot.VV8_12_2::class.java,
                    map(ProtocolConstants.MINECRAFT_1_8, 0x2F),
                    map(ProtocolConstants.MINECRAFT_1_9, 0x16)
            )
            Protocol.GAME.TO_CLIENT.registerPacket<DefinedPacket>(
                    PacketSetSlot.V13_0::class.java,
                    map(ProtocolConstants.MINECRAFT_1_13, 0x17)
            )```
and I've got windows property packet (0x16 in 1.13) caught by ``PacketSetSlot.VV8_12_2``
trail plume
#

Also, come to think of it, you'd need to create a copy of the packet buffer and basically write it back in the write method

#

Don't do that

#

Bungee will basically map all protocols between your current mapping and the next (or, to the end of the protocol versions)

#

There should be a set of read/write methods which take the protocol version, then you'll write the version specific stuff in there

#

(and basically if/else the correct data for the correct proto version)

native apex
#

I mean, that code says that PacketSetSlot.VV8_12_2 has to trigger when 1.9 client sends 0x16. But it triggers when 1.13 sends 0x16 as well

trail plume
#

Because that's how that method works

#

You're registering a packet for 0x2F for 1.8-1.8.8, and 0x16 from 1.9-latest

#

Bungee requires those to be a single class

native apex
#

Aahr, I got it, nvm then.

#

thanks again

trail plume
lean gobletBOT
#

bops

#

op pls

lean gobletBOT
#

test

placid crescent
#

bop it

mental dagger
#

beep, boop, beep, boop ?

lean gobletBOT
#

.$mgmt chan config #waterfall-dev -l true -c true

#

Config change for '#waterfall-dev' on 'spigot'

#

Old values: logs | commands | reminders | seen

#

New values: logs | commands | reminders | seen

mental dagger
#

why bungeecord dev community is so small ?

grizzled thistle
#

because there's more spigot servers than bungeecord proxies, and probably because you can do 'cooler' stuff with spigot

trail plume
#

It's a proxy, it does proxy things

#

The API is also much more obtuse than bukkits, e.g. use of lombok means that the bungee docs are incomplete, that with how much can actually be moved over to the proxy without too much effort, seals the deal, really

remote condor
#

People cant live outside the API.

trail plume
#

It's much more convenient, other than where needed, to live on the server

mental dagger
#

@grizzled thistle with the plugin messaging channel you are able to send a message to do the 'cooler' stuff with spigot, but bungeeside

grizzled thistle
#

I'm aware

#

I never said bungeecord was uncool, I use it. I was just trying to give a explanation to why people might not use it as much as spigot.

mental dagger
#

@trail plume you can delombok bungeecord, but then merging would be a pain

trail plume
#

We've already got delombok'd javadocs here

mental dagger
#

and that broke my first patch of my fork

#

and i am too lazy to redo

bleak current
#

well that's none of paper's business :p

trail plume
#

But the fact that bungees api docs doesn't have them means that stuff is missing from the docs

bleak current
#

it's your responsibility to keep up ;)

trail plume
#

And that's pretty much the downside of patches, if something around them changes the patch fails to apply and needs to be merged manually

bleak current
#

also cat did you notice my issue?

trail plume
#

Nope

#

Also not slept so can't promise too much

#

Ohhh, that one

bleak current
#

opinions?

trail plume
#

We'd need to break up Configuration into some form of delegation to the Bungee/Waterfall configs

#

Also not fond of the idea of an enum for stuff like that as it seem kinda messy

bleak current
#

@mental dagger your reply was unneeded, you do realize it sends an email to every repository watcher?

#

hmmm

#

delegation... how would that look like?

mental dagger
#

so i can spam ur mail

trail plume
#

Well, I think it's delegation

#

More, existing Configuration object calls out to another object

bleak current
#

i mean yeah idea but implementation-wise?

trail plume
#

Being that WaterfallConfig currently extends bungee

mental dagger
#

bungeecord's config api is ew

#

but every other thing - 👌

bleak current
#

convo derail reee

trail plume
#

We'd need to at the very least move WaterfallConfig off to its own thing vs extending bungees

bleak current
#

yeah

#

because everyone who forks has to make previous fork's config class abstract

#

and that's what i'm not quite fond of either

mental dagger
#

hmm

#

why not implement json configs

#

gson is inside bungeecord, its not a bad idea

trail plume
#

people struggle with yaml

mental dagger
#

well, yaml and json

bleak current
#

with json it's even harder

#

for most of the people

trail plume
#

We're not switching to a less human friendly format.

mental dagger
#

yaml and json

trail plume
#

The API mikro is planning would let you do that with a plugin

bleak current
#

that's what i'm kinda doing myself

mental dagger
#

wait, bungeecord current;y has configuration adapters

bleak current
#

yes

mental dagger
#

and the only one is a YamlConfiguration

bleak current
#

yes

mental dagger
#

hmm if we do one more ? a JsonConfiguration for example

bleak current
#

might as well make a plugin what does this for you

remote condor
#

PropertiesAdaptor ¯_(ツ)_/¯

bleak current
#

instead of json, i'd rather go for HOCON

#

which i already utilize in my plugins

mental dagger
#

actually, bungee doesn't allow you to register ur configuration adapter

#

it just haves YamlConfiguration and thats it

bleak current
#

also i think you're missing a point completely

#

i'm speaking of proxy-specific configs

mental dagger
#

yeah ik

#

i am not talking about this rn

#

what if

#

we abstract ConfigurationAdapter with the needed get methods and then do a addAdapter method

#

no wait that will break things, nvm

trail plume
#

I don't see how that makes sense

bleak current
#

tell me when ivan makes sense lol

trail plume
#

If you wanna work with gson, work with gson

mental dagger
#

i mean, allow ppl to register their own configuration adapters, not just the bungee offer

trail plume
#

You don't need to register them

grizzled thistle
#

json isn't that hard, just format it pretty and give the variables good names, people should be able to figure it out

bleak current
#

also

#

ConfigurationProvider.getProvider(YamlConfiguration.class).load(file);

#

replace YamlConfiguration with one you want to use

grizzled thistle
#

also gson is the best, love that shit, I use it all the time

bleak current
#

and that's like... it?? :D

trail plume
#

And honestly, ConfigurationProvider is just stupid

mental dagger
#

yep

#

thats what i'm talking about

#

allow ppl to register their own providers

trail plume
#

No

#

Just don't use it

bleak current
#

you don't need to register them

#

lol

#

going back to old topic - there's one way too

bleak current
#

getConfigurationAdapter().get("waterfall")

#

🤔

#

however it's kinda meh

mental dagger
#

this is about bungee configs

#

but not plugin ones

bleak current
#

hey, you don't need to use ConfigurationProvider with bungee configs

#

you need to implement ConfigurationAdapter interface

#

and needed get*(String key, T def) methods

mental dagger
#

configuration providers are ew

#

how do i don't use that to create config

bleak current
#

you don't need to use bungee api at all to create config files? :D

mental dagger
#

how ?

trail plume
#

if you want json, use the gson library?

mental dagger
#

i mean yaml

trail plume
#

if you want yaml, stick to what bungee offers

bleak current
#

or use snakeyaml directly?

mental dagger
#

and how do i save, load and things with gson ?

#

i should make my own serializable of file ?

bleak current
#

gson has more fluent api

#

can't you read O_o

#

for short: to save, take object and call Gson#toJson

#

then store serialized contents to the file

#

to load: Gson#fromJson

#

supply class and stream/file

mental dagger
#

so i need my own serializable of config ..

bleak current
#

not sure what you mean by this exactly

#

but that's what gson kinda is meant for - object mapping?

mental dagger
#

gonna show u example with chat

bleak current
#

that's custom serializer

#

you don't really need that

#

but if you're going to redesign config class structure at some point then you'd need atleast a custom deserializer

mental dagger
#

where can i find waterfall javadocs/

lean gobletBOT
#

I don't think Z750 got to publish them yet, not sure if he noticed by nudge

stone fiber
#

I noticed Im just spiraling trying to get everything done and that was a casualty

#

I will do it soon

ornate bloom
#

When you do get around to it, it'll be the docs in Waterfall-Proxy/target and not the ones in any of the modules

stone fiber
#

"yay he finally did it totally didnt take like a week wow so good"

#

thank you thank you

trail plume
#

'bout time

#

I mean, thanks

#

stone fiber
#

youre not wrong

lofty ridge
stone fiber
#

there's always something with you people

spring bloom
#

:dansgame:

weary grove
#

...now that I think about it, there's a better way to implement this. It's called a "binary search tree" and TreeMap/TreeSet is the canonical Java implementation. Also, insertions are not O(n) but more like O(n log n)... ¯_(ツ)_/¯

spring bloom
#

tbh if you want a lower memory footprint but high sppeds i'd just use an open addressing solution

#

unless you want the sorted aspect

weary grove
#

I don't believe we would care about sorting it, we just don't want the memory suckage caused by Maximvdw's shitty but viral plugins

spring bloom
#

what's the set storing?

weary grove
#

I believe it's scoreboard team players

spring bloom
#

oh

tall pike
#

What features that waterfall have more than bungeecord ?

sly crown
#

shouldn't a BST insert be O(lg n) ~= O(h)

#

how'd you go from O(n) to O(n lg n)

#

that's even worse

spring bloom
#

the insert should just be n

#

it's due to shifting of the elements

sly crown
#

in a BST?

#

shifting?

#

ummm

spring bloom
#

array backed

sly crown
#

gross? wtf?

spring bloom
#

the set is array backed for memory efficiency

sly crown
#

no it's not

spring bloom
#

the set he linked is

sly crown
#

oooh

sly crown
#

thought he was talking about java's treeset/treemap

spring bloom
#

no that's log n for sure :>

#

I still think you can get away with an open addressed table and basically have the same memory efficiency

#

if the backed array in the current set isn't always trimmed to size at least

sly crown
#

we could also get away with burning leaves for fuel efficiency

spring bloom
#

ur retarded

sly crown
#

thanks

ornate jasper
#

Is there a way to see what player was used to send a plugin message from Bukkit?

#

i'm seeing getSender() in the event but it returns ServerConnection...

lean gobletBOT
#

see the reciever

mental dagger
#

@ornate jasper can't explain, just see my code

        if (!event.getTag().equalsIgnoreCase("ae:announcements")) {
            return;
        }
        ByteArrayDataInput in = ByteStreams.newDataInput(event.getData());
        String subChannel = in.readUTF();
        if (subChannel.equalsIgnoreCase("TestReceived")) {
            if (event.getSender() instanceof Server) {
                Server server = (Server) event.getSender();
                ServerResponce.addResponce(server.getInfo().getName(), true);
                return;
            }
            if (event.getSender() instanceof ProxiedPlayer) {
                ProxiedPlayer sender = (ProxiedPlayer) event.getSender();
                ServerResponce.addResponce(sender.getServer().getInfo().getName(), true);
            }
        }
    }```
ornate jasper
#

Hmm

#

So receiver should be a proxied player?

mental dagger
#

¯_(ツ)_/¯

#

i dont do anything with player, but servers

lean gobletBOT
#

Yes, reciever should be the users connection

weary grove
#

@sly crown Sorry for any confusion! A BST insert is O(log n) (assuming a balanced tree), I should know this because I had to implement it for a college project. I was talking about the bizarro LowMemorySet in Waterfall. More specifically, why does it still exist?!?

#

TBH I'd rip it out and replace it with a fastutil collection... it would exhibit better performance and fastutil won't allocate as much waste compared to HashSet and friends.

bleak current
#

Is there a way to check what ip the player tries to join using ProxyPingEvent? I am trying to check if which subdomain they ping, e.g. Survival.server.com or server.com or play.server.com

spring bloom
#

note that will be a blocking call

trail plume
#

^ + getVirtualHost on the PendingConnection

bleak current
#

ah ok

#

Also by blocking call, do you mean that the ping doesnt return anything to the client?

spring bloom
#

blocking as in it will take time due to io

bleak current
#

what kinda time we talkin about?

spring bloom
#

expect seconds

bleak current
#

oh snap

#

ok, is getVirtualHost the same?

trail plume
#

It will basically contain whatever they used to connect

bleak current
#

will it slow the response to the client?

trail plume
#

if they connected with an IP address however, getHostName will take a moment as it will preform a reverse lookup

#

Well, yea...

#

If the response is blocked when the server needs to go look some stuff up, the client won't get the response until it's done

bleak current
#

ah ok

spring bloom
#

wat r u doing with the name anyways

bleak current
#

i want to make a maintenance mode that shows players in the motd depending on what ip they try to connect on

#

but i may just make it general

ornate bloom
#

I think he was asking what the target server's host was, not the player's?

bleak current
#

ye the server

#

you want vhost then

spring bloom
#

oh the target server's

bleak current
#

ye but if it takes seconds then it may get annoying to ppl

ornate bloom
#

The vhost shouldn't be blocking

bleak current
#

oh

#

vhost isn't ye

#

that info is got from handshake packet

#

😮 and that returns the serverip that they try to ping? e,g, survival.server.com?

trail plume
#

getHostName may block if they connected with an IP address vs a host

bleak current
#

well you don't need to check using getHostName really

ornate bloom
#

The vhost could be an IP, sure

bleak current
#

if purpose is to respond certain message on certain hostname

ornate bloom
#

Yeah, just ignore any unknown vhost

bleak current
#

ok

ornate bloom
spring bloom
#

mfw it sends that

ornate bloom
#

So it can probably be any value, just need to validate it on your end which values you want to act on and how.

bleak current
#

is it bad then that it sends? :p

ornate bloom
#

Bungee uses vhosts to send players directly to specific servers if you tell it to

trail plume
#

I mean, they don't need it

ornate bloom
#

Can be good

trail plume
#

It's handy that they do, but 🤷

bleak current
#

imagine if they removed that one day

#

for no reason

#

imagine the whining that comes from this

#

😮 could i also use .getPort for this?

ornate bloom
#

Probably, it's part of the handshake

bleak current
#

ok cool

ornate bloom
#

You just need to remember that custom clients can send whatever they want

bleak current
#

oh?

ornate bloom
#

It should not be considered trustworthy, as far as I know.

bleak current
#

hmm

#

oh true and i block the ports to public cause proxy connection

#

i am thinking something like this

if(event.getConnection().getVirtualHost().isUnresolved()) return;
String s = event.getConnection().getVirtualHost().getHostName();
if(s.equals("survival.server.com"))...

Does this cover the unknown virtual hosts?

ornate bloom
#

Well, yes I guess, since you're "validating" the input. Just don't blindly trust it, is all.

bleak current
#

oh ok so i dont need isUnresolved

#

awesome

spring bloom
#

mfw

ornate bloom
#

But let's say you have survival.server.com and creative.server.com which point to two different IPs, a player could still technically connect to the IP of creative.server.com while sending the vhost of survival.server.com.

#

But if that doesn't matter then whatever.

bleak current
#

oh

trail plume
#

to my understanding, isUnresolved will potentially always return true

bleak current
#

always, unless its a known virtual host?

trail plume
#

Bungee doesn't resolve it itself

#

Seemingly, you just wanna use getHostName

ornate bloom
#

Yeah it would be silly for Bungee to resolve it

#

As that would be potentially blocking

trail plume
#

Looking at the code as it's an unresolved host, it will actually just return the hostname that was passed to it

bleak current
#

oh ok

ornate bloom
#

What Bungee does: this.virtualHost = InetSocketAddress.createUnresolved( handshake.getHost(), handshake.getPort() );

spring bloom
#

I'd cache the lookup result I guess at this point

ornate bloom
#

There's also no functional need for Bungee to resolve it.

#

It's not even used in Minecraft

#

Bungee only uses the name to send players directly to a server

#

If configured to.

#

And for that it doesn't need to resolve it

bleak current
#

I dont think it matters if they try to connect survival and with creative ip cause when its under maintenance it will block joining altogether

trail plume
#

It won't block

bleak current
#

i will be blocking the join event

trail plume
#
private String getHostName() {
            if (hostname != null)
                return hostname;
            if (addr != null)
                return addr.getHostName();
            return null;
        }
spring bloom
#

that other hostname call can be blocking?

trail plume
#

All it's going to do is return back the string that was used as the hostname

spring bloom
#

what type is it

ornate bloom
#

Bungee passes the hostname so it won't be null

#

So no blocking

spring bloom
#

huh :>

ornate bloom
#

As you can see, when Bungee creates it: this.virtualHost = InetSocketAddress.createUnresolved( handshake.getHost(), handshake.getPort() );

#

So getHostName() on virtualHost won't use the blocking one, ever.

trail plume
#

Bungee doesn't care if it's a host or an IP address, it's just going to create an unresolved INetSocketAddress, of which getHostname will just return whatever the host was

bleak current
#

Is it best to cancel PreLoginEvent or LoginEvent?

ornate bloom
#

Uh

#

The earlier the better? Depends on what information you need

#

PreLoginEvent won't be complete in terms of certain information available to you.

#

But if it's enough, then sure

#

Looks like even basic things like UUID aren't available in PreLoginEvent

#

Since it happens before authentication

bleak current
#

just checking perms

#

but does that mean it will handle requests made by offline clients?

trail plume
#

It's fired whenever a client sends a login request packet

bleak current
#

ah ok

#

I'll use LoginEvent to reduce the potential permission checks

ornate bloom
#

LoginEvent is probably what you want most of the time.

bleak current
#

Thx a tonne 🙂

ornate bloom
#

Looks like my user handling code in my plugin uses that too

bleak current
#

nice

#

with that "[Proxy] proxy is restarting!" message, is there a way to change it?

trail plume
#

Yes, grab the messages.properties from the jar and modify it

#

You should be able to shove it in the folder where the proxy is ran from and it shooould just read it

bleak current
#

ah ok cool, was just worried that i'd have to do this every time i update waterfall xD

ornate bloom
#

No you do it once. You copy the file into your server folder

bleak current
#

Ok awesome

tall pike
#

Does Waterfall have a better feature than PluginMessageChannel ?

trail plume
#

Nope, use redis or rabbitmq

tall pike
#

Does it harder to code than PluginMessageChannel ?? I will create matchmaking system of Arena Manager

trail plume
#

not gotten to toying with it yet, but it's basically the same concept

bleak current
#

they're both harder than plugin messaging

#

but more reliable

#

if you can make sure that rabbitmq or redis runs properly

tall pike
#
<repositories>
        <repository>
            <id>waterfallmc</id>
            <url>https://papermc.io/repo/repository/maven-public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>io.github.waterfallmc</groupId>
            <artifactId>waterfall-api</artifactId>
            <version>1.13</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
``` how to use ? <version> for 1.13.2 I don't see any information in waterfall github
mental dagger
#

1.13-SNAPSHOT is for 1.8 - 1.13.2 but dont send bossbars on 1.8

#

check the protocol version before sending bossbars cuz they dont work on 1.8

#

@tall pike

tall pike
#

Yep My server allow 1.9-1.13.2 Thanks

lyric oak
#

thinking_gun how come waterfall uses patches? and not just a normal fork

lean gobletBOT
#

easier to maintain, tbh

lyric oak
#

hmm

#

isnt a git-generated patch set essentially equivalent to a new branch? not going to terrorize you all with this, sorry lol

trail plume
#

It basically makes it easier to maintain the patches, as they'll always be distinct patches, vs having to merge stuff in consistently and making stuff like removing features if ever needed much more work than needed, which as upstream is always making changes conflicting with ours, it just keeps stuff clean

lyric oak
#

ahhhh that makes sense

trail plume
#

and yes, we basically just rebase over any upstream changes

lyric oak
#

otherwise it'd just be a collection of thousands of commits. makes sense 👍

#

linux does it (managed patch sets) lol

#

i will show myself out.

trail plume
#

Yes, but the level of co-ordiation that project takes is crazy, and they basically have people dedicated to dealing with "PRs" to merge in those changes into their respective trees

lyric oak
#

yea, had to try to fight up that stream once 🤦

#

for my super important patch about better device tree support for this i2c chip that.... literally nobody cares about lol

olive tide
#

does upstream apply waterfall changes lol

sly crown
#

occasionally they will, so the patch is removed from waterfall

#

or the patch is changed to improve the upstream feature

feral parrot
#

I'm trying to make a fork of Waterfall, but how would I go about making the first patch with all of the pom changes?

#

Using Waterfall as a submodule

#

Tag if you have an answer

bleak current
#

see Travertine

#

@feral parrot

#

you can use that freely as a base of your fork of waterfall

#

because that's what travertine essentially is

feral parrot
#

Ok, thanks! Wasn't sure.

lean gobletBOT
#

use the --author flag with --amend or just edit the patch manually once you've rebuilt the patches (and then patch/rebuild patches)

feral parrot
#

I forgot about Google, thanks tho

balmy heath
#

When developing a plugin for Bungee/Waterfall, should I run database queries async or does it not matter?

sly crown
#

you shouldn't think of a proxy as minecraft

#

there isn't a "world loop" thread

#

various things may happen in various places

#

don't block things that shouldn't block :^)

lyric oak
#

can anybody explain why this is a safe/sane choice here?: https://github.com/SpigotMC/BungeeCord/blob/d591d0ed291e11772b612c3b247c5b053a5eb037/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java#L24
I understand the allocator (via ByteBuf::copy) is probably going to give you a new buffer thats aligned with... page boundaries or something, and thus probably give you some extra capacity needed for varint rewrite. but seems like an unsafe assumption?

lyric oak
#

cause to me... it looks like the varint entity ID rewriting has just been skating by for years based on the fact that it usually gets some extra bytes (ByteBuf capacity) on the end of the new "copy" buffer

trail plume
#

copy creates a brand new ByteBuf with the contents, vs a "sliced" view reference

#

I'm not a pro in netty related stuff, but I'd imagine that if we started trying to write to a sliced view, it would end up blowing up outside of there

lyric oak
#

yea, the slice puts a hard 'capacity' on it

weary grove
#

@lyric oak It has a lot to do with Netty's pipeline handling. The received ByteBuf has to be properly released, otherwise you will have a memory leak. Another related factor is entity mapping, which has to write new VarInts, which can be 1-5 bytes. It's tricky to get it right.

lyric oak
#

the copy... is technically just something "as large" as the original, or bigger. and judging by how the entity remap packet rewriter works, it looks like it relies on it being slightly larger

weary grove
#

It has nothing to do with the size. Netty ByteBufs are dynamic.

lyric oak
#

hmm actually thats write, ByteBuf::copy would probably produce something expandable

weary grove
#

Aside from the ByteBufs you get from Unpooled.wrappedBuffer(), which are fixed size, your standard ByteBuf can be expanded (or shrunk) to any size

lyric oak
#

idk why, but i imagined ::copy would call one of the ByteBufAllocator allocators with maxCapacity set

#

still feels like undefined behavior lol nothing in the ByteBuf::copy docs says it'll be an expandable buffer

#

but also not sure what allocator bungee is actually using, so... i resign lol

lyric oak
#

i just hate the bungee rewriter 😦

#

yes, been allll up and down the netty docs lately

#

last few years actually (more so lately).

weary grove
lyric oak
#

ahh so it does set maxcapacity

#

and its the maxcap of the buffer it came from 🤔

#

that makes sense.

#

hacking in PE support on my waterfall branch, ran into issues with buffers that couldnt expand (also ran into this with PS bungee PE support). raknet in both of those cases was producing sliced buffers already, they have a much smaller maxCap

weary grove
#

Velocity doesn't do any entity ID remapping (Waterfall recently gained this feature, too, behind a config option) but Velocity has it integral to the design.

#

So it's allowed me to do some optimizations.

lyric oak
#

yea did run into that, would be great to get rid of that remap logic 😦 seems so goofy to have to do all of that, so glad to see theres a way out (resending Login right?)

weary grove
#

yep

#

Ah, MCPE support?

lyric oak
#

yea, working with the PS team on their PE branch (coming along rather nicely, actually)

weary grove
lyric oak
#

but also doing my own weird hacking with PS bungee, raknet, and now my waterfall branch for some reason lol

#

hrmmm

#

i do actually have it in production, with PS bungee and PS (mcpenew branch). actually works!

#

but using the PS bungee plugin was causing some weird issues with some plugins. you cant quite hack-into the right bungee event flow using a plugin, so figured it'd be best just to hack it into bungee/waterfall

weary grove
#

our PC network couldn't be moved over to MCPE with ProtocolSupport

#

we'd need to go from the ground up, really

lyric oak
#

yea its definitely not the... "end all" of MCPE options 😦 but its an interesting option depending on the kind of content for your network

#

our players are just happy to have a decent survival experience without realms lol

weary grove
#

which would be nice, we could eliminate some technical debt

lyric oak
#

(despite the bugs and client crashes)

#

getting rid of tech debt is always nice lol

#

but... working on PS PE, im racking up more than ever now lol

weary grove
#

and I can use C#, a sane language for once

#

you know what I'm talking about 😉

lyric oak
#

minet?

weary grove
#

yep

lyric oak
#

ohh right, i think i saw you in the discord there

#

i think, in too many discord now... they just blur together. (this is the r/admincraft discord right?)

weary grove
#

This is the PaperMC Discord.

lyric oak
#

😛

weary grove
#

It also happens I'm in the admincraft one, too.

lyric oak
#

yea think i first ended up in the paper one from there, now im just... in some sprawling mess of chats now

#

well anyways, sure you'll see me lurking around while i finish my waterfall fight lol depending on how this goes, might try to get native PE protocol baked into here (currently we're still relying on the spigot ip-forwarding stuff, and the ProtocolSupport encapsulation protocol)

#

its still the same protocol, just whether or not we connect over TCP or UDP. I just dont have a good raknet client built and tested yet lol

weary grove
lyric oak
#

ah yes, they have the fabled slice() instead of copy() 😄

weary grove
#

it's my project, too

#

okay, technically, Waterfall was my project too...

lyric oak
#

i have run into velocity before... forgot what the changes were tho

#

(and thats the distro repo, still need to settle on a set of patches for my waterfall fork)

#

is velocity a fork, or just a total rewrite?

main plume
#

It is a total rewrite

trail plume
#

With waterfall, I might actually splice that if entity remapping is disabled, I recall tempting to do it, but not 100% sure if I did

#

Hm, apparently I didn't

lyric oak
#

ah, yea dont think so. checked to see if that was untouched

#

could save a few cycles 🤷

final shadow
#

k

#

there're something wrong with Travertine

#

when i'm using Travertine

#

(If i use BungeeCord252 it works fine)

final shadow
#

i dont care.

#

i'm from china

#

we're dynamic ip

#

LOL

#

thanks.

final shadow
#

@night grotto @trail plume @lofty ridge

lofty ridge
#

peepoMad 🗡

final shadow
stone fiber
#

someone combined that if you'd rather

vagrant marsh
stone fiber
vagrant marsh
final shadow
#

Kicking players who using 1.7 client

#

(when i'm using Travertine

#

FIXXX PLEASSEEEEE

final shadow
#

@stone fiber

#

pls..

stone fiber
#

you know there are like 3 listed rules right

#

in this guild where we allow just about everything

#
- Please do not ping project staff, contributors, or notable persons directly. Ask your questions to the channel flat out.
ornate bloom
#

y u do dis

#

Z pls

trail plume
#

If you're going to be an ass and ping everyone, at least have the decency to fetch the minimal amount of information needed instead of expecting us to spend the next 20 minutes trying to fetch information out of you so that we can even begin to diagnose your issue.

spring bloom
#

big oofers

iron magnet
#

So If I am using AuthMeBungee dev build and AuthMe dev build, should I use Waterfall dev build? @trail plume

trail plume
#

I mean, all versions are technically dev builds...

#

But, I can't exactly shove any recommendations for you on versions for plugins which have literally nothing to do with me

bleak current
#

authmebungee

#

lol gl with your cracked server

bleak current
#

i remember that waterfall had asm event executors patch (in disabled patches folder however)

#

why was it disabled?

#

or removed rather

remote condor
#

in java 1.8+ its only marginally faster than reflection with it practically auto generating classes in the jvm just like ASM, don't know if this is why though.

weary grove
#

In fact, the auto-generation is done by ASM

#

@bleak current I believe the actual reason was because it did not play nice with plugins. Obviously, Waterfall has to take great pains to ensure compatibility with BungeeCord (just like Paper does for Spigot), so it had to be backed out.

#

I think that's the case, since I was around for the patch's removal 😉

trail plume
#

I recall some story like that around it, tbh

#

Think I got the story told by jamie or somebody

lyric oak
#

hey all, got a quick licensing question. So, I have a waterfall fork right now, and i have another github repo that houses the resulting modified bungeecord. The second repo is distributed under the original md_5 license, and the waterfall fork keeps the original MIT license. Does publishing the source for the resulting build (the second repo) violate the terms of the Waterfall MIT license?

#

ugh, writing it out, i realize how lazy im being. ill just keep the patch fork

trail plume
#

If you're managing a waterfall fork, you'd be better off forking travertine and keeping your patches in there

lyric oak
#

oh interesting

#

why travertine specifically? the 1.7 support is nice i suppose

#

the... not having hundreds of patches hanging around is nice too

lean gobletBOT
#

It has all the tooling there to maintain your own fork of waterfall without having to merge patches and stuff

lyric oak
#

yea thats pretty nice. plus im getting another free version out of it lol lots of conflicts in the same areas, which i... think is good

#

hmm not sure which way i want to go

#

works fine with travertine still, after... resolving the many Protocol class conflicts

#

only ~3000 loc 😢

#

and i didnt check if it broke 1.7 java lol

lyric oak
#

anyways, is there anything about hosting the 'patched' BungeeCord repo that would violate the waterfall license? i think its still fine with the md_5 license (and ill eventually get rid of that repo probably)

ornate jasper
#

Blasphemy!

#

Thats not possible!

bleak current
#

what

#

nice @lyric oak

#

fyi you don't need to actually use travertine patches

#

see my fork

#

.g mikrocord

lean gobletBOT
bleak current
#

.g mikroskeem microcord

lean gobletBOT
#

(DiscordBot) No results found.

bleak current
#

OK

#

@lyric oak may i borrow your patch? :p

bleak current
#

why is this needed

#

also @lyric oak indeed, it's not needed to use patches like Waterfall or Travertine - they're used as a workaround to maintain upstream changes more easily

bleak current
#

might be worth mentioning that native libraries do not work with this patch at all

#

i don't know how netty bytebufs work really but basically something tries to get memory address of bytebuf and then throws an error

lyric oak
#

@bleak current i remembered in the middle of the night that i forgot to do the 'ensure direct buffer' checks for encryption

#

going to try and get that fixed quick. and sure! can definitely use the patch, thats one reason i still wanted a fork with the patch available

bleak current
#

can you also answer to my "why is this needed" question? :p

#

also is there a way to detect somehow whether backend server is in online mode or not

#

bungee throws loud error about this generally

#

[14:53:47 INFO]: [CPT MarkV] disconnected with: Kicked whilst connecting to lobby: This server is in online mode, but no valid XUID was found (XBOX live auth required)

#

that's what i got

#

actually uh

#

yeah never mind, "kicked whilst connecting to lobby" implies that proxy verified the online mode fine

lyric oak
#

that one line is needed because the PE cipher key comes in longer than whats needed for the IV. only need the first 8 bytes, PC does just 8, PE does... 16 i think

#

and yea, the backend servers always need to be offline still. if you're using ProtocolSupport PE, it'll use TCP and the normal IP forwarding stuff

#

(for vanilla and.... nukkit etc, just need to put them in normal offline mode)

bleak current
#

of course, i simply forgot that i had my backend server on online mode

#

and then restarted proxy/server 4 times until i realized that

lyric oak
#

new update changes some of the config names to make more sense too lol

#

ahh

bleak current
#

...that i cannot read

#

:D

lyric oak
#

yea its actually... very similar flow to java

#

added bonus of- you can use XUIDs in offline mode still which is neat

bleak current
#

can you also make prometheus support optional?

#

e.g as a separate module or something

lyric oak
#

yep

#

definitely still lots of cleanup to do

#

and... getting my repo situation situated still >.<

#

also, its currently doing the PE "server transfer" for server transfers right now. its capable of doing it the normal way, but theres some things i need to clean up to get it to work with vanilla to. will make it optional either way, there's no other way to reload resource packs and all that

#

(entity remapping and all that is already done and functional)

bleak current
#

yeah noticed

#

i installed mcpe on my phone to test it out

#

if interested

#

tbh it applied more cleanly than i expected

#

especially Protocol class

lyric oak
#

yea, theres not really a "ton" of modification, just lots of new files and new lines

#

going to break the patches down into 3 parts too. the "waterdog" renaming, the "modified" part, and "additions" part

bleak current
#

while you're at it

#

avoid adding new imports

lyric oak
#

hmm yea, that part might be tricky, but its at least pretty easy to fix the conflicts

bleak current
lyric oak
#

ah, i see

#

hmm ill make some issues on my fork lol feel free to add any new ones if they come up

#

i think the cleanup might take longer than the debugging 😭

bleak current
#

i'd like to fix that bytebuf issue rn

#

but i have no idea how

#

i have minimal knowledge about netty lol

lyric oak
#

let me just fix that up quick and get a new patch

#

want a non-travertine one?

bleak current
#

you could just tell me what to add where

#

if it's 5-10 line change

#

but eh, you decide :p

lyric oak
#

christ, broke something else. yea let me get you a gist