#waterfall-dev

8550 messages · Page 3 of 9

trail plume
#

that way it doesn't work the entire system

pale sandal
#

I think it can listen to any packet I provide, just gotta be DefinedPacket

wide maple
#

you can probably inject a ChannelDuplexHandler to get the JoinGame packet

#

alas- No clue

pale sandal
#

I'll give it a shot. Thanks so much for the help 🙂

trail plume
#

Listen to the Login packet then

#

It's already defined in the proxy

pale sandal
#

That LoginPayload?

trail plume
#

No, literally, Login

pale sandal
#

Found it! Awesome.

wide maple
#

@pale sandal fair warning; watch where you inject.
This packet can be from the proxy to the client and to the proxy from the server.
The entityID can be different for one reason: bungeecord rewrote it.
You can only be certain that this is not the case if you disable entity meta rewriting in the waterfall config

pale sandal
#

Got it working! I spent days trying to find a solution! Thank you so much 🙂 Could you send me your PayPal?

#

( @wide maple ^ )

wide maple
#

Nah I’m good. You should rather donate that money to a charitable organization if you’re so inclined

plush hatch
#

That's for telegram integration for online-mode: true server.

chilly coral
plush hatch
#

@chilly coral I used String.valueOf(args.length). Command successfully executed with arts from proxy console. But when player execute command with args - nothing. But if player execute this without args all logs fine

outer elbow
#

how would i run code with a delay? is there some sort of BukkitRunnable but for bungee?

trail plume
#

iirc, no, you get a scheduler which is basically just the typical java thing iirc

#

BungeeCord.getScheduler()

outer elbow
#

ah alright thanks

#

also is there a specific reason the new line is appearing white? i'm wondering if it's something with viaversion and an older client?

