#waterfall-dev

1 messages ยท Page 5 of 1

slim viper
steel jungle
#

What's your end code?

slim viper
#

player.sendPluginMessage(MRPG.inst(), "BungeeCord", out.toByteArray());

steel jungle
#

That's not all of it. ๐Ÿ˜›

slim viper
#

What do you mean by "end code" ?

steel jungle
#

The code after you finished the tutorial.

slim viper
#

Ohh like that

slim viper
#

Not sure if that is still relevant

#

The channel is being registered explicitly, like so:

getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", new IncomingBungeeHandler());
slim viper
#

Okay, turns out I should've just used a different stream than what they say in the tutorial

#

ยฏ_(ใƒ„)_/ยฏ

bleak current
#

bungeecord:main or w.e that was

#

since 1.13 you have to do that yep

coral lichen
#

is there any public maven repo for waterfall?

fringe aspen
#

the paper repo has it iirc (i generally use whatever ever the minecraft dev plugin for intellij provides me)

bleak current
#

paper's repo has waterfall api artifacts, correct

eager hinge
#

Can someone help me with this

trail plume
#

It's scoreboard teams

eager hinge
#

Oh, really?

#

And?

trail plume
#

With waterfall, I'd be somewhat tempted to ensure that you have the string deduplication flag set for the JVM

eager hinge
#

How I do that?

#

-XX:+UseG1GC -XX:+UseStringDeduplication -XX:+PrintStringDeduplicationStatistics

#

?

#

Exist a way to check the plugin causing the issue?

#

Should be a spigot plugin, right?

trail plume
#

Issue is with how scoreboard teams are handled and stored in memory, they use strings which ends up basically filling up the heap when you have a lot of teams, that could have technically been represented with an enum, but mojang opted to use a string \o/

#

And those flags should help, but string deduplication has it's own performance concerns, and yup, teams will be created by a plugin, either on the proxy or on the server itself

eager hinge
#

gotcha

trail plume
#

(Well, pretty much generally always down to a plugin when you start having so many teams that it becomes an issue*)

eager hinge
#

oh, I see, thanks

ruby dust
#

You can try a velocity proxy, it does not store scoreboards and teams in memory.

trail plume
#

I wonder if we'd break anything making that an enum

bleak current
#

wdym enum

#

ah, the scoreboard flags

#

ugh it's a data class

trail plume
#

Yeaaa, probably going to have to delombok that if we wanna play with it

#

I'm thinking we shouldn't ever see a non-expected value in there, but we can deal with that by just having a fallback string I'd figure

#

Not clean and not ideal, but least breaking method I can see :/

bleak current
#

i'll try to implement that into my fork

#

but then i need to figure out what plugins do use scoreboard teams

#

and test the shit out from them

#

should do the trick

#

btw @trail plume what about my packet construction patch? :D

trail plume
#

Oh, sorry, I've not really found the time/motiviation to run through too much recently

bleak current
#

i think it should be safe to pull, haven't blown up in my environment yet

#

oh man wat

#

this means that collision rule is initialized only when proto is >= 1.9

#

so in Team class, collision rule might be null as well

#

visible disgust

bleak current
#

should be fine i think

harsh harbor
#

@bleak current u did not get how tcp fast open works

bleak current
#

wdym

harsh harbor
#

you should only do that for SERVER_CHILD

#

not for client connections

bleak current
#

ah ok

#

i didn't bother looking into it because there isn't much documentation for it apparently

trail plume
#

TCP Fast Open (TFO) is an extension to speed up the opening of successive Transmission Control Protocol (TCP) connections between two endpoints

#

First line from a wiki article, but seems like it all falls in line with what they're saying

eager hinge
#

I asked to my developer and he already delete the Team and Scoreboard objetive when player leaves

#

Like
Set<Team> team = ((Player) sender).getScoreboard().getTeams(); for(Team team2 : team) { team2.unregister(); }

#

So, I do not know where is coming from the problem

#

@trail plume exist a way to know where is coming from the problem?

trail plume
#

take a look at the dump and see what teams are holding onto those objects

eager hinge
#

okey

#

and exist a way to disable team saving for travertine?

#

As I know is useless (?)

trail plume
#

The issue is not the fact that it's saving teams as much as bungee keeps them in memory for its own API

#

It's one of those fun annoyances with bungeecord

eager hinge
#

yes, pretty much xD

#

Because the GC kill my server

#

Sometimes spikes

#

And the Ping increase

eager hinge
#

What another thing uses Teams?

trail plume
#

Plugins using scoreboards, anything using scoreboards, etc

eager hinge
#

just scoreboards?

#

Nametags? Bossbar?

trail plume
#

Teams are a part of scoreboards

eager hinge
#

oh, okey

eager hinge
#

And is viable disable the Team on Travertine?

bleak current
#

experimental

#

so feel free to use at your own risk

eager hinge
#

oh

#

I added those flags

#

@trail plume that would help?

harsh harbor
#

Or you can just remove scoreboard handling on proxy completely

weary grove
#

at the risk of breaking plugin compatibility, because this is BungeeCord after all

harsh harbor
#

Well, at least make an option that will responsible for processing scoreboard packets or no

trail plume
#

Not viable without the disable entity metadata option working 100% afaik

#

(Are scoreboards reset by the client itself when you jump world or not?)

harsh harbor
#

lemme check

#

i think yes, but

#

one moment

trail plume
#

afaik, without that system being disabled, bungee has to remove them for the client

harsh harbor
#

if you send respawn packet - nope

#

but if you send JoinGame - yep

trail plume
#

So, yea, for such an option to actually be viable, entity metadata rewriting needs to be disabled

harsh harbor
bleak current
#

fixes cosmetical issue introduced by /grestart

#

that's all

#

as logger cannot be accessed in shutdown hook thread

#

and shows dumb useless warnings

#

well, stdout/err is redirected to logger normally

#

it has bunch of pointless shit very likely, but it's for my own use so /shrug

sick skiff
#

i have not found any other documentation on such "embedded server"s

trail plume
#

There is no embeded server

sick skiff
#

i get that, but can i add or create one?

trail plume
#

If you went to the length of reimplementing enough of a server, yes

#

Bungee doesn't have support for that build in

sick skiff
#

cool! i might investigate some more in that case, it would be useful for wait-queue or login servers

primal granite
#

/gamerule announceAdvancements false

#

not working

weary grove
#

...Waterfall doesn't control game rules, that's a server setting.

sick skiff
#

(other than the weird whitespace diffs)

primal granite
#

so, how to disable announce for archivements ?

#

on server

trail plume
#

You use the command on the servers, achivements/whatever are 100% irrelevant to this channel

#

Worth noting that gamerules on the server are pre-world, so you'll need to set the gamerule in every world

dark perch
#

There is a option on bukkit.yml to deactivate them isnt it?

gritty oracle
#

Is there any way to assign op bungeecord.command.server without adding the permission to a group, just add it to /op?

trail plume
#

Bungee doesn't have the concept of op

gritty oracle
#

Yeah I'm trying to find a way around that without adding the permission to a group

deft trail
#

can someone pretty please with a cherry on top update travertine ๐Ÿ˜ƒ

bleak current
#

does anyone happen to know an alternative way to git am --show-current-patch | patch -p1 --no-backup-if-mismatch if git am bitches about lacking sha1 btw?

trail plume
#

I coulda sworn that I did?

#

Oh, I did, I just completly brain farted and forgot to push \o/

deft trail
#

thanks cat! appreciate it!

chilly coral
trail plume
#

Known issue

chilly coral
#

Ok, i know I can't ask for an ETA but is it a bug planned to be fixed ?

trail plume
#

No real ETA, I need a deeper dive into the issue and time is limited and the tooling available to help figure out what's missing easily is virtually inexistent

chilly coral
#

Could it be a problem in packets order ?

trail plume
#

Potentially

#

But that's why I need to dig into it

sharp isle
#

I may have found a fix

chilly coral
#

(it works, i tested)

#

both ways

trail plume
#

Yea, I was looking at that code a bit back, but wasn't 100% familiar with what was going on, and didn't have the time to get all the mess I needed up to test it all \o/

#

If it's working and you wanna submit a PR, go for it ๐Ÿ˜ƒ

chilly coral
#

server 1 world -> server 2 world
server 1 world -> server 2 nether
server 1 nether -> server 2 nether
server 1 nether -> server 2 world

#