player.sendMessage(new TextComponent(ChatColor.translateAlternateColorCodes('&', "&cThe server is currently on version &7" + serverVersion + "&c! Please update your client to play.")));```
trail plume
#

Don't put legacy text into a component...

outer elbow
#

should i use TextComponent.fromLegacyText or just no new TextComponent in general?

trail plume
#

fromLegacy

#

that way it actually creates real components vs relying on the janky parsing of legacy text that the client does

outer elbow
#

gotcha

bleak current
#

I think waterfall does something wrong.

#

it fails, says something went wrong (my plugin) and then says already connecting

#

the main server had already binded to the port but is not yet accepting connections because of the amount of plugins that has to load

wide maple
bleak current
#

hm ok. How would i do that?

wide maple
#

I’m pretty sure you’ll have to pass a callback and wait for that or listen to the disconnect event

#

The callback is probably the smarter idea

subtle epoch
#

I'm trying to access the API class of another plugin, but Waterfall seems to load the class in the classloader of my plugin, so I cannot cast the Plugin instance I get from PluginManager.getPlugin to the correct class. I have checked that the class is not shaded into my jar.
Any ideas?

trail plume
#

load the class in the classloader of my plugin

#

You mean, the class you wanna access froms ome other plugin exists in your jar?

#

if so, don't

subtle epoch
#

PluginManager.getPlugin("...").getClass().getClassLoader().hashCode() and ExpectedPluginClass.class.getClassLoader().hashCode() returns different values

#

same for PluginManager.getPlugin("...").getClass().hashCode() and ExpectedPluginClass.class.hashCode()

#

Both report the same name with getName(), though

trail plume
#

does that class exist in your plugin jar?

subtle epoch
#

Nope, I have double checked

#

And I only have the two plugins on my test proxy

trail plume
#

biggest thing is to make sure that you're updated, upstream has been messing around with the classloaders, am not really sure how that would happen though

subtle epoch
#

My build is a few days old. Can try pulling the latest

#

I have the latest

trail plume
#

Create an issue on the tracker with replication info

#

I don't see how that could happen unless you actually had two different versions of that class unless something is borking the classloaders

subtle epoch
#

Hmm, I'll try to create a minimal reproducible example

bleak current
#

Ok so from the "encrypting" screen on login, I assume that your connection with an MC server is encrypted. Would this make it possible to process payments in-game securely? Or would that be a stupid idea

trail plume
#

That would be stupid

bleak current
#

Lol

trail plume
#
  1. the full connection is not encrypted, e.g. proxy > server
bleak current
#

Isn't it with something like Velocity?

trail plume
#
  1. you have no idea what else is running on the server unless its your server and you actually vet everything you install (most don't)
#

No

bleak current
#

So I'm not worried abt that

trail plume
#

the encryption in mc only works in online mode, and the extra compute cycles for encryption over what should be a secure network is generally not worth the time or investment of implementing it

#

still, expecting people to enter payment details in a game is just sketchy af, I'd run away from that, but, I am more technically inclined than most so god knows, but, that's a red flag to me

bleak current
#

Fair, I would definitely still want to have a website version regardless in case something breaks or I find a vuln

#

But I feel like the ease of just plopping your details in game would be pretty good for increasing sales, since you aren't essentially trying to get your players to leave the game and come back

#

I would prefer to do it with some sort of client side mods so then you could use an encrypted enclave or the like for the system that processes details, but honestly if your system is compromised I feel it's more likely your details get stolen from the browser than some random Minecraft server

trail plume
#

you don't handle payment details yourself unless you meet the compliance specs

#

you use some 3rd party provider which generally expects you to deal with transactions on their site for the compliance aspects

bleak current
#

I meant the thing that sends it off so your details can't just be scraped from memory

#

That was bad wording on my part

viscid thunder
#

so, why does waterfall call a method that does not exist, but can still run fine without any build errors?

trail plume
#

lombok

viscid thunder
#

what?

trail plume
#

bungee uses lombok

#

and, thus, shamefully, we also use lombok

viscid thunder
#

what is it?

trail plume
#

Which means that many methods are auto-generated and you need to have lombok setup for it to work

#

modern IJ should have it bundled by default, otherwise you'll need the plugin, beyond that, am not sure how IJ detects it, maybe hit the reimport button

viscid thunder
#

ok, thanks

robust cliff
#

I think you have to install the lombok plugin in intellij to enable discovery of those methods

#

Or atleast i had when i installed my idea

lean gobletBOT
#

doesn't intellij include lombok support by default now?

#

also pretty sure the api artifact doesn't require lombok

forest flume
#

IDEA has Lombok by default

brazen walrus
#

Does anyone know how the client-side ignore feature works?

#

I'm trying to get it to ignore private messages sent from a waterfall plugin

#

but since I'm just using player.sendMessage(), the client probably has no idea who the message comes from

#

but how do I specify it using the bungeecord/waterfall API

#

I was looking at CommandSender

random charm
#

e is a ServerKickEvent

#

but b.toPlainText is empty and idk how I'm meant to process it

#

just trying to get the kick reason

#

basically how'd I turn BaseComponent[] kickReasonComponent into a string

#

I see that getKickReason() is deprecated

trail plume
#

you'd need to use the legacy serialiser if you waned it as a legacy string

random charm
#

well what'd be the best way to go about checking if a kick reason contains _

trail plume
#

using the serialiser is probably easier unless you wanna go checking the entire tree

random charm
#

how'd i use the serialiser o.o

#

oh

#

BaseComponentSerializer

#

also why is the Waterfall javadocs broken with 404 Not Found

#

on like 50% of stuff searching

trail plume
#

javadocs are a PITA, I gotta figure out how we hacked it back together for papers javadocs

random charm
#

is there any reason why .getKickReason() is deprecated?

trail plume
#

was deprecated when it was added by upstream

random charm
#

you mean it was deprecated as soon as it was added to waterfall??

trail plume
#

when it was added to bungee, yes

random charm
#

why lol

trail plume
#

🤷‍♂️

random charm
#

so it should be fine to use???

trail plume
#

unstable? god knows, bungee really fucks up a lot of stuff in this area

#

Yea, should be fine

random charm
#

aight well I'll use that then and save some time

#

aren't the spigot devs terrible generally?

#

like instability

#

and potential explosion changes

trail plume
#

They generally refuse to make the changes needed to keep the API stable, eeering on "muh legacy plugins", but will often make simple but massively profound behavioural changes mid release, such as that time they changed how an event worked with 0 notice which caused many plugins to dupe items, meanwhile their refusal to break API means that API is "stable" but often missing aspects or generally gets stale and often replaced in a huge rewrite of some component years later

#

bungee doesn't even support chat components in scoreboards, it just passes around the json string, which means that plugins now get passed json strings when working with scoreboards, meaning that plugins have to deal with where to use components and such vs the API dealing with it

#

wooo

random charm
#

yeaa sounds pretty shit

#

that's why I stick to Paper :)

#

no nuclear servers

trail plume
#

I mean, shamefully we're stuck to dealing with the same stuff because we extend off them

random charm
#

well yeah but if somethings causing issues you guys normally patch it up fairly quickly

#

Obviously API wise you're limited in features / that stuff but when it comes to server problems v good

#

why did spigot even start / get big

#

cause of the bukkit dmca??

trail plume
#

yes

random charm
#

i found out bukkit was made by minecraft dev recently

#

forgot his name

#

dinnerbone

#

craftbukkit i assume was a fork / improvement on that

trail plume
#

craftbukkit is the implementation of bukkit by modding the vanilla server

#

they're practically hand in hand

#

there have been a few attempts to implement bukkit without relying on vanilla, but, closest we have afaik is glowstone

random charm
#

glowstone is completely open source right?

trail plume
#

yes

random charm
#

like standalone effectively

#

if cuberite was fully featured that would be amazing for server hosting

trail plume
#

too niche of an environment for this community

#

It's part of why hytale is going for a java based server

#

the entire MC community is backed by java, and java in general outside of some horrors is a really nice language to work with in the scheme of things

random charm
#

that is weird

#

that suprises me they'd go for java

trail plume
#

the client is gonna be in a different language

random charm
#

only the server is java?

trail plume
#

yup

random charm
#

I mean to be honest minecrafts shitty performance is probably mostly down to the coding of the base game not java itself

trail plume
#

it is

#

Java is a non-issue

#

I mean, Java can rival C++ in some ways

random charm
#

i did not know that

#

ok im a bit of a java noob

#

how would I access the ServerInfo

#

/ cancelServer

trail plume
#

probs getter methods on there

random charm
#

is it likely methods will be missing

#

on javadocs

trail plume
#

bungee uses lombok, and the lombok javadoc stuff basically broke a while ago

random charm
#

right well is it possible for you guys to just takeover spigot

#

and solve everything

trail plume
#

at least for the server we're planning to hardfork

random charm
#

:o

trail plume
#

for waterfall, eeer... I mean, I sorta ended up convincing tux to create Velocity

#

hardforking waterfall would be nice, but, for the work I wanna do to it, tossing in a match would be easier

random charm
#

oh so is velocity like based on bungee at all or?

#

completely standalone

#

👀

#

waittt

#

does cancelserver mean

#

idk dw i'll try it

#

and see

trail plume
#

velocity is a complete reimplementation of the proxy based on modern research

#

cancel server is the server to send you to if the event is cancelled

random charm
#

java noob here again

#

shouldqueue = true runs

#

but

#

shouldqueue is seemingly false when it reaches the if

#

because the if doesn't run

#

do i need some special declare to access from inside if

trail plume
#

you return when you set it to true

random charm
#

..

#

lol

#

this isn't my code im just tryna fix it

#

why did he do that...

#

im guessing it should return when false

shell lagoon
#

I'm guessing it should be a break.

random charm
#

ah ofc since there's no need to continue

#

the loop *

#

oh also the code inspect feature of intellij

#

is rlly good

#

intellij as a whole is actually great

shell lagoon
#

IntelliJ's static analysis is pretty good, yeah

random charm
#

amazing it works now

#

ty

shell lagoon
#

No problem

random charm
#

why'd people use gitlab -_-

shell lagoon
#

GitLab has quite a bit of functionality. GitHub has been catching up, though.

weary grove
#

(Those of you familiar with the story already know, but Velocity was spawned after I'd started work on a hardfork of BungeeCord.)

bleak current
#

Why is waterfall even still a thing? If the forge patches don't work, what else does waterfall even change from bungeecord?

trail plume
#

performance stuff

#

modern forge stuff is a work in progress

#

(not by me as I've not had the health, but, there are people working on it in the community)

vivid peak
#

I'm writing a plugin for bungee/waterfall that connects a player to a server based on the hostname they connect with. Even though I call connect() on the ProxiedPlayer and I see the "connecting player to server test", the player never makes it there. Any ideas?

#

This is the event handler

lean gobletBOT
#

@vivid peak set the target in the event

#

or via the reconnect handler

wide maple
delicate zealot
#

Is there a way to execute a command as the console sender?

#

and- can this be done from another thread?

#

(i know it sounds like an x-y issue but this is exactly what i wanna do)

viscid thunder
#

ok, so how tf does java know this is an Handshake?!?!? Its an object comming from Netty, where does it calculate what class it has????

#

Does it guess?

high oak
#

Why was entity rewrite code removed from 1.16.2+ in BungeeCord?

chilly coral
#

probably because unnecessary ?

viscid thunder
#

is it anyone here that knows how the object is generated?

#

..yes my pf pic is changed

delicate zealot
#

what object

viscid thunder
#

My call-trace in the debug, ends here

#

So i have no idea what called it

chilly coral
#

it is not generated

#

another step in the pipeline reads the bytes and instanciate the object

viscid thunder
chilly coral
#

look where the pipeline is built

#

there will be all "steps" of the pipeline

high oak
#

If entity rewrite is unnecessary from 1.16.2+, would 1.17 be the same? I still do not understand it. 😭

trail plume
#

It's not been needed for ages and creates many issues as it needs to rewrite the data and relies on knowing the data structure, etc

#

It's just messy and long been unneeded

high oak
#

Thank you so much for your answer!

delicate zealot
#

why was it ever rewritten in the first place?

trail plume
#

because it used to be the only way for it to work

#

That's not been the case for years

weary grove
high oak
#

oh thank you!

deep kite
#

Hello, how to change a player's name? changing the displayname still send the original name to the server

wide maple
viscid thunder
#

I need help, the command node it read was 0x67 or 103 in dec. The node type is (0x67 & 0x3) = 3 which is neither root (0), literal (1) or argument (2), this is a probably a forge command. Is forge using a third node type?

#

I got forge 1.16.5 past the handshaking and login phase. Now in the middle of the play state, this is what im stuck with

#

Before i also got a pearsing error but i have added forge's custom node parser and now i dont get that

ionic inlet
#

Is there a way to get the top Y block of an X,Z location from within bungee of one of the worlds of the servers in the network? Thanks in advance!

chilly coral
#

proxy is not aware of server worlds

ionic inlet
#

That's what I thought, but had to ask anyway, maybe I was missing something

wintry turret
#

Has anyone done work with an external service for things like mini-game instance management or skyblock island loading using something like RabbitMQ or gRPC?

wide maple
viscid thunder
#

I will take a look at that

wintry turret
# sharp isle yes

I'm hitting a snag trying to decide on whether to use a message broker or RPC to handle communication between my endpoint service and the endpoint manager. For simplicity, I was going to start by making the endpoint manager as a plugin on Waterfall, then separate it into it's own service later. Either way it goes, I'm not sure what method would be best for creating bidirectional communication between the endpoints and the manager. gRPC has bidi streaming, but my use case feels like that would be wasted bandwidth and I'm not really sure what other options would fit. Essentially I want the endpoint to spin up in a container, then register with the manager. The endpoint is a blank slate that can be configured on the fly, so it would wait for the manager to tell it to load a certain config. Once it has finished loading, it would tell the manager that it was ready.

The waiting time between registration and receiving a config is what's tripping me up. Is there a better way to handle that other than a bidi stream in gRPC or adding a gRPC server to the endpoint?

viscid thunder
#

Done

zenith meteor
#

🤯

viscid thunder
weary grove
# viscid thunder

I know pretty much everyone wants this. Do lob up a PR if/when you get the code cleaned up. I'll have to steal this for Velocity too...

#

With credit, of course.

zenith meteor
#

How cool is that because I've been waiting for a long time

viscid thunder
#

Yes me too

weary grove
#

It'll be interesting to see what approach you used. I originally had some ideas around this involving replaying login plugin messages and faking the FML handshake, but we also had a different approach that simply reimplemented the reset packet Forge used to have.

viscid thunder
#

I don't think people will like how I rearranged the handshake/login procedure

weary grove
#

I just haven't had time to work on this, owing to not being super interested in modded Minecraft, other priorities, IRL responsibilities, college, and more recently, having a job.

viscid thunder
#

I own a medium server myself, and this was originally so my friends could play newer modpacks on my server network

weary grove
#

Up to now I've pretty much told anyone who wanted modern modded Minecraft to just use Fabric, which has good proxy support (especially with Velocity, since I also handle a special case for certain mods that add custom argument types).

#

And yeah, you ran into the same issue I did. My solution was to wrap unknown command argument types in a wrapper type and unwrap it on the proxy when sending the command packet to the client: https://github.com/VelocityPowered/CrossStitch

viscid thunder
#

I think forge already does this, because everything comes in a "forge:enum" type

#

So i just pass it to the client

weary grove
#

You still need a solution like this as a mod could just modify the Brigadier command tree itself

#

If you do, I'd recommend doing it in the same way as CrossStitch does it

brittle panther
#

People are talking way above my head in here.

pale sandal
#

How would PlayerInfo#ADD_PLAYER look like? (the property) I have both value and signature.

trail plume
#

if you mean the game profile, it's a game profile, has all the info that a game profile usually has

wary field
#

Hi! first, sorry for my bad english, i’m brazilian

#

I’m building bungeecord report plugin

#

and, when some player make report, discord show an warn

#

but when I execute command, in proxy, shows “403 forbidden”

#

why?? ‘-‘

#

if I execute the method in other situations, this works normally

lone wren
#

(you should reset that webhook url btw)

wide maple
#

@autumn locust I’m just as surprised as you are at md_5s 21w19a build. I’ll have to shoot him a correct entity mapping

safe beacon
vivid peak
#

Am I doing something wrong or does bungeecord override ProxyPlayer.connect() called in a PostLoginEvent? Like you start to connect to the server you set in the handler and then it changes halfway through

chilly coral
#

PostLoginEvent has a setter to define the target server

#

iirc

trail plume
#

^^ the flow doesn't care if you try to connect somebody elsewhere in that event, use the setter on the event

trail plume
#

Oh

#

The "official" way to handle it is to use a reconnection handler, basically

vivid peak
#

Huh alright

#

I figured out a way to make it work so it's not super important but I just wanted to know the best way to do it

#

Thanks

trail plume
#

otherwise, you'd use the server connect event which iirc allows you to override the connection, just gotta make sure you check that they're not already in another server iirc

runic dune
#

How hard is it to make a simple waterfull/bungee plugin that sends a client to a specific lobby server if they are running a forge client or vanilla client?

hard fox
#

Definitely... Doable? I am almost 90% sure the proxy exposes of they're running forge when they connect

#

Intercept PostLoginEvent and send them where you want, should be easy

trail plume
#

requires them to connect to a forge server first for the handshake to occur

runic dune
#

So if I make say the main lobby server to be forge and then make it send the vanilla players to the spigot lobby that should work

trail plume
#

Yes, it will also fall though but not always pretty iirc

#

Well, if you had any forge mods which are needed on the client

runic dune
#

OK I'll try this before making the plugin thanks guys :)

brittle panther
#

I kind of want to add this to my Essentials plugin if it worked out.

brittle panther
#

How does the TaskScheduler get instantiated? I am trying to recreate it for a different project I am using. (Not waterfall / bungee.)

trail plume
#

on startup of Bungee, it's init'd in BungeeCord

#

But, you don't really want that

#

it's basically just a glorified wrapper around a schedule executor service

wide maple
#

#642 no. Make it a module if anything.

wide maple
#

@ zzzcat update pr is tested good

viscid thunder
#

sooo, whats the best way to create a custom packet? Is this the right method?

#

Is there a way in waterfall to encode a custom packet?

#

With a custom packet id and data

trail plume
#

with custom packet ids, yes

#

You probably wanna look at using a packet library, otherwise you basically just register the packets into the registry and create them like any other normal POJO and use the sendPacket method

viscid thunder
#

Is there a way to do it inside Waterfall using its libraries?

trail plume
#

Yes

viscid thunder
#

I'm making a patch

trail plume
#

see the packet registry

viscid thunder
#

Is this what you are talking about?

#

Inside protocol.java

trail plume
#

Basically, yes

#

registerPacket calls into the registry

#

can either use that stuff or throw your own stuff in manually

viscid thunder
#

So what I'm trying to do is send my custom packet inside a LoginPayloadResponse packet as the data. The packet thats is inside look like a uncompressed packet with length, packetId, and data.
Is there a way to convert a packet into a byte[] that the LoginPayloadResponse packet can use as data?

trail plume
#

custom packet

#

So, not really a packet but a custom payload so nothing to do with that

#

you'd just serialise your data using a bytebuffer or something and throw it in there

#

then you can read it back using a bytebuffer

viscid thunder
#

How do i calculate the length of an varInt?

#

I read it can be 1 to 5 bytes

trail plume
#

you don't calculate the length of it

#

you need to actually read/write it to know the length

viscid thunder
#

But the length is the first thing i need to write to the bytebuffer, then comes the packetID that is a varInt.

#

I basically need to know the size first

#

The packet id is 99

#

Can i like, write in reverse or something?

trail plume
#

You don't need to write into the byte buffer

#

that varint is written for you

#

you just need to create a byte array which you can then send with the custom data methods

#

You're not writing a custom packet here

#

The payload packet is literally already in waterfall

#

You're just sending an already existing packet with your own data

#

the packet format is 100% irrelevant there

viscid thunder
#

Ik, the data inside the payload is going to be a custom packet

#

Thats why

trail plume
#

and how you format that is 100% irrelevant to the packet format there

viscid thunder
#

Can you see what I'm trying to do?

#

Its a wrapper

#

Thanks for helping me btw

viscid thunder
#

I got it work, thanks anyway

wide maple
#

Netty ByteBufs are ReferenceCounted and will not be GCd at all unless they’re released. You’ll have to release them or you’ll get a memory leak

#

Also

#

I don’t see the need to clone the first buffer

#

Just read what you need and reset the index after

viscid thunder
#

Thanks for pointing that out, i will fix it right away

#

I just wanted it to work like a prototype first, then make it more efficient

wide maple
#

You can store the reader index with
int index = buf.readerIndex();
Then read what you need, and at the end you can reset it back with
buf.readerIndex(index);

#

I’m just pointing it out, netty has some common pitfalls, and that is one of them

#

Previously people used the marker feature, but that’s deprecated and shouldn’t be used anymore

viscid thunder
#

better?

#

It has changed since i got it to work compared to the previous pic

#

Oshiit

wide maple
#

Can I ask what you’re trying to accomplish- this looks like a forge handshake pass-through

viscid thunder
#

Here is a quick demo

#

Its mordern forge support for waterfall

wide maple
#

How do you reset the client?

viscid thunder
#

Not possible

#

I dont

#

Not with this forge version

trail plume
#

without resetting the client it's not really gonna work for server switching

wide maple
#

That’s the issue here- I’m open for a discussion about this;
I’ve been working with the quiltmc people and forge people on a more intricate solution to this issue. It requires a modification on the mod loaders side to be supported but it’s not bound to any specific mod loader

#

It’s a protocol designed for mod support and I should really release the specifications

viscid thunder
#

Right now, you can only switch back to the server you first joined

trail plume
#

i really just think that there should be a switch packet

wide maple
#

zzzCat you’ll love my write-up

trail plume
#

client recieves a switch packet with some payload of where to reconnect and some security token

viscid thunder
#

...If its forge

trail plume
#

Like, imho, that's gonna be the best system in terms of maintaining support, and yea, it'll probably be "fun" to implement but something like that is gonna be the safest means of doing it imho

wide maple
#

It’s a standard that I’m seeking velocity and waterfall to adapt, and I hope I will succeed

#

Let’s see if I can produce a workable demonstration in the next couple of days

#

I’ve had a long convo with Earthcomputer about this before he vanished

wide maple
viscid thunder
#

I think my prototype will do for now, because its not often you want to go to another forge server. My goal here with this is to be able to pass through vanilla hubs, and then join a forge server with a modpack install. And if you want to play like a minigame or vanilla survival, you can switch to a vanilla server and then back to the forge server when you are done and continue with your mo pack playthrough

trail plume
#

stuff broke all the time, just, stuff which broke was generally a "you're fucked", thankfully most stuff generally didn't care to send data and what was sent was done in play so resyncing was easy

#

Issue is that all the handshaking is done in LOGIN

viscid thunder
#

... By no means is it finished yet

trail plume
#

which means that you can't sync the data from the forge server

wide maple
#

And if you join a vanilla server first I assume mods won’t work if you join forge, right?

trail plume
#

all of the data that forge sends is done during LOGIN so that just won't be there for the client, so, shits gonna desync once you try to jump over

viscid thunder
# wide maple And if you join a vanilla server first I assume mods won’t work if you join forg...

Thats what i will try to fix next. I have an idea of waterfall pinging every server its connected to to get a modlist for all the forge servers. Then, when a player joins and its a forge user, waterfall will send the mod list it retrived form the servers it pinged, then if they match begin a connection and handshake with the forge server it matched. After that, it will forward all the handshaking packets between the client and the server its about to join.

#

Waterfall will store the client's modlist for later use when he connects back

wide maple
#

The problem you’ll run into is that you’ll have to simulate the exact response to correctly activate the mods first

viscid thunder
#

From vanilla

wide maple
#

And I assume the mods init will also cause you issues

viscid thunder
#

I will have to experiment more with that

wide maple
#

I welcome you to do so

#

I can’t make heads or tails of some forge logic

#

And I aim to not have to deal with that

bleak current
#

are registering listeners like this.getProxy().getPluginManager().registerListeners(this, new EventListener());?

#

because the spigot website is telling me that its the opposite

#

its been a while since i was making plugins

lethal kernel
#

what's the matter?

#

windows ransom block is turned off

#

Could not transfer artifact org.apache.maven.plugins:maven-compiler- plugin:pom:3.1 from/to central (https://repo.maven.apache.org/maven2): Permission denied: no further information

trail plume
#

that's gonna be firewall related

lethal kernel
#

hmm, I added rules for win-firewall and disabled my soft firewall (glasswire)

#

but I'm still getting the same issue

quartz nimbus
#
if(player.isOnline() && player instanceof ProxiedPlayer) // line 44
                {
                    ServerInfo serverInfo = ProxyServer.getInstance().getServerInfo(server);
                    ((ProxiedPlayer) player).connect(serverInfo);
                    sender.sendMessage("§aDer Spieler wurde erfolreich auf den anderen Server verschoben.");
                }
                else {
                    sender.sendMessage("§cThe player isn't online!");
                }```
#
[16:36:58 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'ccn redirect freebuild Verox007' in de.cimeyclust.commands.CCNetworkCommand(ccnetwork)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:169) ~[patched_1.16.5.jar:git-Paper-611]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:810) ~[patched_1.16.5.jar:git-Paper-611]
        at net.minecraft.server.v1_16_R3.PlayerConnection.handleCommand(PlayerConnection.java:2170) ~[patched_1.16.5.jar:git-Paper-611]
Caused by: java.lang.NullPointerException
        at de.cimeyclust.commands.CCNetworkCommand.execute(CCNetworkCommand.java:44) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.16.5.jar:git-Paper-611]
        ... 18 more```
#

Could this error be, because I use the plugin on a child server of the waterfall?

#

I stuck at this, because I don't know how to make a command, with that I can redirect the layer from server to server in waterfall.

trail plume
#

I mean, that makes no sense

#

You can't have bungee plugins on the server

#

none of those classes will exist

#

if you wanna send somebody to another server from a server, you need to use the messaging channel

quartz nimbus
#

Okay. How I can make a plugin, which adds a command to every bungee server, whith which Admins can redirect specific players

trail plume
#

.g bungee messaging channel tutorial

trail plume
#

Not that...

#

spigot has a page on their wiki for using the messaging channel

quartz nimbus
#

I will read there. Thanks for giving me that new thing.

#

If I defined public void onPluginMessageReceived. How I can call it?

#

With a command. Or in my code?

trail plume
#

you don't do that for just sending a message to the proxy

#

beyond that, that's called by the messenger as you need to register that stuff

quartz nimbus
#

Okay, but:

#

ConnectOther needs a second player

#

How do I get him?

trail plume
#

you use the name of the player

quartz nimbus
#

Which player?

trail plume
#

the player you want to connect to another server

quartz nimbus
#

I don't want to move the player, who entered

trail plume
#

if you want player X to connect to the server, you could just use Connect and sent it over player Xs connection

quartz nimbus
#

How I can use this?

#

How is the listener gets the playername?

trail plume
#

The listener is irrelevant

#

you're not recieving a plugin message

#

This is not that complex

#

ConnectOther takes the name of the player you want to connect to another server

#

So, you'd pass that players name from your command and shove it in there

quartz nimbus
#

But the playername is from a command.

trail plume
#

So, put the argument from the command in there

quartz nimbus
#
@Override
    public void onPluginMessageReceived(@NotNull String channel, @NotNull Player player, @NotNull byte[] message) {
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        if (!channel.equals("BungeeCord")) {
            return;
        }
        ByteArrayDataInput in = ByteStreams.newDataInput(message);
        String subchannel = in.readUTF();
        if (subchannel.equals("SomeSubChannel")) {
            out.writeUTF("ConnectOther");
            out.writeUTF("roblabla");
            out.writeUTF("pvp");
        }
    }```