the fact is that the dimension is already specified by the Login packet, so when the client receive the Respawn packet it just ignore it because he thinks he's in the right dimension

#

so the fix is to send the respawn packet before login when the target dimension is different

#

(i was explaining what caused the bug to happen ๐Ÿ˜ƒ )

trail plume
#

Yea, had a feeling it was going to be something fun like that, just didn't wanna start throwing packets all around blindly \o/

bleak current
#

oh yeah that might be it

chilly coral
#

We are not so familiar with patch mecanism ๐Ÿ˜•

trail plume
#

easiest option is to cd into the waterfall-proxy repo and git log and find the patch which adds that change and grab the commit hash

#

then git commit --fixup=##### and git rebase -i --autosquash upstream/upstream

sharp isle
trail plume
#

Better if that didn't happen, but such is how the patch system works

chilly coral
#

i will never understand how it works D:

#

x)

trail plume
#

It's git, but... kinda abused

#

e.g. the commands I told you, if you did that on a real repo you'd probably be shot by somebody

sharp isle
#

well I 've made my first PR ๐Ÿ˜ƒ

trail plume
#

Your branch is outta sync

sharp isle
#

I may have missed a step

bleak current
#

aand you missed // Waterfall comments

#

:p

trail plume
#

Already in a waterfall block

bleak current
#

oh ok

#

then it's okay

sharp isle
#

You can do the fix yourself if you want, I don't understand why my branch is not sync

chilly coral
#

while antbig is doing some magic for his PR, I would need help for an issue i have, which i can't figure it out but i can't talk about it in a public channel :/
@trail plume are you ok to PM ?

trail plume
#

Depends on the nature of the issue

chilly coral
#

it's a paper related issue, so maybe i should go #paper-help ?

trail plume
#

My Q is more around why it can't be discussed in a public channel

#

Also, I'll sort the patch out

#