quartz nimbus
trail plume
#

Once again, you are NOT recieving a plugin message

quartz nimbus
#

Must I call this.onPluginMessageReceived()?

trail plume
#

No, because you are NOT recieving a plugin message

quartz nimbus
#

😅

#

I don't know what that means.

trail plume
#

that interface is for recieving plugin messages

quartz nimbus
#

My english isn't that good.

trail plume
#

You are not listening to them, you're creating a new plugin message

#

So, move that code to send over into your command or some method somewhere which takes the player name as an argument

quartz nimbus
#

Okay.

#
        this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", this);```
#

With this? Right?

trail plume
#

Yes

#

But, the incoming is not needed if you're not using the plugin messages which provide a response

#

But, that name is case sensitive

#

if this a command, you'd be better off just using a plugin on the proxy itself

#

otherwise, you're gonna have to look at syncing connections

#

Oh, wait, nvm, bungee uses a case insensitve map, so, casing is not an issue

quartz nimbus
#

Like this in the command?:

#
                {
                    this.plugin.getServer().getMessenger().registerOutgoingPluginChannel(this.plugin, "BungeeCord");
                    sender.sendMessage("§aDer Spieler wurde erfolreich auf den anderen Server verschoben.");
                }```
trail plume
#

No

#

register outgoing in your onEnable

quartz nimbus
#

In the command? Not?

#

Ah

trail plume
#

you send the message from the command, not register your resources in there

quartz nimbus
#

And how I can send the message from the command?

trail plume
#

Read the wiki on how to contruct and send a message

quartz nimbus
#

this.method()

#

Ah

#

player.sendPluginMessage(this, "BungeeCord", out.toByteArray());

#

I didnt see it

brittle panther
#

I don't understand. Are messaging channels just from server to proxy? Proxy to server? Both? Do I need a plugin to catch the message when the proxy sends it to the server? Would you only want to have the plugin on the server (not proxy) sending messages? I tried looking this up and it confused me a ton.

trail plume
#

they're "just packets"

#

if you're using the bungee messaging channel, that's already built into the proxy, so no need to listen to that

#

if you wanna listen to messages from the server, you'd need a plugin

kind hill
#

I'm receiving different packets from those which I'm sending, bungee console21:21:24 [INFO] [QueensWhitelist] this = PluginMessageEvent(super=TargetedEvent(sender=net.md_5.bungee.ServerConnection@6a5b0946, receiver=SecretX), cancelled=false, tag=MC|Brand) 21:21:24 [INFO] [QueensWhitelist] tag = MC|Brand

#

Spigot end (sending the message): KT fun movePlayer(player: Player) { plugin.logger.info("Moving player ${player.name} to far, far away") ByteArrayOutputStream().use { bos -> DataOutputStream(bos).use { it.writeUTF(Channel.MAIN) // "queenswhitelist:comm" it.writeUTF(Subchannel.MOVE_PLAYER.name) // "MOVE_PLAYER" player.sendPluginMessage(plugin, Channel.MAIN, bos.toByteArray()) } } }

trail plume
#

Different packets

#

that's the MC brand being sent to the server from the client

kind hill
#

bungee end (receiving the message)```KT
init {
plugin.proxy.pluginManager.registerListener(plugin, this)
plugin.proxy.registerChannel(Channel.MAIN) // "queenswhitelist:comm"
}