(If that's any easier for you guys?)

sharp isle
#

yes ๐Ÿ˜ƒ

#

I've try both Methodes but none of them are working

chilly coral
#

it's a paper 1.12.2 related issue, i have 2 timings to show you. The first is "before update" and the second is with the latest paper 1.12.2. The only difference is the paper version between theses two timings.

#

i just want to send you the timings in PM

trail plume
#

Generally better off to just link in #paper-help, more eyes on the issue

wise charm
#

wtf

fringe aspen
sharp badger
#

I've noticed that the NMS generateTree with Tall Birch seems to be creating trees with dirt inside them:

trail plume
#

Wrong channel...

iron spoke
#

Hello, i had trouble using Per-Player View Distance API in 1.14.3, I'm getting this error :

org.apache.commons.lang.NotImplementedException: Per-Player View Distance APIs need further understanding to properly implement
        at org.bukkit.craftbukkit.v1_14_R1.entity.CraftPlayer.setViewDistance(CraftPlayer.java:1994)

Sorry if i'm in the wrong channel.
Also, it works fine on 1.13.X
Does someone knows where it comes from ?

stone fiber
#

It comes from paper

#

Read what itโ€™s telling you

#

API isnโ€™t in 1.14.x and requires a deeper understanding of Mojangs rewrite of the chunk system to implement

#

And yes, this is the wrong channel

iron spoke
#

Okay, thanks. Are you planning to get this API compatible with 1.14 ?

stone fiber
#

Itโ€™s planned

#

There are no ETAs

harsh harbor
trail plume
#

Missing waterfall comments, and what scoreboard issues?

harsh harbor
#

Missing Waterfall comments?

sly crown
#

// waterfall, start/end

harsh harbor
sly crown
#

you add them in a handful of places and just leave them out everywhere else

#

they aren't optional

harsh harbor
sly crown
#

you modified 5 lines

#

but only commend one?

#

a whole lot of lines are just uncommented

#

etc

harsh harbor
#

ok

bleak current
#

cat when are you going to look into my packet construction patch ;-;

#

#373

trail plume
#

It's all on the todo list, kinda burned out on two other projects and getting back into gear is just urgh, I should probably get to finishing my setup for testing servers, just going to use docker-compose and some automagic

lean gobletBOT
#

IRC never forgets

barren girder
#

sshhhhh

#

i realize now it was 3 days ago

lament chasm
#

Any way to send fake proxyplayers to bungee?

I see the UserConnection class but it's final so I can't extend it.

harsh harbor
#

wdym

#

'fake proxyplayers'

#

why you even need that

#

@lament chasm

lament chasm
#

So they appear on /glist

harsh harbor
#

can't you just replace the whole command

lament chasm
#

I guess, but if I hooked in-to it, It'd return when plugins use the plugin channel to get the totalOnlinePlayers.

harsh harbor
#

i really don't understand why you need this

#

extend DownstreamBridge and override handle(PluginMessage)

#

then replace it for ServerConnection

lament chasm
#

@harsh harbor Where would I set the new DownstreamBridge?

Don't do much bungee development so idk where anything is xD

#

Waterfall *** before electronicc roasts me :9

harsh harbor
#
((UserConnection)proxiedPlayer).getServer().getCh().getHandle().pipeline()
                .get(HandlerBoss.class).setHandler(new InjectedDownstreamBridge(...));
trail plume
#

Is your intent that those "players" actually connect to the proxy?

harsh harbor
#

that's not waterfall, wrong channel

dark perch
#

Yeh

lament chasm
#

@trail plume Just something I'm testing out with the Bungee API implemented with the Spigot API, nothing major aha

Anyway I can override the command?
super("glist", null, "testing", "the", "command", "omg");

The aliases work, how-ever the glist is still overpowered by the bungee one.

trail plume
#

aliases won't replace bungee commands

lament chasm
#

The "glist" is the actual main command tho? Or am I wrong.

trail plume
#

It's probably first come first serve or something

#

You'd need to see if there is a method to force the change or unregister the command

lament chasm
#

unregisterCommand found it, now time to locate the glist command location

trail plume
#

in the modules config

lament chasm
#

Aight, hope it works

violet saffron
#

Is there a difference between getting the Waterfall instance to get the players rather than just get the proxy from the main class of the plugin?

trail plume
#

no

violet saffron
#

Okay thanks (:

violet saffron
#

Alright another question, is there a way to only cancel the ServerConnectEvent if it's not being fired due to a player logging into the proxy?

#

So for example, if I load into a hub, it won't do it, but if I leave to another server and then go back to /hub, it'll utilize it.

dark perch
#

Waterfall and travertine have Maven repos?

trail plume
violet saffron
#

Aha got it

dark perch
#

Travertine shares the api with waterfall?

violet saffron
#

Bless up for ServerConnectEvent.Reason (:

trail plume
#

Oh, yea

#

Travertine isn't deployed as there is no API changes there

dark perch
#

Oh ok, thank you

#

There is anyway of listen to every event?

#

Without manual registration?

trail plume
#

nope

dark perch
#

How often is ProxyDefineCommandsEvent called?

dark perch
#

Does Waterfall allows to intercept packets server -> client?

sharp isle
#

No

#

After it depends of the packet you want to intercept

dark perch
#

I wanted to intercept the 1.13 Command packet, but isnt possible sadly

chilly coral
#

@sharp isle cc

trail plume
#

That event is called whenever the server sends it

dark perch
#

ProxyDefineCommandsEvent is not fired when i first join the proxy

#

But is fired when i switch server

#

Using Travertine

#

Main server: paper 1.13
Secondary server: paper 1.8 with ViaVersion

#

in fact, none tab event is fired until i switch servers

red tangle
#

Is it possible to intercept/monitor sent packets in Waterfall? Haven't checked any docs yet. Just wondering if it's possible

lean gobletBOT
#

Waterfall doesn't "understand" most of the packets

trail plume
#

So, you can hook into the networking stuff and pull the data that you want, but overall you're kinda in for fun

red tangle
#

Ahh okay. That might work

#

Thanks anyways

frank junco
#

hello all so i'm trying to figure bungeecord plugin dev and the tutorial says to use 'getProxy().getPluginManger().registerListener(this, new Events()); but 'getProxy' is unknown

sly crown
#

post code

frank junco
#

public class Main extends Plugin {
@Override
public void onEnable() {
getProxy().getPluginManager().registerListener(this, new Events());
}
}

sly crown
#

post full code

frank junco
#

err

sly crown
#

on a paste service

#

better probably would be a build log or something

frank junco
#

I use eclipse there isn't a build log, it just gives you the errors before even attempting to compile

sly crown
#

JavaPlugin

#

javaplugin isn't plugin

frank junco
#

ah

#

I noticed this too

sly crown
#

you shouldn't have any bukkit refs in proxy code

frank junco
#

still gettin the error ๐Ÿ˜’

#

= S*

#

ah nevermind

#

still had a ref to bukkit's bukkit.plugin

sly crown
#

you literally shouldn't even have a bukkit jar available

frank junco
#

I see

#

completely new tot his bungee thing, Ialways stopped in the past as it was confusing to set it up... but now I have invested time and done it

#

now trying to convert my plugins to work with multi server setup

#

most of whcih is fine now...but i have certain things like 2 plugins trying to update the player list for all servers... so its not usually accurate....

#

I'm guessing since this no longer uses bukkit, it would mean the Scheduler is gone?

#

runTaskTimerAsync etc ?

sly crown
#

bungee

#

is

#

not

#

a

#

minecraft

#

server

#

it's a proxy

spring bloom
#

what's a proxy feelsChromosomeMan

sly crown
#

throw everything you know about minecraft servers out the window

frank junco
#

lol

#

alright

#

I read on the page it said it tried to mimic as much as possible from the bukkit api is why i ask really ^^

#

but anyway you've fixed a major issue i'm sure ill figure the rest out XD

lyric oak
#

๐Ÿค” think its worth submitting some extra native binaries for compression/encrypt? generated a set for arm64... will probably try to get that arm32 ones soon. im... not entirely sure why im doing this either lol

#

cause i can, i think ๐Ÿคท

trail plume
#

I'm not really fond of the idea of pulling in binaries from others

#

Especially as they'll just sit there until they break or are forgotten about

lyric oak
#

fair enough lol. the build script is still pretty much the same, and just have to remove the centos ASM #ifdef if its an arm cpu

trail plume
#

If you wanna PR support for the scripts to build it, go ahead

lyric oak
#

cool, ill open a PR once i can get back near my raspberry pi to check the arm32 builds

#

the aarch64 ones i built using UserLand on android (can run a user-space version of ubuntu there, no root needed for the device either. kinda fancy)

#

can probably just do cross-builds from linux too

sudden mason
#

Is there a from scratch dev env for waterfall?

lyric oak
#

should just need maven

#

./waterfall p && mvn install

fringe aspen
#

๐Ÿ‘€ hi jake

sudden mason
#

๐Ÿ‘€

trail plume
#

It's late for me and I'm tired, I'll sort out travertine in the morning unless somebody drops in a PR for it

random comet
#

dammit was just gonna ask for update

fringe aspen
#

yeh im on it

#

its weekend im a bit in and out

deft trail
#

rootin' for ya @fringe aspen !

#

ooo its pr'd!

#

cat do you think you could merge before u go to bed?

queen cave
#

lol

trail plume
#

I think I dropped out like 20/30 minutes after I said that, lol

stone fiber
#

I didn't make it much past when I merged that either

bleak current
#

.contains("outdated") thonkeyes

#

good to know why lobby server behaves differently, compared to other game servers

harsh harbor
#

I guess because first time updateAndGetNextServer is called, empty server join queue is initialized

#

so no default server returned

bleak current
#

cat when are you going to look at my pr ;-;

bleak current
#
Caused by: java.lang.NullPointerException
    at net.md_5.bungee.protocol.packet.TabCompleteResponse.write(TabCompleteResponse.java:74) ~[server.jar:git:MikroCord-Proxy:1.14-SNAPSHOT:1051ee3:unknown]
    at net.md_5.bungee.protocol.MinecraftEncoder.encode(MinecraftEncoder.java:24) ~[server.jar:git:MikroCord-Proxy:1.14-SNAPSHOT:1051ee3:unknown]
    at net.md_5.bungee.protocol.MinecraftEncoder.encode(MinecraftEncoder.java:9) ~[server.jar:git:MikroCord-Proxy:1.14-SNAPSHOT:1051ee3:unknown]
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.36.Final.jar:4.1.36.Final]
    ... 49 more
[05:17:29 INFO]: [mikroskeem] disconnected with: EncoderException : java.lang.NullPointerException @ io.netty.handler.codec.MessageToByteEncoder:125
#

interesting

#

(i haven't touched that part at all on my fork)

#

i wonder what goddamn thing managed to set suggestions empty

#

... witch hunt begins

weary grove
#

@bleak current Checker Framework is a godsend

#

With it, the proxy wouldn't have compiled

#

I need to put it back on for Velocity... but right now there's tons of compile errors ๐Ÿ˜ฆ

sly crown
#

are suggestions not allowed to be empty?

#

i've had this discussion with people before

#

but no one gave me a conclusive answer

weary grove
#

suggestions shouldn't be nullable

sly crown
#

well, i said empty, not null :P

weary grove
#

an empty list is the Effective Java away to go

#

Yeah, empty suggestions are fine

bleak current
#

yeah bungee api/code generally needs a lot of nullability information

#

or better doc

#

idk

civic valve
#

How much of pain would it be to add 1.6.4 to Travertine

#

or does such a thing already exist

ornate bloom
#

Don't know of one, don't think it'd be particularly hard if you had the experience in general, but Paper team isn't going to maintain that.

#

You'd have to do it on your own and maintain it on your own

#

Since you just need to add proxying support and not that much more, it shouldn't be too difficult from the perspective of someone who has experience with adding protocol support.

trail plume
#

You'd basically need to deal with entity metadata, you'll need to deal with the protocol itself too

#

The latter should be the easy one

bleak current
#

why 1.6.4?

devout iris
#

Because minecraft wasnt horrible back then

bleak current
#

are you sure?

#

:pp

civic valve
#

@bleak current tekkit along side my 1.14.4 server ๐Ÿ˜›

bleak current
#

fair

deft tangle
#

Hello! @trail plume is it possible that the PostLoginEvent is called after the first ServerConnectedEvent one? :/

trail plume
#

Potentially

deft tangle
#

really?

#

gosh, md5 documentation is just garbage xD

trail plume
#

Doesn't look like it should

#

ServCon is thrown from the join game packet

#

And PostLogin should be called just before that

deft tangle
#

hmm, so ServerConnectEvent is always called after the PostLoginEvent, right?

trail plume
#

That should be the case

deft tangle
#

What about the ServerConnectEvent instead?

#

I guess it can be triggered before the post login, am i right?

trail plume
#

It'll be fired as soon as the connection is opened

#

(to the server)

#

The process is weird because you've got the proxy and the server all tryna get together and have a party

deft tangle
#

so in this case it isn't sure that the Connect event is called after the PostLogin one, is that right?

trail plume
#

connect should be called before

deft tangle
#

Ok, thank you! ๐Ÿ˜„

trail plume
#

Honestly, go setup a few listeners and test it ๐Ÿ˜›

deft tangle
#
    @EventHandler
    public void onPluginMessage(final PluginMessageEvent event) {
        if (event.isCancelled()) {
            return;
        }

        // Check if the message is for a server (ignore client messages)
        if (!event.getTag().equals("BungeeCord")) {
            return;
        }

        // Check if a player is not trying to send us a fake message
        if (!(event.getSender() instanceof Server)) {
            return;
        }

        // Read the plugin message
        final ByteArrayDataInput in = ByteStreams.newDataInput(event.getData());

        // Accept only broadcasts
        if(!in.readUTF().equals("Forward")) {
            return;
        }
        in.readUTF(); // Skip ONLINE/ALL parameter
        ....
}

@trail plume i get a EOF exception at the 'if(!in.readUTF().equals("Forward")) {' line, how is that possible? :/

bleak current
#

hello, there is way to detect "fallback_kick"?

#

tried all events and doesn't work

#

Could not connect to default or fallback server, please try again later: io.netty...

tranquil mortar
#

forgive me if i'm breaking any rules, but i'm trying to find a way to port my towny data to the civs plugin. i'm willing to slide some cash for the trouble. i really don't think it's anything too crazy

bleak current
#

first of all you're in wrong channel

bleak current
#

or event for "Exception Connecting", there is way to do this?

#

i need to handle all failure connections

trail plume
#

I wanna say that there is a callback for that

bleak current
#

ok, i will try

deft trail
#

is 200% cpu usage normal for ~200 players?

bleak current
deft trail
#

ok

#

more of a dev question but sure

sly crown
#

"This set"

#

lost your train of thought there cat?

trail plume
#

I thought that I'd zapped that line from the commit message

hidden radish
#

is there an official dependency for the waterfal api?

trail plume
hidden radish
#

ty

wide maple
#

yo I just had a quick question so I thought Id pop in here

#

I need to edit something on Waterfall, how would I do that? Importing the source generated by ./waterfall p yields me nothing but pain and suffering because of countless java logic issues that seem to normall compile fine?

trail plume
#

You need the lombok plugin

wide maple
#

I tried it both in Eclipse and IntelliJ with that plugin

trail plume
#

It's annoying and stupid but we're subject to the hells of upstream ๐Ÿ˜ฆ

#

it should work fine if you have that plugin installed, make sure that it's actually fully enabled

wide maple
#

do I need to do anything else? I am still having the same issues, I tried reinstalling it- I know I have installed it in my eclipse attempt correctly too as I had to patch the binary to allow arbitrary loads (stupid macOS)

trail plume
#

got an example of an error it's showing?

wide maple
#

sigh this is why it always pays to ask for help. It just stopped happening. Thanks

#

Ill go cry in a corner now

lean gobletBOT
#

:D

wide maple
wide maple
#

I got another question, how do I run my changes without having to create a patch from it?

#

or is that not possible?

trail plume
#

compile with maven as normal

wide maple
#

just mvn package ?

trail plume
#

yup

wide maple
#

run that on the proxy or on waterfall-super?

trail plume
#

in -super is fine

wide maple
#

dangit had something that made it loop, well obviously that works now too. thanks again

#

I hate to ask again

#

but

#

If I wanted to register an intermediary between the server connector and player

#

where would I do it best?

#

In the Server connector or in the user connector

trail plume
#

take a look at where the server sets up the handlerboss

#

bosshandler, I mean

#

No, right the first time

#

\o/

opaque imp
#

Hi, quick question: what is the purpose of the offline uuid?

#

I see a user seems to have a public uuid (assigned by mojang?) and and offline one, that seems to originate in the MC server waterfall connects you to

civic valve
opaque imp
#

Thanks for that, makes sense!

opaque imp
#

@civic valve I set ip_forward: true in config.yml and restarted both the MC server and the proxy, but I'm still seeing the offline mode uuid

#

Do I need to remove the playerdata ?

#

Also not seeing the "external" ip

civic valve
#

did you enable offline mode on the spigot/paper side?

opaque imp
#

not on paper side, that is likely the reason

#

Enabled bungeecord in paper and that fixed it. Thanks @civic valve !

harsh aspen
#

Is possible let BungeeCord send a empty chunk to player?
Just let player won't join any server but remove the Joining server screen

#

Want let player stuck in bungee but can see the chat(remove the loading screen)

idle lance
harsh aspen
#

yes i post it to spigotmc

trail plume
#

Possible? Yes, but there is a bit more to it than that

#

There is software which basically acts as a minimal server to keep the client in a limbo state, no idea what they support in terms of actually presenting some form of world however

ornate bloom
#

Oh yeh, what was that server called?

trail plume
ornate bloom
#

Nice, thanks

harsh aspen
#

Got it, thanks!

devout iris
#

Oh 2b2t is also using this

brazen walrus
#

Ah that's really nice

#

Is there any easy way to teleport all players from the limbo back to their server once it's back up or do I have to code something?

#

Like a "temporaryFallback" option

lean gobletBOT
#

No, as bungee would have no real way to know that it's back up

brazen walrus
#

true, there's no permanent connection between the proxy and the server ๐Ÿ˜ง

#

that's fine, it's probably not that hard to do

bleak current
#

if i perform a non-async database operation when the join event is fired will it hang the logging in... process for just one player or the entire proxy?

violet saffron
#

It will hang the entire proxy

brazen walrus
#

performing blocking operations (such as I/O, fetching remote URLs, querying a database, ...) will hurt proxy performance.

Always run blocking tasks asynchronously.

bleak current
#

alright

#

thought so, thanks

#

typhoonlimbo is kinda broken

#

until someone finds time to fix it (i still haven't managed to find time for that), then it's better to run an empty server with void world for limbo

#

i made a server with gm3 & clojure script setting speed to 0 to disable movement

#

does typhoonlimbo just spawn the player in a empty end world?

#

pretty much

#

ah i was wondering how they got that sky effect

#

well it doesn't send any chunks though

#

afaik TL has following problems:

  1. players ping timeout suddenly, i even reported that issue
  2. still can't handle plugin messages properly
  3. login process is holy shit how bad - take a look by yourself
  4. ^ also that's why you cannot implement Velocity modern forwarding support into it without dumb hackery
bleak current
#

Hello, is there any way to get the Forge mod list / detect if the player uses Forge?

trail plume
#

once the handshake has completed, there should be a method to get it

bleak current
#

In which event?

trail plume
#

There is no event for it

#

It occurs as part of the forge handshake process

#

Information is exposed on ProxiedPlayer

bleak current
#

I tried this but not works (says every time that I not use Forge):

@EventHandler
    public void onConnect(ServerConnectEvent e) {
        ProxiedPlayer pp = e.getPlayer();

        if (pp == null) {
            return;
        }

        if (pp.isForgeUser()) {
            Map<String, String> mods = pp.getModList();

            System.out.println(pp.getName() + "'s Forge Mods (" + mods.size() + "):");

            for (String key : mods.keySet()) {
                String value = mods.get(key);

                System.out.println("* " + key + ": " + value);
            }
        } else {
            System.out.println(pp.getName() + " is not using Forge.");
        }
    }
trail plume
#

Too early

#

There isn't even a connection to a server yet for a chance for the handshake to have occured

#

With also noting that this won't work unless they connect to a forge backend or you have something on the server that's going to simulate that handshake and trick the client into sending its side of the puzzle

bleak current
#

use whatever fits for your use-case

#

:p

trail plume
#

it wouldn't

#

Waterfall isn't sharing state across servers

#

That's irrelevant to waterfall

#

That would be plugin territory, waterfall doesn't deal with syncronization across instances whatsoever

#

It wouldn't

#

For any gains it would literally require waterfall to actually implement some form of state syncronization across servers

#

We have no intent of providing features like state syncronization

#

People would want a level of customization that can easily already be provided by existing plugins

#

I've said that it's out of scope twice now

#

Because you didn't just ask a simple question, you started pushing something which doesn't make sense even after I said that it's irrelevant to waterfall

#

wut

#

You asked about shoving a framework into waterfall to improve performance

#

I said it would be irrelevant as waterfall doesn't do anything related to what that framework does

fringe aspen
#

What it sounds like is you have a problem on your network that is unique to your network, that your trying to get waterfall devs to solve for you.

brazen walrus
#

If I call ProxiedPlayer.connect while the specified server is down, the fallback_kick chat message is sent to the player

#

Could not connect to a default or fallback server, please try again later: io.netty...

#

can I disable this message?

#

doesn't seem so

cyan garnet
#

is there some way I can send a message to a server when a player is switching to it, before the player joins?
ex, player goes from ServerA to ServerB and ServerB get's a message "SomePlayer is joining from ServerA"?

trail plume
#

Use a proper pub/sub service

cyan garnet
#

I'm using JedisPubSub atm but it's taking 80-200 ms for ServerB to get notified about it

#

so it's received after the player joins

harsh vine
#

is it just me or are world chunks not being unloaded. is this just a waterfall thing?

spring bloom
#

this is a 1.14 thing

harsh vine
#

do you know of any workaround?

spring bloom
#

there is none

harsh vine
#

O_O

silent token
#

Workaround: don't use 1.14

spring bloom
#

you need to consider why they wont unload

#

and the reason is because the system is set up to keep certain chunks loaded as long as they have a ticket for them

#

i.e players and spawn

harsh vine
#

I removed all the players from that map... hmmm

spring bloom
#

so, if you want to unload chunks

#

remove the players

#

set keep spawn in memory to false

#

that should hit most chunks

#

plugins can also keep chunks around via api if they want to

harsh vine
#

i haven't looked at that spawn stuff ill check it out ty

#

huh yeah im kinda at a loss, I did everything you mentioned. still no lock

harsh vine
#

Oohhhhhhhhhhhhhhhhhhhhhhhhhhhh updating to the latest paper.jar worked. LETS GO!!!!!!!!!!!!!!!!

autumn storm
#

Hey guys. Iโ€™m developing a new mod pack that requires a massive amount of chunks be loaded per dimension, hence why waterfall is the only real solution for me. I have not even started testing or even any coding but I was wondering if anyone knew/has any advice on how I could transfer data between between my server networks. I have a sql db but iโ€™m not entirely sure where to start to make it โ€œseemโ€ like the different servers are normal โ€œparallelโ€ dimensions. I would need to somehow simulate transfer of Items(AE2 networks) and energy (maybe simulate some kind of interconnected channel network?).

trail plume
#

Not really waterfall-dev stuff, and honestly, going that deep would likely be a killer

bleak current
#

cattew, review my pr pls ;-;

final shadow
#

๐Ÿคฆ

#

@trail plume reopen my issue pls

trail plume
#

Basically, no

#

You put the proxy into offline mode, which intentionally tells it not to contact mojangs API

#

We have no interest in changing that behavior and breaking peoples setups, nor do I have interest in maintaining an option for such a feature

final shadow
#

offline mode means there's no authentication with proxy

trail plume
#

No, offline mode in waterfall.yml means "do not contact mojangs API"

#

I mean, the config.yml for bungee/waterfall

bleak current
#

just install SkinsRestorer, how hard is that?

rough folio
#

i added a thing in bungeecord to make it so that a proxy can intake ip and uuid forwarding information from another proxy, so as to allow a proxy in a proxy which i need for a thing i'm coding

#

what's the likelyhood of such a pull request being accepted?

ornate bloom
#

probably never

#

as it's always a bad idea

bleak current
#

why do you need proxy in a proxy O.o

rough folio
#

it made so many things much much easier

bleak current
#

like?

#

why can't you e.g use dns round robin? why can't you use haproxy?

rough folio
#

nono different purpose

#

I think you've seen it elsewhere

#

but basically a thing to spread the load on a server

#

to link multiple servers together and teleport players from one place to another

trail plume
#

I've considered allowing such things in the past

#

But it always comes back to the "somebody has to maintain it" type issues

rough folio
#

take Skyblock, I coded a thing to conveniently arrange islands on more than one server

#

while still linking chat, messages etc

#

bungee was stopping me in two ways, 1) it was not allowing proxy to proxy at all (would say "can't connect to myself"), 2) it wasn't forwarding ips and authenticated uuids

#

so I fixed both issues

#

well I "duck taped" the first issue and actually implemented incoming ip forwarding for the second

#

not duck, duct

bleak current
#

so you're basically doing what you can do fine with non-proxy-in-a-proxy solution

#

and proper plugins

#

whatever floats your boat, but proxy in proxy solution can spawn flame spitting dragons easily

trail plume
#

tldr; "You're shooting yourself in the foot and I have no intents of being part of this" ๐Ÿ˜„

bleak current
#

:p

rough folio
#

I found it convenient

ornate bloom
#

it's always a bad idea

#

said it earlier

#

stick by it

rough folio
#

the plugin running on the subproxy knows by default all the players connected to the servers

#

the server component doesn't need to know of any extra servers that it never should connect players directly to

bleak current
#

you're using proxy in proxy solution to basically group gamemode servers

#

correct?

rough folio
#

well just one for the moment

#

yea the subproxy connects to a spawn server and as many island servers as you need

#

we're releasing on the 11th and I started a few weeks ago, not one situation where I regretted not using the same proxy

#

oh and think of plugin updates, I would have to shut the whole network down

trail plume
#

No?

ornate bloom
#

lol

rough folio
#

tell me about it then

ornate bloom
#

Draining is a very basic concept in load balancing.

#

I suggest you learn about load balancing

#

What you're doing is a really cheap imitation of it, probably.

bleak current
#

your solution gave me an idea for proper server grouping tbh

#

going to put something together today very likely...

rough folio
#

I'm open to criticism, I just don't accept people shutting down the idea from the beginning

trail plume
#

The thing is is that you really solve nothing that you couldn't solve in code

#

All you do is introduce another layer of a tool which is pretty much a hack into the line of the connection

ornate bloom
#

Yep, wasn't intended to be used this way

bleak current
#

short explanation:

  • i'll extend ServerInfo class to have boolean which tells me whether it's server group info
  • i can specify what server groups contain what servers (skyblock -> sb_1 sb_2 sb_3)
  • connection to servers is decided by picking next one from list or using one with least connections
ornate bloom
#

You should be doing what you're doing with plugins.

rough folio
#

I mean I'm coding a plugin for it haha do you think I'm literally only adding an extra bungee

trail plume
#

(And bungee does explictly block those connections for a reason, part of that reason is because of a bad bungee release, but allowing it on our side is just kinda... It's not something I'd be happy to take the hit of dealing with any issues that arise

bleak current
#

also cat you're awake can you please do something with my PR please :D

trail plume
#

No

ornate bloom
#

Pretty much "proxy in a proxy" gets shutdown because it's a non-starter.

bleak current
#

:(

trail plume
#

Never

ornate bloom
#

It's never the right solution

trail plume
#

I need to catch up on PRs, just eveerrrything is going to hell \o/

rough folio
#

again, you're shutting the idea down without giving a valid point

ornate bloom
#

It is not its intended use case and issues arising from it are unsupported

#

Like I said, it's a non-starter

rough folio
#

I'm not asking for support lol

ornate bloom
#

A plugin will cleanly accomplish these goals using the supported mechanisms

#

Then you do you

#

But be ready for criticism

rough folio
#

again, I'm open to criticism

#

not as open to people saying it's bad, full stop

ornate bloom
#

It's bad, and so a PR likely won't be accepted, unless cat has other thoughts?

trail plume
#

as I said, I was considering at one point, it's just the burden of support that arises from it which I just really don't wanna

ornate bloom
#

yeah because it becomes one of the use cases you gotta support

rough folio
#

I raised the point of being able to push updates without shutting the main bungee down, still no valid alternative was raised

trail plume
#

That's pretty easy

rough folio
#

you can always disclaim haha

trail plume
#

And I've gone over this simple technique dozens of times on this discord and other places

#

You pull the outdated servers out of circulation

rough folio
#

connection is going off and on if I stop replying for a while

#

oh right we do that already with the main proxy plugin, really not sure how that's less of a burden to you

trail plume
#

hm?

#

"less of a burden to you" is what I don't understand

rough folio
#

having to switch DNSes and reroute connections twice just because one gamemode needs updating seems to add an issue rather than solve it

trail plume
#

if you're being sane you automate this stuff

rough folio
#

even then, DNS changes take a while for people to acknowledge them and it makes changes less instant

#

I perfectly agree with you for network updates tho

trail plume
#

How fast DNS updates depends on how you configure it

rough folio
#

and that's what we do already

#

of course, but you need to rely on computers to actually follow your instructions

trail plume
#

Sure, you'll always have some level of caching involved with DNS, but low TTLs ain't revolutionary

#

I also don't see how that helps, as you still have your outer edge which needs rebooting to update

rough folio
#

there's nothing going on on the main proxy

#

the proxy connects to a server which could be anything

trail plume
#

And so, your solution to not being able to roll updates out, is to literally have a single point which you can't do that with?

rough folio
#

elaborate

#

not sure what you mean

trail plume
#

Sounds like instead of addressing a fundimental issue, you opted to work around it, or you've literally already got the solution there but aren't applying it

rough folio
#

for the record updates is only one of the advantages I've found

trail plume
#

I mean, proxy in proxy will work

#

It's just one of those things where I can't really see a sane reason why you'd want to do it outside of not wanting to solve other issues

rough folio
#

do you not acknowledge a single advantage to this solution? I understand how you wouldn't want to support the feature in the future, but I'm not sure if you're still 100% no on the topic

trail plume
#

I can see advantages

#

But, those issues can be solved elsewhere in a manner which the software actually supports

rough folio
#

or the other way around ๐Ÿ˜ƒ

#

point is, and I give it to you, people would start using this setup as a round robin

#

which is obviously wrong

trail plume
#

Personally, I think it's stupid and there are obviously better solutions out there than adding another layer of hack

#

In terms of the project, it's not something I have an interest in supporting

rough folio
#

and from my perspective it's brought more good than it has taken away, but fair enough I respect your view

#

also any plans on actually adding implementations of Tablist?

#

I see there's some todos but I'm not sure if that's on you or on md5

trail plume
#

todos are mostly on mds side

bleak current
#

that's upstream (read: md5) side

trail plume
#

There is some level of "if I touch stuff, I break bungee"

rough folio
#

wdym haha

trail plume
#

Forge 1.13+ is on my todo list

#

But honestly, for that, I kinda wanna see if it's viable to rip apart bungees existing implementation

#

Buuuuut I can't do that because then I break other stuff that depends on that

#

(and md has stated he has no intent of supporting forge going forward, so this is the joyous fun moments of maintaining waterfall...)

rough folio
#

cuz you're taking about waterfall ye?

#

ah right haha

bleak current
#

anyway if you want entirely custom stuff or just to experiment, make your own fork like i did

rough folio
#

yea thats what I'll probably do, only burden on me is to keep pulling from upstream every now and then

bleak current
#

see how travertine is built

trail plume
#

Yea, literally just fork travertine

bleak current
#

i copied scripts from travertine, renamed them and that's it

spring bloom
#

mikro cord

bleak current
#

dab

trail plume
#

no issues tab

#

plz

spring bloom
#

no issues exist if you don't have reports

bleak current
#

tada

ornate bloom
#

better than leafcord, which is a burning pile of crap

bleak current
#

my fork has bunch of questionable patches as well :D

#

like i said... just to experiment peepoeyes

spring bloom
#

mfw bytecord talking trash

ornate bloom
#

no, just talking to trash

#

there's a diff ๐Ÿ˜‰

spring bloom
#

ok

bleak current
#

let's pull leaf's cord

#

rip leaf

rough folio
#

I'll look, on the phone now, thanks tho!

wide maple
#

Okay this is a bit of a tricky question- is there any sort of endorsed way to add protocol translation adapters to Waterfall? I am doing what ViaVersion is but it just isnโ€™t gonna cut it

trail plume
#

No

#

Basically, such behavior will never be endorsed

#

and honestly, doing it on the proxy is probably the worse way

wide maple
#

Yes I understand that fully. The issue is that I am facing a ton of different server implementations

#

And working with each on that level is next to impossible

trail plume
#

Basically

#

the way viaversion does it is probably the best way

#

No matter what you're going to have to hijack the networking stuff to inject into there

#

be that directly via a plugin or modifying the server itself

wide maple
#

^ what I mean by that is that I am working with bedrock servers. I am a moderator and dev for Waterdog and the ton of different implementations for bedrock servers make this extra hard

trail plume
#

The way viaversion itself does it is cleaner in some ways, but you do hurt yourself in the long run from it

#

and bedrock is going to be a whole different beast

wide maple
#

You ever heard of Waterdog? A waterfall fork that supports bedrock and servers and players

trail plume
#

Are you actually wanting to do translation between versions or just support passing connections through?

#

and I've seen it

wide maple
#

Yes as an addon

#

Because thatโ€™s really not the point of Waterdog as a whole

trail plume
#

Basically, the way that viaversion does it is more maintainable in the long run

#

But also not the best in terms of compat/performance

wide maple
#

Yes I know but for me that way is next to impossible to use because of the oddities raknet brings

trail plume
#

like what?

#

if you know the two versions surely you can just rewrite stuff as needed

#

You are going to have to figure out how to handle data changes between the two versions, e.g. items, etc

wide maple
#

Yes but translation between java and bedrock and back is a bit more on the taxing side of things

#

Oh yea also, what qualifies someone as No table here?

trail plume
#

That's going to be shit no matter how you do it

wide maple
#

Yea but I knew that before I started it, haha

#

Well back to making API for the protocol adapter

#

Thanks for the quick response I really appreciate it

trail plume
#

Really shoulda forked travertine insteada waterfall

wide maple
#

It has the Travertine patches

#

I added those later on

trail plume
#

The difference with forking travertine woulda been that your patches woulda been solely over waterfall vs being a mangle of waterfall and your own set of patches

wide maple
#

Yea I have to fix that in the near future

#

Even with all this Waterdog is now surprisingly stable. 104 pocket edition and 51 java edition players at once and still going strong

#

Sadly that makes Waterdog the only real bungee solution for bedrock that doesnโ€™t depend on one server implementation (like synapse)

cyan garnet
#

How do I run a task in the main thread from the proxy scheduler?

trail plume
#

There is no main thread

cyan garnet
#

ah

#

ok ๐Ÿ˜„

fossil gull
#

Is there a way to get the current server a player is on it? I tried that with p.getServer().getInfo().getName() but somehow it returns null

chilly coral
#

When the player is nowhere, p.getServer() is null

#

A player is nowhere when he's connecting, or when the server he was on just shut off and no server where available.

fossil gull
#

I'm using PostLoginEvent and get the player with ProxiedPlayer p = e.getPlayer(); I'm connected to the lobby server so it should be working or not?

chilly coral
#

If u are getting a null value, it's that at this moment you are not connected yet to your lobby server

ornate jasper
#

yeah postlogin is proxy login, not server login

#

i believe theres serverconnectedevent

#

or something along the lines

idle lance
#

@spring bloom You don't need your packet limiter due to waterfall having it?

spring bloom
#

does waterfall limit packets

sly crown
#

no

spring bloom
#

that solves that

idle lance
#

#PRThePacketLimiterIntoWaterfall

fossil gull
#

@chilly coral Do you know how i can check if the player is connected and then show the current lobby?

bleak current
#

electtron

#

are you here?

trail plume
#

if you could not ghost ping that would be greeat

chilly coral
#

@fossil gull what do you want to do exactly ?

fossil gull
#

When a player comes to the server, the current server should be displayed in the tablist. Example: Lobby-1 / Lobby-2

chilly coral
#

You are not using the good event

#

PostLogin is triggered after the mojang authentication

#

The good event is ServerConnectedEvent i think

cyan garnet
#

Hey, if I send a player to another server that's down, how do I know that it's down? and how do I cancel sending the player?

ornate bloom
#

As far as I know, Bungee doesn't know if a server is online, it just tries to forward the connection regardless (might be wrong)

#

So you may need to use a messaging system to determine that.

#

Messaging/caching

cyan garnet
#

yeah, thinking about sending a message to bungee to cancel the join event for the player

#

so like after 10 ticks, send the uuid to bungee

#

with redis or something

ornate bloom
#

Well, or really just dynamically add/remove servers to Bungee based on whether the server is online, determined by messages

#

Can't join a server if it's not added

trail plume
#

Yea, bungee just tries to connect them, which is really the only reliable way to tell if you can connect

#

Real downfall is that it didn't look like it gave you much in the means of trying to control the outcome

ornate bloom
#

Yeah, since you can't control the outcome, you have to control the process.

cyan garnet
#

yeah, kinda hard when it's all on the paper nodes and not bungee

ornate bloom
#

Servers I know that do this usually just use something like Redis along with preventing players from trying to connect to a server if their state is offline according to the Redis cache

#

You can also use Redis of course to send messages indicating that a server has gone offline or come online

cyan garnet
#

Gonna try it out, thanks ๐Ÿ˜ƒ

warped loom
#

guys I'm new to Waterfall programming

#

do I have to add Waterfall as external library?

#

or do I have to use BungeeCord

sly crown
#

it's a drop in replacement for bungeecord

#

everything in bungeecord is in waterfall

upper fiber
#

Is there a way to get the dynmaps from two Waterfall-Servers onto one Page so its possible to switch between them on the sidebar?

wild nova
#

FIX the food dupe u dumbfucks

trail plume
#

Throwing attitude in the completely wrong channel, 10/10

red tangle
#

What ? I though calling developers names in completely unrelated channel guarantees fixing of any issues

night oriole
upper fiber
#

Already tried that, but cant download it as the external site does not exist anymore

night oriole
upper fiber
#

Oh... didnt see that, thanks

night oriole
#

Did you give up very quickly? ;p

upper fiber
#

I have to admit that waterfall is kind of low priority right now ๐Ÿ˜‡

night oriole
#

Errr... Waterfall?

#

Waterfall is proxy.

#

You run Dynmap on Spigot/Paper/Bukkit.

upper fiber
#

I know

night oriole
#

Dynmap-MultiServ just merges several Dynmap maps from several Spigot/Paper/Bukkit servers.

#

into one solution for a website.

upper fiber
#

But I use waterfall to run/proxy these servers...

night oriole
#

Yes?

upper fiber
#

Yes

void lion
#

Hello !
Any ideas when p.getViewDistance() will be back on paper 1.14 ?

trail plume
#

whenever somebody gets to fixing it

#

There is a PR open on the tracker, beyond that, wrong channel

spring bloom
#

I've delayed fixing it until per-player mob spawning is approved & merged

#

contains the util I want to use (and will have to use) for it

#

LOL

trail plume
#

I totally didn't forget to go do that

void lion
#

Okay thanks

#

Good luck x)

cyan garnet
#

Any way to send a player from ServerA to ServerB from serverB?
Like have a plugin on ServerB tell bungee to send the player over?

trail plume
#

Yes

#

You just need a way to speak to the proxy

#

Whiiiiiich if there are no players online on server B, you'd need to use a proper messaging service

cyan garnet
#

ah crap, was worried about that :/

#

will use redis as I already have that setup

bleak current
#

@cyan garnet you could also use RMI if you're only interacting with JVMs c:

cyan garnet
#

rmi?

#

The servers aren't on the same machine, and already set it up with redis.
I send the uuid and target server on a channel and send the player when bungee gets it ๐Ÿ™‚

bleak current
#

you can do rmi accross separate machines iirc

#

but yea in that case just use redis and ignore me xd

mint snow
#

How can I geht players which are nearby a Player?
Could this work? java List<Entity> nearbyPlayers = ((Player) sender).getNearbyEntities(<distance/2>).stream().filter(e -> e instanceof Player).collect(Collectors.toList());

shell lagoon
#

That should work, yes.

mint snow
#

and how to get Player objects from the Entity objects?

shell lagoon
#

Since you know that the entities are players, you can cast them.

mint snow
#

okay.

#
List<Player> nearbyPlayers = ((Player) sender).getNearbyEntities(32,256,32).stream().filter(e -> e instanceof Player).map(e -> (Player) e).collect(Collectors.toList());```
right?
shell lagoon
#

Yes, that should work.

mint snow
#

Thanks a lot!

tribal jacinth
#

i recall a conversation here about the performance difference between getNearbyEntities and manually comparing player distances

#

bottom line was that the former is more performant for smaller ranges

#

but for anything larger you want to look at the players' distances instead

dark perch
#

Does Bungee/Waterfall inlcude MySL

#

MySQL?

#

or jdbc?

bleak current
#

Probably @dark perch

weary grove
#

yes

dark perch
#

Ty

bleak current
#

or jdbc

#

uhhh

#

jdbc is part of java?

#

but yes, it does include MySQL

#

however bit old library

trail plume
#

one day we'll get updated libraries

bleak current
#

but muh backwards compat?

weary grove
#

heh

#

I made the decision to not include any DB connectors in Velocity

#

Our network uses PostgreSQL ๐Ÿ˜‰

bleak current
#

is there a way to stop my plugin from starting in onenable?

bleak current
#

setEnabled(false) and then return early

bleak current
#

Should Plugin have a setEnabled() method?

bleak current
#

Neither Bungee nor Waterfall provides that method though.

#

yeah i cant find it

#

As a temporal solution, you can return early and inform the console that the plugin is not going to work.

#

yeah i was thinking just doing that before registering anything

#

However, I don't think this is a good idea to implement this kind of system to Bungee as this may break a lot of plugins since they don't actually except plugins to be loaded but disabled.

bleak current
#

ahh shit

#

yeah it does not exist on bungee, my bad

#

it's only on bukkit

bleak current
#

Hello.
I would like to ask you what does "forge_support" do when I set it to "true"?
I can send messages with my Forge mod to the PaperMC server throught a channel?
Version: 1.14.4

sly crown
#

that is entirely independent

#

the plugin channel system works regardless of whatever else

#

that's a mojang protocol, not a bukkit/bungee one

trail plume
#

1.14 forge isn't supported at all at this point

dusk crescent
#

hey, how to get the Protocol version from a server in my bungeecord network?

#

ah got it

#

e.getTarget().ping((arg0, arg1) -> {
if (e.getPlayer().getPendingConnection().getVersion() != arg0.getVersion().getProtocol()) {
e.setCancelled(true);
p.sendMessage(new TextComponent("ยงcDer Server, den du betreten mรถchtest, ist auf einer anderen Version."));
}
});

dark perch
#

As Bungee supporting ProxiedPlayer#isForge, there is a method to retrieve client mod list'

#

?

bleak current
#

yes

#

but you also have to make sure that something handshakes with forge

deft trail
#

i think ive tried for months to get something like that working

#

mostly trying spigot behind bungee

#

never could figure it out lol

bleak current
#

though not sure how up to date their docs are with Forge

weary grove
#

@bleak current Saw your zlib-ng stuff in MikroCord (since at Mineteria we are looking to squeeze even more performance and reduce the time people have to spend for server switches). So zlib-ng has now landed for Velocity 1.1.0.

bleak current
#

๐ŸŽ‰

weary grove
#

I also made sure it actually did result in a perf boost by profiling it locally. I'm satisfied with the results of my testing.

bleak current
#

i don't know proper ways how to profile it

#

how did you, and can i see the results?

#

i just threw it in, still have profiling task in my todo list but never managed to allocate time for that

weary grove
#

my methodology was pretty unscientific

#

yourkit (async sampling woo!) + flying around

bleak current
#

lmao

#

fair enough

#

though i'll try to port bungee api on top of velocity (as a plugin) this week

#

because why the fuck not

#

inb4 i'll succeed and velocity usage ramps up

meager shadow
#

Hey, does anyone know what repo/dependecy to use for plugin development using maven?

sly crown
meager shadow
#

Lol didn't see that. This channel seemed like the right place for this haha

sly crown
#

yea but it was literally just answered there

meager shadow
#

Yes, thanks! ๐Ÿ˜

ornate jasper
#

I'm having issues generating docs for waterfall

#
[ERROR] Exit code: 1 - /var/lib/jenkins/workspace/WaterLand/WaterLand-Proxy/api/target/generated-sources/delombok/net/md_5/bungee/api/connection/Connection.java:5: error: package net.md_5.bungee.protocol does not exist
[ERROR] import net.md_5.bungee.protocol.DefinedPacket;
[ERROR]                                ^
[ERROR] /var/lib/jenkins/workspace/WaterLand/WaterLand-Proxy/api/target/generated-sources/delombok/net/md_5/bungee/api/connection/Connection.java:76: error: cannot find symbol
[ERROR]         void sendPacket(DefinedPacket packet);
[ERROR]                         ^
[ERROR]   symbol:   class DefinedPacket
[ERROR]   location: interface Unsafe```
#

getting that

#

many times

#

mvn -B -s /var/lib/jenkins/ws-conf/nexus.xml source:jar javadoc:jar javadoc:aggregate deploy -Dbuild.number=$BUILD_NUMBER -P deployment thats the command i run

marble flint
#

I want to create a TextComponent chat message. I tried several things but every time the line breaks are in the mid of a word. I tried ComponentBuilder and TextComponents but I'm unable to find a way that the line breaks are not in the middle of a word. What's the reason for that "let's split words". The ComponentBuilder works fine on spigot

trail plume
#

Waterfall uses the same API as bungee which is also used in spigot

#

We don't get to control where the client splits text

marble flint
#

okay, leading whitespace in a text component is evil. new ComponentBuilder(..).append(" this will break things").create(); vs new ComponentBuilder(..).append("this will work fine.").create();

brazen anvil
#

Helllo,
I have write an custom an custom event system (for have same event on bungee and spigot). For this i have copy waterfall-event and methods for register listeners and call event on PluginManager.
This is perfectly work but on Intellij idea the event is not recognized as an even (so he says the method is not used) :(
I search how i can obtain the result of 2.

Thanks.

Difference :

storm panther
#

@brazen anvil you could potentially alt+enter on the method name "onCooldownEnd" and see if there's an option that reads something along the lines of "disable inspection of methods annotated with @EventHandler"

shell lagoon
#

If that doesn't show up, go to Settings > Editor > Inspections > Java > Declaration redundancy > Unused declaration > Annotations and then Add Annotation Class.

brazen anvil
#

Oki, hanks but what is the reason have different behavior between my event system and bungee or bukkit event system

shell lagoon
#

It might be that you only marked that method as an access point, or based on some other pattern that isn't there. IntelliJ also often does its own checks in the back to automatically help you, so IntelliJ may have decided at some point to mark those methods as access points, but not the other one.

brazen anvil
#

oki, that is strange

trail plume
#

Something sent a bad packet

#

It should disconnect them, there ain't too much we can do given that the app has a singular job which is to handle connections

#

Hm, we could avoid the exception

#

Not in all of the cases, only some specific ones

#

e.g. the one you linked there, we can't really do much about

#

Actually, the one you linked first, we can't do too much about

#

The issue is really down to how packets are sent, if a packet is truncated, we can't really determine that too well

#

(If they have some marvellous fix for that stuff, they should really PR them vs tryna keep them private, but you know, what does software licensing stand for... :L )

bleak current
#

theoretically you can check if most packets are truncated or not

#

if you think then all packets must consist of minimum n bytes - gets trickier with packets which contain variable length data, but if you think how vanilla works then you kinda can enforce even stricter limits (e.g plugin message payload is never empty)

real cave
#

You can, but people will just start sending garbage above the minimum. The correct solution for this is to temporary ban the ip address that spams this, just like with any Ddos.

bleak current
#

mnyeah in the end checking if packet is truncated wastes performance

#

only a little bit, if done correctly

#

so one should simply check how many bad packets said IP sends and then slams with ban

cyan garnet
#

How would you guys write a cross server homes plugin?
Store each players home on the bungee and have the bungee instance handle the commands and tab completions etc and have plugins on each server that handles teleportation.
Or have each server keep a record of the homes across all server and make them send the player and the coords over to the target server

grizzled thistle
#

I would have a temp cache for each server and whenever they leave, store their homes in a database from the cache and then clear their cache. Then when they join, cache their homes from the database.

#

or you could just store all the data on bungee with whatever, and use plugin channels or sockets to send/update the data which wouldn't require a plugin for every server

thorny holly
#

What context should I provide if I'm trying to serialize/deserialize a TextComponent?

#

nvm, discovered ComponentSerializer

stark bone
#

In waterfall, should each command have its own class?

bleak current
#

in waterfall (and bungee), that's the only way to do commands iirc

warped loom
#

if I register a command for Waterfall/bungeeCord will it automatically work on every backend?

#

or only on the proxy server

bleak current
#

as proxy processes commands before any other server, then it'll technically work anywhere

#

except that servers won't know about it, unless you set up some kind of a special communication

stark bone
#

I'm probably doing this incorrectly. I'd like to get the ServerPing result out of the Callback some how and use it to make a queue system and monitor playercount. Am I going about this the wrong way using ServerInfo.ping() ?

Ideally I'd like Waterfall to monitor player count on a sub-server and when a slot is available send the queued player. However, the only way I see of getting playercount and maxplayers is using ServerInfo.ping()

weary grove
#

ServerInfo#ping() is pretty the way you'd want to do it

stark bone
#

I'm having some trouble with plugin messaging. BungeeCord doesn't seem to recieve said message. Here is some code:

//SpigotMain.java
getServer().getMessenger().registerOutgoingPluginChannel(this, "myserver:commands");
//Spigot Message sender thingy
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF(((Player) sender).getUniqueId().toString());
out.writeUTF("creative");
((Player) sender).sendPluginMessage(SpigotMain.INSTANCE, "myserver:commands", out.toByteArray());
//BungeeCord listener
    @EventHandler
    public void onPluginMessageReceived(PluginMessageEvent event) {
        System.out.println(event.getTag());
        if (!event.getTag().equalsIgnoreCase("myserver:commands")) {
            return;
        }

However, it seems myserver:commands is never outputted in waterfall when I run the commands, which seems it's not reaching bungee

#

Only thing is outputted is:

[01:38:03 INFO]: BungeeCord
[01:38:03 INFO]: BungeeCord
[01:38:03 INFO]: BungeeCord

and a few minecraft events when I join fir the first time

#

unless I have to do like "bungeecord:myserver"? Let me try that

#

no dice. :/ i'll keep testing

stark bone
#

Ahah! Fixed it. I had to do:

getProxy().registerChannel("myserver:commands");
coral lichen
#

Which is called first? PlayerHandshakeEvent or PreLoginEvent?

bleak current
#

handshake

coral lichen
#

is there any event / way for me to cancel a connection before that (for example by injecting into netty?)

bleak current
#

why do you need to do that?

#

do you want to reject connection based on ip or something?

coral lichen
#

yeah

#

want to do a firewall against minecraft botting

#

if i do it on PreLoginEvent it's already going to be screwing up the bungee

#

if i do it when the connection actually starts i have the benefit of blocking the connection before it becomes a real issue

bleak current
#

fair

#

yeah inject something in front of the pipeline

stark bone
#

similar to ```java
getProxy().registerChannel("myserver:commands");


is anything like this needed on Paper/spigot to register custom incoming channels opposed to the default ones
bleak current
#

getServer().getMessenger().registerIncomingPluginChannel(<your plugin instance>, "myserver:commands", <instance of PluginMessageListener>);

stark bone
#

Yep I have that all set, however, it doesn't seem to be recieving anything

bleak current
#

well i use that in my plugin

#

works fine for me

stark bone
#

and you use a custom channel, like "myserver:commands" not just bungeecord?

#

ideally wanting to do a cross server TP. so, this is the main bit of code atm

#
player.connect(target.getServer().getInfo(), new Callback<Boolean>() {

    @Override
    public void done(Boolean isPlayerConnected, Throwable error) {
        if(!isPlayerConnected) {
            player.sendMessage(new ComponentBuilder(Main.PREFIX).append("Error connecting to server").reset().create());
            return;
        }
        
        //Output teleport command
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeUTF("teleport");
        out.writeUTF(player.getUniqueId().toString());
        out.writeUTF(target.getUniqueId().toString());
        player.sendData(Main.PLUGIN_COMMANDS, out.toByteArray());                                
    }                        
});    
#

So this teleports me to said server, but the datastream isn't being picked up by Paper which is along the lines of

#

Spigot Main

getServer().getMessenger().registerIncomingPluginChannel(this, Main.PLUGIN_COMMANDS, new CommandMessage());

CommandMessage

public class CommandMessage implements PluginMessageListener {

    @Override
    public void onPluginMessageReceived(String channel, Player player, byte[] message) {
        
        System.out.println(player);
        System.out.println(message);
        
        //Make sure channel is correct
        if (!channel.equalsIgnoreCase(Main.PLUGIN_COMMANDS)) {
            return;
        }
        
        ByteArrayDataInput in = ByteStreams.newDataInput(message);
        String commandToRun = in.readUTF();
        System.out.println(commandToRun);
        
        //Check if command in IF and send to correct handler
        if(commandToRun.equalsIgnoreCase("teleport")) {
            UUID sender = UUID.fromString(in.readUTF());
            UUID target = UUID.fromString(in.readUTF());
            BungeeTeleportCommand.teleport(sender, target);
        }                
    }

}
bleak current
#

make sure that you actually register the message listener

stark bone
#

with registerIncomingPluginChannel?

bleak current
#

yes

stark bone
#

Yes that's in main

#

You can have an outgoing and incoming on the same channel name right?

bleak current
#

yes

#

also plugin channel name checking is redundant, unless you want to listen to multiple channels using one listener

stark bone
#

will adjust that

#

excuse the messy code as I haven't touched plugins in a while

#

especially channels

bleak current
#

eh, i've seen worse

#

i've written worse

#

but alright - i'll head to sleep now. good luck

stark bone
#

Thanks, I will post here with any updates

#

if anyone else knows, by using a callback in Player.connect, I assume it will wait until the connection is complete before sending said plugin message

bleak current
#

before i go

#

iirc that's not always true

stark bone
#

so it's possible it sending the output to the old server

bleak current
#

connection might not be that far to pass plugin messages to the server

stark bone
#

docs state this ```yaml
/**
* Connects / transfers this user to the specified connection, gracefully
* closing the current one. Depending on the implementation, this method
* might return before the user has been connected.
*
* @param target the new server to connect to
* @param callback the method called when the connection is complete, or
* when an exception is encountered. The boolean parameter denotes success
* (true) or failure (false).
*/

#

so it makes sense to

bleak current
#

i'd wait for ServerSwitchEvent

#

and then pass the data

#

that of course involves some advanced hackery

#

okay maybe not so much, but for beginners like you very likely

#

anyway, e.g in callback you put an entry to map which will be read on ServerSwitchEvent

#

there might be some pitfalls, due to the nature how bungeecord is built up. make sure that you synchronize such map accesses etc.

stark bone
#

thanks for the point in the right direction

#

looking at some source code of other teleporter is a bit strange. They do theplayer.connect then run the plugin message using ProxyServer.getInstance.runAsync

#

how intensive is server messaging? is runAsync really necessary?

dark perch
#

afaik is just a packet