@EventHandler
fun PluginMessageEvent.onActionRequest() {
logger.info("this = $this")
logger.info("tag = $tag")
if(tag != Channel.MAIN) return
logger.info("Received message for channel ${Channel.MAIN}")
isCancelled = true
// more
}```

kind hill
trail plume
#

I can't see

#

all I can tell you is that you logged the MC brand packet from the client

#

not a packet sent from the server

kind hill
#

how can I check if its sending the packet or not

trail plume
#

Well, make sure that you're not just logging packets sent from the client

chilly coral
#

@ zzzzCat do you think it would be possible to have an auto updater like paper for waterfall/travertine ? So most of the time you would not have to worry about.

trail plume
#

there is no auto updater for paper

chilly coral
#

ah, i thought commits from aikar were auto ones

trail plume
#

oh

#

yea, they are

#

I've been tempted to get the scripts off him for that, it's just getting it all setup and such

#

no idea if the waterfall scripts will handle that all too well

kind hill
#

is possible to have a bungeecord of bungeecords?

chilly coral
#

not supported

bleak current
#

When I send a plugin message to bungee, there's a number in front of it that increments when I restart the server. How do I get rid of it?

chilly coral
#

what

bleak current
#

ok, so I send this plugin message to bungee: send:225c906f-9d23-4216-b144-b77929f9b4f7:spleefrun but then when I log it to the console it's 3send:225c906f-9d23-4216-b144-b77929f9b4f7:spleefrun

#

I have literally no idea why this would happen

chilly coral
#

code ?

bleak current
#

yep one sec

#

Waterfall side

@EventHandler
    public void pluginMessage(PluginMessageEvent event) {
        String message = asString(event);
        String[] splitMessage = message.split(":");
        getLogger().info("recv plugin msg " + message);
        if (
                event.getData() != null &&
                event.getData().length > 0 &&
                message.contains(":") &&
                splitMessage.length == 3 &&
                splitMessage[0].equals("2send") &&
                getProxy().getPlayer(UUID.fromString(splitMessage[2])).isConnected()
        ) {
            // ServerDiscovery plugin messages are parsed as follows
            // send:<player uuid>:<archetype of server to send to>

            ProxiedPlayer player = getProxy().getPlayer(UUID.fromString(splitMessage[2]));
            ServerInfo connectingTo = getServerOfArchetype(splitMessage[1]);
            if (connectingTo == null) {
                player.sendMessage(new TextComponent("Error connecting to " + splitMessage[1] + "!"));
            } else {
                player.connect(connectingTo);
            }
        }
    }```
#

Paper side

// Sends a plugin message to ServerDiscovery running on bungee.
    public void sendPlayer(Player player, String archetype) {
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        // See the spec for this in ServerDiscovery
        out.writeUTF("send:" + player.getUniqueId() + ":" + archetype);

        player.sendPluginMessage(this, "BungeeCord", out.toByteArray());
    }```
trail plume
#

asString?

chilly coral
#

same question

bleak current
#
public String asString(PluginMessageEvent event) {
        return new String(event.getData(), StandardCharsets.UTF_8);
    }```
trail plume
#

use a ByteArrayDataInput

#

and then readUTF

#

writeUTF uses a length preprended string

chilly coral
#

You should use you own channel and not formatting with :

#

would be cleaner

bleak current
#

is there some other separator I can use?

chilly coral
#

but yes, easy fix is what zzcat said

trail plume
#

use json or something sane

#

arbitary formats like that are fucking ass to maintain

chilly coral
#

just write multiple time

trail plume
#

and then you can even consider using stuff like gson, etc

bleak current
#

idk it's like three things and I'm not likely to touch this code again after writing it

#

json is cool and all but I think it's a bit overkill

trail plume
#

I mean, for what you're doing there, why not just use the built in messaging channel?

bleak current
#

well I actually did that on a previous iteration and then intercepted the server connect event, but then it caused issues with ViaVersion and I ended up having to populate the entire list of servers with each individual server every time a player switched servers

#

it was cleaner but waaay slower

chilly coral
# chilly coral just write multiple time

instead of:
write a : b : c
read + split

just do:
write a
write b
write c

and read data the same order you wrote it, thats easier than having to split and parse everything

bleak current
#

wait, how would that work without a hashmap of each player's UUID and the data that they had written? is there a way to access multiple plugin messages at once that I don't know about?

chilly coral
#

where you do writeUTF

#

You can write multiple things into it

trail plume
#

you write that to a single byte array and then read each element

bleak current
#

oh

#

wow

#

I totally forgot that was a thing

bleak current
#

:/

#

well thanks for the help

chilly coral
#

np

twilit coyote
#

How would i fake the server brand?

twilit coyote
#

what

wide maple
#

What he’s saying is that this isn’t supported and discouraged because it’s one of the few places where the teams work can be seen on display

brittle panther
#

How do I convert a hex to a ChatColor and be able to use it?

Attached is what I found using the web, but it doesn't work.

trail plume
#

#rrbbgg

chilly coral
#

You have to use components imo

#

I don't think the legacy § formatting supports hex color

#

(i may be wrong)

trail plume
#

theres some weird mangled format, xRRBBGG, with an & before each one

chilly coral
#

Yes the bungee-chat lib has something weird lije this but is it supported by minecraft client in legacy strings ?

trail plume
#

that's dealt with by bungee chat when it converts stuff to a component from the legacy crap

chilly coral
brittle panther
#

I know.

#

Is there a way to append on a TextComponent?

chilly coral
#

addExtra

#

Thats the equivalent of Adventure's "append"

brittle panther
#

How do I get only one of the BaseComponents, and make sure it is the correct one?

chilly coral
#

just create the one you need

#

new TextComponent(text)

#

.setColor

trail plume
#

component arrays are basically stupid and bad design, the way bungee deals with that is just trash

#

You'd basically have a component and then set any other components attached to it as a sibling

chilly coral
#

yes the BaseComponent[] stuff is stupid

brittle panther
# chilly coral just create the one you need

That won't work for me. I'm trying to make a function that will take a string of text, then make it into a TextComponent with each {#hexcol} making their respective strings into the correct color.

#

I got it sort of working somehow.

crude isle
#

Does it possible to make a Waterfall plugin depend on another?

#

I trid "depend" field in plugin.yml, but it still load before what I want to depend

trail plume
#

pretty sure yes

#

might be depends

#

oh, no, is depend

#

Oh, "load"

#

no, you can't control the load order, depend handles enable order

crude isle
#

I use depend to control it, but it still have ClassNotDefException

#

I don't know how to solve it

trail plume
#

logs?

#

are you sure that you're running the correct version of that dependency?

formal elk
#

how do i disable a plugin in bungee/waterfall

twilit pewter
#

Remove it from your plugins folder

formal elk
#

nah as in programmatically

#

in spigot or whatever youd do getPluginLoader.disablePlugin

#

is there an equivalent for waterfall?

chilly token
#

velocity

#

afaik there is no way to unload bungee plugin on runtime

formal elk
#

fs

#

ill just throw a runtime exception then

#

thanks for your help

chilly token
#

you can unregister listeners and commands maybe?

formal elk
#

yeah

west gorge
#

i also have an open pr for that at bungeecord

lean gobletBOT
#

I mean, this IS a bungee fork lol

west gorge
#

i mean other forks xd

#

flamecord fork of travertine xd

chilly token
#

I personally don't touch bungee with an 8m long stick

#

yuck

#

I use velocity

west gorge
#

xd

#

bungeecord is not stable tbh

chilly token
#

it's trash

#

let's be honest here lol

west gorge
#

people are just crashing bungeecord with empty packets 🤣

civic valve
west gorge
west gorge
wide maple
#

Un/re/loading plugins at runtime is bad

#

It creates lots of known issues and a restart is always the better solution

west gorge
wide maple
#
  1. You’re not concerned with dependent plugins
  2. Only tasks using the synchronous part of the scheduler will actually be cancelled
  3. You can’t ensure that the plugin didn’t inject anything into the proxy
  4. Active parts of the software will stay in memory till they either gracefully disappear or create a memory-leak
  5. Just because you think you unloaded something doesn’t mean the entire path of the class loader gets discarded (i.e. you may get overlaps)
  6. You don’t account for class-loading of plugins on their own. While it’s bad practice, many still do that.
  7. The JVM may crash doing that due to a class-loading IO error caused by the improper non-blocking way of unloading references

And I could think of a few more you could invoke with this-
TLDR: Don’t reload unload or load plugins at runtime. It may work fine, but it may also create a lot of issues that can’t easily be fixed nor explained, and that depends on pure luck most of the time

sly crown
#

its fully safe
kekwhyper

potent lichen
#

It's as simple as this: the objects from one plugin may be referenced by another plugin. There is no way for you to forcefully remove these objects from memory, and there never will be.

lean gobletBOT
#

just replace all references with weak ones thinksmart

wide maple
formal elk
#

just like use free() lol

west gorge
wide maple
#

@ zzzCat early merge?

wide maple
#

That should mark these two as compatible

#

In short:
Waterfall from build #428 and newer
Travertine from build #190 and newer
Should already support 1.17 when it is released next week
DISCLAIMER: There may be unforeseen last-minute changes that may break it

twilit pewter
#

Re https://github.com/PaperMC/Waterfall/issues/318:
Can this also happen without switching the server? Aka you've been on Server A with Scoreboard Team A, then switch to Server B, and after a while something on Server B creates a Scoreboard Team A - would that also cause this issue?

trail plume
#

something sending duplicate teams in general

twilit pewter
#

so it does not necessarily mean that you switched a server or something, it could also be a plugin on the same server that creates a team multiple times?

trail plume
#

yup

twilit pewter
#

ffs

#

that explains a lot

brittle panther
#

hmm

mystic parcel
#

Does Waterfall have a way to add Maven dependencies to the classpath without reflection with Java 16? (similar to Spigot/Paper using plugin.yml)

lean gobletBOT
#

can't you just load them with the class loader?

trail plume
#

yes, bungee added it last month or something

#

illegal reflection to add to the existing classloader

mystic parcel
#

Java 16 enforced strong encapsulation so can't URLClassLoader#addURL anymore

lean gobletBOT
#

I see

mystic parcel
#

--illegal-access=permit works for the time being as a JVM flag but looking for a proper permanent fix

lean gobletBOT
#

I feel like the proper fix is shading or directly adding them to the classpath on startup

mystic parcel
#

Shading ofc, but some platforms have file size limits

lean gobletBOT
#

well you could always add a way to manually add the dependencies

#

but yeah, Bungee supports the same libraries loading method that spigot does

mystic parcel
lean gobletBOT
#

by adding it to the classpath on startup or providing a plugin that only contains the dependenc[y/ies]

#

(or just don't use platforms with size limitations/properly minimize away unnecessary classes. most size limitations are pretty reasonable)

trail plume
#

most people sadly used shared hosts or are generally 10/10 with reading, so, requiring people to set the classpath for some rando plugin is very eeer

lean gobletBOT
#

must be some shitty hosts then if they don't allow you to use the full power of java

#

runs

mystic parcel
#

\kick phoenix616

trail plume
#

he not wrong

mystic parcel
#

but yeah, many (shared) hosts indeed don't allow you to modify JVM flags

#

I kinda get why but well, you get what you pay for ¯\_(ツ)_/¯

trail plume
#

Because people run their servers managing on cope rather than actually looking for proper merit from the stuff they're using and so fall into the same traps

#

mcph is literally one of the shittiest hosts in existence, but, if you're running a 5 person server, you're not gonna notice, and people will run around vouching for them

mystic parcel
wide maple
#

LP is over-engineered as Heck

mystic parcel
#

Well, it's a big plugin

mystic parcel
trail plume
#

iirc, luck basically creates a classloader and then refers to stuff from that

#

it's not really all that bad but it does have a lot of caveats around how classloaders work

mystic parcel
#

That's also how I understood it 🤔

#

some jar-in-jar shenanigans, plugin loader loads the plugin & deps

trail plume
#

oh, guess he changed it up more, but, yea, that works

#

you just create a classloader with the business logic and all your libs in there and ez, basically

mystic parcel
#

Mmh, probably also an universal solution for every platform

lean gobletBOT
#

wrong channel?

whole willow
#

Oh yeah

#

sry

wide maple
#

hey @flat arrow see #420 (nice) was that fixed?

trail plume
#

pretty sure that they fixed that in the newer version?

flat arrow
#

Will respond there in a minute, thanks!

#

Responded.

flat arrow
#

Thanks for the ping as well.

bleak current
#

Is there a way to get game_version from waterfall.yml in a plugin? Trying to put the "nice" version in my motd

#

Wait nevermind, I found it. getProxy().getConfig().getGameVersion()

chilly coral
#

There is something wrong with action bar and 1.17, it still sends a title packet, but 1.17 has a new actionbar packet. (so action bar messages displays as title with 1.17)
Will try to fix it on my side and pr it to BungeeCord, unless someone did it before.
https://wiki.vg/Pre-release_protocol#Action_Bar

sharp isle
#

I'm working on the pr for bungeecord

chilly coral
sharp isle
#

fixed in bungeecord

lofty ridge
#

I disagree with that fix, @chilly coral

#

/cc @sharp isle

sharp isle
#

what's the issue ?

#

I did try to use the new action bar packet

lofty ridge
#

The action bar packet which was added a few versions ago is the proper method to send action bar messages

sharp isle
#

😅

#

well that was the first version of the fix

#

but md-5 told me to use the chat packet

#

so...

lean gobletBOT
#

why did they add a new packet for that? smh

lean gobletBOT
#

oh they also split up the title into multiple packets, interesting (or annoying)

sharp isle
#

they split every action field in packets

lean gobletBOT
#

that is why

#

it was added back with 1.11

#

the separate packet? or what do you mean?

#

It was added to the Title packet with 1.11, and then split into its own packet with 1.16 due to packets becoming immutable

#

err

#

1.17

#

oh, I thought you meant they added that packet in 1.11 already

chilly coral
#

i think we all agree with you kashike

lean gobletBOT
#

yeah

#

This specific one, no, but the idea itself has existed since 1.11

#

the GAME_INFO type for the chat packet is not guaranteed to always be displayed in the action bar

#

pretty sure someone from Mojang mentioned this a couple years ago when it was brought up by someone else, but I cannot remember who or where

chilly coral
#

as antbig said, it was the original commit, until md said "why are we using title packets" and we didn't have too much knowledge about the difference in Chat/Title packet, that's why i posted the link of the PR here

lean gobletBOT
#

yes

#

I commented, hopefully md_5 will allow that to be changed

sharp isle
chilly coral
#

lets wait a bit imo

lean gobletBOT
#

imo you should, that change is what should go in

#

the packet exists for a reason, it should be used for its intention

chilly coral
#

pr to waterfall or directly bungee ?

lofty ridge
#

I'd PR to BungeeCord again

#

I'll cross-post my comment on a new PR for visibility

lean gobletBOT
#

oh wow, just saw that the action bar shows as a full title without that patch lmaop

chilly coral
#

that's how we found the issue lmao

#

"humm, this text was not supposed to be THAT big"

lofty ridge
#

heh

lean gobletBOT
#

yeah, I have action bar join messages and the first thing I see is my big usernamexD

sharp isle
#

😅

lofty ridge
#

feel free to ping me if you open a PR with that gain to BungeeCord@sharp isle

chilly coral
#

he's writing it

sharp isle
lofty ridge
#

👍'd

viscid thunder
#

I have gotten modern forge to work with waterfall with server switching in both directions between vanilla and forge servers, HOWEVER, it does only work if you join a forge server first since the client only can do the forge handshake during the login to the proxy. So if you have a forge server as your forced host or highest priority in the config, this will work. What doesn't work is if you join a vanilla server first and then change to a forge server since your client needs to know the forge registries of that server you are trying to join, that it doesn't have. My solution to this is make the proxy predict what forge server the forge client is going to switch to after it has connected to a vanilla server, and to do this, the proxy needs to keep track of what servers are forge and what servers aren't. This can be done in many ways: 1. Ping all the minecraft servers that is known to the proxy to find out what servers are vanilla and what servers are forge. 2. Make a config file where the admin could manually specify the forge servers. 3. As nr 2 but uses the nr 1 to automatically scan for forge servers and then put them in the list so it doesn't need to scan again.

When the proxy knows what servers are forge servers and the mods it has, it will choose the one that most closely matches the clients modlist, then connect to i to do a forge handshake. Right after the forge handshake is done, it will disconnect from the forge server and then connect to the vanilla server that the player was suppose to go in the first place.

Now the handshake has taken place as if it connected to the forge server but instead the player is connected to the vanilla and can now freely move to and from the forge server that it did the handshake with in the login phase. This is my solution when a player needs to connect to a vanilla server first(Like a vanilla lobby) and then after connect to the appropriate modded forge server.

#

I know that this means huge patches to bungeecord to work and this CAN break plugins, so thats why I'm thinking of making modern forge to work on Velocity first before i do a PR to waterfall

#

Also it takes a lot of time to make my patch meet the waterfall standard of quality and could take even more time to make it not break any plugins, but I have tried to keep it as simple as possible

wide maple
#

I’m not available to talk about this till the 11th, but I’m free for an open conversation about all of this after

viscid thunder
#

Ok

lusty sonnet
#

Has travertine been discontinued?

violet saffron
#

Yes.

lusty sonnet
#

Why?

violet saffron
lean gobletBOT
#

basically: 1.7 is dead

wide maple
#

and thats good imo

outer cosmos
#

MC 1.8 death in MC 1.18? ❤️

lean gobletBOT
#

doubt

uneven pendant
#

people still swear by jitterclick combat 🙄

outer cosmos
#

Doubt, too. But don't destroy my dream.

lean gobletBOT
#

s/jitterclick/cheat client

#

Correction, <DiscordBot> <12naom e [not very smart]> people still swear by cheat client combat 🙄

uneven pendant
#

TRUE

weary grove
#

It's a demonstrable regression from legacy Forge which could interoperate with vanilla servers

viscid thunder
wide maple
#

@vestal trellis waterfall has broken spectator mode?

#

I know the cause

vestal trellis
#

Bungee has as well

#

yeah

wide maple
#

tablist Bork

#

Kenny test with tablist rewrite disabled please

#

If that fixes it I know what to PR

#

Am still at work

vestal trellis
#

isn't that a Waterfall thing?

wide maple
#

Yes

vestal trellis
#

Bungee is also broke

wide maple
#

Enable that feature

vestal trellis
#

oh

wide maple
#

If that fixes it I know what I need to do

sharp isle
wide maple
#

Depends on if that fixed it @vestal trellis

vestal trellis
#

it didn't

wide maple
#

oh wait

#

OH MY GOD

#

wait what

#

I need to check something

#

no way they listened to my suggestion

#

I just need to make sure

wide maple
#

I’m just about ready to PR a permanent “fix” to the entity mapping in waterfall

sharp isle
#

Not using it is the best solution

bleak current
#

Will travertine support 1.17 soon?

lean gobletBOT
#

travertine is dead

uneven pendant
#

travertine is dead

#

phoenix how were we thinking the same thing

#

robots taking over 👀

lean gobletBOT
#

heyo ✋

sharp isle
bleak current
#

thanks

somber prism
#

and travertine does support 1.17, you just shouldn't use it

outer elbow
#

is there a way to detect what's logged in console and be able to cancel it by chance?

trail plume
#

using log4j, yes

#

as for specifics on it, not all too sure

outer elbow
#

alright
i'm really just trying to filter this spam from the one ip

trail plume
#

I'd just use the firewall but 🤷‍♂️

outer elbow
#

my host would only be able to block it on a node level unfortunately

outer elbow
#

awesome i got it to work with log4j filtering, thanks

mighty karma
#

Getting this error when loading my Waterfall plugin

[14.06 15:29:22] [Server] [ERROR] java.lang.IllegalStateException: Error while loading plugin ArgonStaff.jar
[14.06 15:29:22] [Server] [ERROR]     at bungeepluginmanager.PluginUtils.loadPlugin(PluginUtils.java:181)
[14.06 15:29:22] [Server] [ERROR]     at bungeepluginmanager.Commands.execute(Commands.java:75)
[14.06 15:29:22] [Server] [ERROR]     at net.md_5.bungee.api.plugin.PluginManager.dispatchCommand(PluginManager.java:212)
[14.06 15:29:22] [Server] [ERROR]     at net.md_5.bungee.api.plugin.PluginManager.dispatchCommand(PluginManager.java:163)
[14.06 15:29:22] [Server] [ERROR]     at io.github.waterfallmc.waterfall.console.WaterfallConsole.runCommand(WaterfallConsole.java:30)
[14.06 15:29:22] [Server] [ERROR]     at net.minecrell.terminalconsole.SimpleTerminalConsole.processInput(SimpleTerminalConsole.java:87)
[14.06 15:29:22] [Server] [ERROR]     at net.minecrell.terminalconsole.SimpleTerminalConsole.readCommands(SimpleTerminalConsole.java:181)
[14.06 15:29:22] [Server] [ERROR]     at net.minecrell.terminalconsole.SimpleTerminalConsole.start(SimpleTerminalConsole.java:143)
[14.06 15:29:22] [Server] [ERROR]     at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:85)
[14.06 15:29:22] [Server] [ERROR]     at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
[14.06 15:29:22] [Server] [ERROR] Caused by: java.lang.NoSuchMethodException: net.md_5.bungee.api.plugin.PluginClassloader.<init>(net.md_5.bungee.api.ProxyServer, net.md_5.bungee.api.plugin.PluginDescription, [Ljava.net.URL;)
[14.06 15:29:22] [Server] [ERROR]     at java.lang.Class.getConstructor0(Class.java:3082)
[14.06 15:29:22] [Server] [ERROR]     at java.lang.Class.getDeclaredConstructor(Class.java:2178)
[14.06 15:29:22] [Server] [ERROR]     at bungeepluginmanager.PluginUtils.loadPlugin(PluginUtils.java:170)
[14.06 15:29:22] [Server] [ERROR]     ... 9 more
#

First time coding Waterfall plugins so if it's some really stupid error don't judge haha

wide maple
#

@mighty karma you’re trying to use the PluginClassLoader for something custom?

mighty karma
#

Oh I used BungeePluginManager to load my Jar

#

Should I just restart the bungee?

wide maple
#

Well yes

mighty karma
#

Okay

austere meteor
#

Hey, macht es einen Unterschied wenn ich MongoDB Asynchron mache oder MongoDB Sync aber darum aber eine Scheduler Asynchron mache?

wide maple
austere meteor
#

Okay danke

chilly coral
#

<@&748618676189528155>

tawdry narwhal
#

They are already mooted

bleak current
#

ez

dense field
#

Anyone know how I can make plugin configs send bungee commands?

lean gobletBOT
#

you just code it? thonk

uneven pendant
#

boutta ask what the waterfall repo is

#

check pins and it's there

#

wow me and my good habits

uneven pendant
#

so, how does one go about registering a listener?

#

bungee wiki says getProxy().getPluginManager().registerListener(this, new Events());

#

but that doesn't seem to work for me

chilly coral
#

Make sure you annotated methods with @EventHandler

uneven pendant
#

did

chilly coral
#

Then it is registered

uneven pendant
#

yet it doesn't fire

#

IntelliJ is yelling at me on this part

#

probably some import i'm missing?

chilly coral
#

Wut

#

new Events() is supposed to be the class that implements Listener where the events you listen are

#

So just change it to whatever name you used

uneven pendant
#

ah

#

i see

#

thanks!

chilly coral
#

Just like with Bukkit

uneven pendant
#

oh lmao i just suck at reading

#

Once you have completed your Events class, you must register the Listener in your main class. You can do so like this:

uneven pendant
#

just me or are the waterfall javadocs 404ing a lot when searching for stuff

trail plume
#

.jd

lean gobletBOT
cerulean kettle
#

Hello is there any reason waterfall wasn't updated to latest BungeeCord version?

trail plume
#

busy elsewhere and generally didn't seem ultra important with our existing patches

cerulean kettle
#

sure, thanks and nice to know

#

Just asked to know if there were any issues, i just made a pr

trail plume
#

We now have two empty string checks

cerulean kettle
#

oh true

#

i shall remove it then

trail plume
#

Q is generally "which one does a better job'

cerulean kettle
#

i think bungeecord does it better as it does it before anything else right?

#

anyways where is the second empty string check?

#

i just see the precondition one

#

the bungeecord update just checks max size

trail plume
#

The last patch that was touched in that commit iirc

cerulean kettle
#

this?

#

oh yeah thats true

#

but wont that give a generic exception?

#

i mean some kind of index out of bounds...

#

maybe using foreach with the precondition empty check before it would be the best solution?

#

i think in the current state it will throw an exception that can be used for dos attacks or not checked at all

vague badger
chilly coral
#

1 - your waterfall is outdated
2 - what command are you running ?

trail plume
#

I mean, it's jitpack

#

make sure that you have the paper repo added, but, eer... Welcome to the joys of having jitpack in your setup

vague badger
vague badger
#

i have paper as repo

trail plume
#

accept it

#

Not much you can do, this is basically just typical jitpack being shit

#

move the paper repo higher up in the list of repos maybe

#

sometimes that can help

vague badger
#

didnt help ;C

red pumice
#

why was travertine archived?

tawdry narwhal
#

Minecraft 1.7 is over 7 years old at this point, and we would rather put our time towards other projects.

red pumice
#

thanks

exotic perch
#

I'm pagging irl

cerulean kettle
wide maple
uneven pendant
#

are the waterfall docs for 1.17 out already?

#

or are they the exact same as 1.16?

wide maple
#

Since bungeecord doesn’t support resourcepacks I don’t think there should be any notable changes

mighty fossil
mighty fossil
cerulean kettle
#

you can run viarewind on waterfall

#

like i do for my hcf server

#

sadly its the only solution for now, players wont switch to 1.8

rough bronze
#

How can I make a Paper Plugin interact with a Waterfall Plugin?

trail plume
#

You'd need to communicate over the network

#

plugin messages, a message broker, etc

rough bronze
#

A what a what what what?

#

What would be an example of this?

red pumice
#

What would happen if you were to remove something from ProxyServer#getServers? Would it "unregister" the server?

potent lichen
#

don't modify getServers, you should use the appropriate methods instead

lean gobletBOT
#

yes, but please use your plugin's logger, not the proxy logger

next veldt
#

How would i get the value of a config value on waterfall. Like on paper you would use getConfig().getString(path); what would i use on water fall

trail plume
#

You'd load the yaml configuration manually

#

YamlConfig...load() or something, read the bungee API docs

next veldt
#

i was struggling to find it

bleak current
#

Hello, I'm looking for method that disables the plugin I choose. Paper API has a PluginManager#disablePlugin and I'm wondering if something like that exists in the Waterfall too or I must solve it other way.

trail plume
#

no, bungee API doesn't have a mechanism to disable single plugins afaik

bleak current
#
        for ( Plugin plugin : Lists.reverse( new ArrayList<>( pluginManager.getPlugins() ) ) )
        {
            try
            {
                plugin.onDisable();
                for ( Handler handler : plugin.getLogger().getHandlers() )
                {
                    handler.close();
                }
            } catch ( Throwable t )
            {
                getLogger().log( Level.SEVERE, "Exception disabling plugin " + plugin.getDescription().getName(), t );
            }
            getScheduler().cancel( plugin );
            plugin.getExecutorService().shutdownNow();
        }``` I see it does something like that inside the proxy.. hmm
#

Okay I will solve it somehow, thanks! =)

trail plume
#

yea, it just calls onDisable on shutdown, theres no real runtime mechanism, it doesn't even clean up after itself

chilly coral
civic valve
#

Does bungee just drop that packet?

#

If yes someone should make an issue saying that to remind him

chilly coral
#

everything is explained in the comments

lofty ridge
#

maybe drop a comment to remind him

#

might have forgotten during 1.17 update scramble

shrewd moth
#

Any idea when papers updating to 1.17

lethal summit
#

hi... i have gotten a src from a friend, i tried to put it in github, created an pom.xml but this and more error appears, I think the path is wrong but idk how to change

trail plume
#

BungeeCord class is not API afaik

#

If you're using proxy internals, you'll need to install it into your local maven repo manually

lethal summit
#

the friend used it with waterfall in the dependencies in intellij

trail plume
#

So, they where depending on the jar which exposed internals rather than just the API

#

You'll need to modify it so that the internals are removed, or depend on the internals, which are not deployed to the maven repo, so will need to deploy it yourself

lethal summit
#

i cant code so the first option go away, so what I must take in my .m2?

trail plume
#

You'd need to build waterfall and then run mvn install

#

I think that will install the internals but god knows

lethal summit
#

waterfall build was successful ( ./waterfall b & mvn clean install)
but same error on building the waterfall plugin, i could build it if /main/java and the resources folder werent there, but the jar was too small and proxy said no bungee.yml so i created them and yet Im at this point

trail plume
#

in your pom youneed to depend on waterfall-proxy now

#

once again, this is not API however

wide maple
#

dont take this as advice, but if you need to hack something to compile quick and dirty its always easier to do that in eclipse

trail plume
#

COMPILE WITH ERRORS GO BRRRR

lethal summit
lethal summit
wide maple
#

those compile errors are valid

lethal summit
#

how 😄

wide maple
#

youre not implementing the execute method, and the return type is a Collection not a List

lethal summit
#

yet i get even more errors 😦

chilly laurel
uneven pendant
chilly laurel
#

Yep linked in that pr lol

rough bronze
#

What is the difference between a ConnectedPlayer and a ProxiedPlayer

trail plume
#

former isn't even used 🤷‍♂️

mystic olive
lean gobletBOT
#

don't add more than 128 channels?

mystic olive
#

What adds that Channels?

trail plume
#

generally mods

#

bungeecord has a flaw in how it handles channel registrations and stuff

mystic olive
#

it is when someone teleports x times between the servers

#

Something is stacking up than

trail plume
#

Yes, because it piles up stupid messages like the brand message, as has been stated

#

See what is literally the first open issue on the issue tracker

mystic olive
#

Is there a way for me to clean those channels?

trail plume
#

Please actually go look at the issue

#

There is a proposed fix, I don't like it and there is a better solution for it but I've not had the time/health to deal with it

mystic olive
#

i do, everyday

trail plume
#

I mean, you linked a closed duplicate of the issue I'm talking about

paper fjord
#

do the permissions register just by adding the "whatever.whatever" to the command's constructor

lean gobletBOT
#

depends on how you compile it

#

if you just maven package it should not change anything

trail plume
#

commit in the waterfall folder, rebuild patches

#

to build, build with maven

wicked lantern
#

ty

wicked lantern
trail plume
#

Read the paper contrib guide

#

it goes over how the tooling works and such

#

oh, waterfall has its own contrib guide, forgot about that

shy drum
#

how to build Waterfall based on my custom BungeeCord fork?

wide maple
#

If you have a custom bungee fork you can probably re-base your changes on waterfall and create a patch from them

tame sparrow
#

Is it possible/okay to run blocking code (up to 100 ms) for a ServerKickEvent?
As I want to make to make it so when someone get kicked, it will grab a fallback server from a remote service, to kick redirect the user towards that server

wide maple
#

Should be fine, but I wouldn’t delay it much longer

sage crypt
#

i'm writing a bungeecord plugin and trying to run it on a waterfall server. it loads properly, but none of the events appear to be working. i'm reasonably certain that i've followed the instructions detailed here accurately

https://www.spigotmc.org/wiki/event-api/

but it still doesn't respond to any events whatsoever.

  1. I have a class that extends Listener (from the net.md_5.bungee.api.plugin package)
  2. This class has methods in it that take events as parameters, and have @EventHandler annotations above their method headers
  3. In the onEnable method in my plugin's main class, i register the listener class mentioned above

i'm really not sure why this isn't working. i've put print statements inside of the onEnable method, and they all show -- so the plugin is getting loaded and its onEnable method is being called. yet none of the events work

#

please let me know if this is more appropriate for the #waterfall-help channel

chilly coral
wide maple
#

Can do in a few

trail plume
#

You've not really given us anything to go off and I generally don't like tryna drag info out of people or pissing in the wind

eager hill
#

I assume importing net.md_5.bungee.connection.InitialHandler, when using the Waterfall API, is disabled for a reason?

trail plume
#

it's not API

eager hill
#

Understandable, have a great day.

chilly coral
#

@wide maple, I gave it a try and opened a PR

chilly coral
#

There is no main thread in BungeeCord

chilly coral
trail plume
#

no

sage crypt
#

this is from the event listener

#

this is from the main class's onEnable method

#

the print statements shown in the onEnable method all get printed. none of the event handlers get fired at all, though

#

i have tried building this with the bungeecord API as well as with the waterfall API. neither works

#

i understand that you don't like trying to drag information out of people, but if there's any more information that you need, please ask.

trail plume
#

use the logger, not system.out

#

generally looks fine, can't say, try doing a clean build

sage crypt
#

hasn't changed anything.

trail plume
#

logs?

sage crypt
#

there are no compiling errors and checking the .jar indicates that this class is compiled

#

just a moment.

#

upon connecting, the PostLoginEvent handler should have fired and printed something

trail plume
#

I have no idea, best I could say is maybe look at it through a decompiler and see if everything is there