#waterfall-dev
8550 messages · Page 3 of 9
I think it can listen to any packet I provide, just gotta be DefinedPacket
you can probably inject a ChannelDuplexHandler to get the JoinGame packet
alas- No clue
I'll give it a shot. Thanks so much for the help 🙂
That LoginPayload?
No, literally, Login
Found it! Awesome.
@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
Got it working! I spent days trying to find a solution! Thank you so much 🙂 Could you send me your PayPal?
( @wide maple ^ )
Nah I’m good. You should rather donate that money to a charitable organization if you’re so inclined
That's for telegram integration for online-mode: true server.
of mybad then, check the other points i told
@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
how would i run code with a delay? is there some sort of BukkitRunnable but for bungee?
iirc, no, you get a scheduler which is basically just the typical java thing iirc
BungeeCord.getScheduler()
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.")));```
Don't put legacy text into a component...
should i use TextComponent.fromLegacyText or just no new TextComponent in general?
fromLegacy
that way it actually creates real components vs relying on the janky parsing of legacy text that the client does
gotcha
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
You have to wait for the queued connection to time out- I remember seeing this in the switching logic to my dismay
hm ok. How would i do that?
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
God I much prefer the velocity approach to this https://jd.velocitypowered.com/1.1.0/com/velocitypowered/api/proxy/ConnectionRequestBuilder.html

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?
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
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
does that class exist in your plugin jar?
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
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
Hmm, I'll try to create a minimal reproducible example
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
That would be stupid
Lol
- the full connection is not encrypted, e.g. proxy > server
Isn't it with something like Velocity?
- 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
Oh I do
So I'm not worried abt that
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
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
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
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
so, why does waterfall call a method that does not exist, but can still run fine without any build errors?
lombok
what?
what is it?
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
ok, thanks
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
doesn't intellij include lombok support by default now?
also pretty sure the api artifact doesn't require lombok
IDEA has Lombok by default
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
in the protocol documentation there's a sender UUID: https://wiki.vg/Protocol#Chat_Message_.28clientbound.29
but how do I specify it using the bungeecord/waterfall API
I was looking at CommandSender
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
you'd need to use the legacy serialiser if you waned it as a legacy string
well what'd be the best way to go about checking if a kick reason contains _
using the serialiser is probably easier unless you wanna go checking the entire tree
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
javadocs are a PITA, I gotta figure out how we hacked it back together for papers javadocs
is there any reason why .getKickReason() is deprecated?
was deprecated when it was added by upstream
you mean it was deprecated as soon as it was added to waterfall??
when it was added to bungee, yes
why lol
🤷♂️
so it should be fine to use???
unstable? god knows, bungee really fucks up a lot of stuff in this area
Yea, should be fine
aight well I'll use that then and save some time
aren't the spigot devs terrible generally?
like instability
and potential explosion changes
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
I mean, shamefully we're stuck to dealing with the same stuff because we extend off them
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??
yes
i found out bukkit was made by minecraft dev recently
forgot his name
dinnerbone
craftbukkit i assume was a fork / improvement on that
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
glowstone is completely open source right?
yes
like standalone effectively
if cuberite was fully featured that would be amazing for server hosting
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
the client is gonna be in a different language
only the server is java?
yup
I mean to be honest minecrafts shitty performance is probably mostly down to the coding of the base game not java itself
i did not know that
ok im a bit of a java noob
how would I access the ServerInfo
/ cancelServer
probs getter methods on there
bungee uses lombok, and the lombok javadoc stuff basically broke a while ago
right well is it possible for you guys to just takeover spigot
and solve everything
at least for the server we're planning to hardfork
:o
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
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
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
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
you return when you set it to true
..
lol
this isn't my code im just tryna fix it
why did he do that...
im guessing it should return when false
I'm guessing it should be a break.
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
IntelliJ's static analysis is pretty good, yeah
No problem
why'd people use gitlab -_-
GitLab has quite a bit of functionality. GitHub has been catching up, though.
At some point, we might get to a point where Waterfall is officially deprecated, with Velocity as the replacement. But plugin support remains the main reason why that won't happen.
(Those of you familiar with the story already know, but Velocity was spawned after I'd started work on a hardfork of BungeeCord.)
Why is waterfall even still a thing? If the forge patches don't work, what else does waterfall even change from bungeecord?
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)
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
did you look at forced hosts? Whats this endpoint here for?
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)
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?
Why was entity rewrite code removed from 1.16.2+ in BungeeCord?
probably because unnecessary ?
is it anyone here that knows how the object is generated?
..yes my pf pic is changed
what object
This one in net.md_5.bungee.netty.HandlerBoss
My call-trace in the debug, ends here
So i have no idea what called it
it is not generated
another step in the pipeline reads the bytes and instanciate the object
Can you specify where it does that?
If entity rewrite is unnecessary from 1.16.2+, would 1.17 be the same? I still do not understand it. 😭
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
Thank you so much for your answer!
why was it ever rewritten in the first place?
because it used to be the only way for it to work
That's not been the case for years
It hasn't been necessary for every version of Minecraft ever, basically. Waterfall has had an option to turn it off, and Velocity has implemented the functionality from day 1.
oh thank you!
Hello, how to change a player's name? changing the displayname still send the original name to the server
What you’re trying to do is not supported by the API. You’ll have to use internals
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
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!
proxy is not aware of server worlds
That's what I thought, but had to ask anyway, maybe I was missing something
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?
Take a look at the velocity mod crosstitch to understand this issue. Forge has custom completion providers and those are not happy with what’s present on no-modified versions
yes
I will take a look at that
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?
🤯
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.
How cool is that because I've been waiting for a long time
Yes me too
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.
I don't think people will like how I rearranged the handshake/login procedure
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.
I own a medium server myself, and this was originally so my friends could play newer modpacks on my server network
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
I think forge already does this, because everything comes in a "forge:enum" type
So i just pass it to the client
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
People are talking way above my head in here.
How would PlayerInfo#ADD_PLAYER look like? (the property) I have both value and signature.
if you mean the game profile, it's a game profile, has all the info that a game profile usually has
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
(you should reset that webhook url btw)
@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

Are you using waterfall or bungee?
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
^^ the flow doesn't care if you try to connect somebody elsewhere in that event, use the setter on the event
Thats what I would've though to but it I don't see one on the docs: https://docs.phoenix616.dev/bungee-api/net/md_5/bungee/api/event/PostLoginEvent.html or the source: https://github.com/SpigotMC/BungeeCord/blob/master/api/src/main/java/net/md_5/bungee/api/event/PostLoginEvent.java
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
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
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?
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
requires them to connect to a forge server first for the handshake to occur
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
Yes, it will also fall though but not always pretty iirc
Well, if you had any forge mods which are needed on the client
OK I'll try this before making the plugin thanks guys :)
How did it go?
I kind of want to add this to my Essentials plugin if it worked out.
How does the TaskScheduler get instantiated? I am trying to recreate it for a different project I am using. (Not waterfall / bungee.)
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
#642 no. Make it a module if anything.
@ zzzcat update pr is tested good
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
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
Is there a way to do it inside Waterfall using its libraries?
Yes
I'm making a patch
see the packet registry
Basically, yes
registerPacket calls into the registry
can either use that stuff or throw your own stuff in manually
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?
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
you don't calculate the length of it
you need to actually read/write it to know the length
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?
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
and how you format that is 100% irrelevant to the packet format there
I got it work, thanks anyway
Where are you releasing that other buffer?
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
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
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
better?
It has changed since i got it to work compared to the previous pic
Oshiit
Can I ask what you’re trying to accomplish- this looks like a forge handshake pass-through
How do you reset the client?
without resetting the client it's not really gonna work for server switching
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
Right now, you can only switch back to the server you first joined
i really just think that there should be a switch packet
zzzCat you’ll love my write-up
client recieves a switch packet with some payload of where to reconnect and some security token
...If its forge
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
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
The issue with forge is that mods need to transmit data over plugin channels- and by not resetting it that will just break.
The 1.12.2 system and below worked but only because not a lot of things broke by being handled like that
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
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
... By no means is it finished yet
which means that you can't sync the data from the forge server
And if you join a vanilla server first I assume mods won’t work if you join forge, right?
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
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
The problem you’ll run into is that you’ll have to simulate the exact response to correctly activate the mods first
From vanilla
And I assume the mods init will also cause you issues
I will have to experiment more with that
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
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
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
that's gonna be firewall related
hmm, I added rules for win-firewall and disabled my soft firewall (glasswire)
but I'm still getting the same issue
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.
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
Okay. How I can make a plugin, which adds a command to every bungee server, whith which Admins can redirect specific players
Where is it?
.g bungee messaging channel tutorial
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?
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
you use the name of the player
Which player?
the player you want to connect to another server
I don't want to move the player, who entered
if you want player X to connect to the server, you could just use Connect and sent it over player Xs connection
For example: /redirect <playername> <servername>
How I can use this?
How is the listener gets the playername?
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
But the playername is from a command.
So, put the argument from the command in there
@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");
}
}```
How I can get it?
Once again, you are NOT recieving a plugin message
Must I call this.onPluginMessageReceived()?
No, because you are NOT recieving a plugin message
that interface is for recieving plugin messages
My english isn't that good.
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
Okay.
this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", this);```
With this? Right?
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
Like this in the command?:
{
this.plugin.getServer().getMessenger().registerOutgoingPluginChannel(this.plugin, "BungeeCord");
sender.sendMessage("§aDer Spieler wurde erfolreich auf den anderen Server verschoben.");
}```
you send the message from the command, not register your resources in there
And how I can send the message from the command?
Read the wiki on how to contruct and send a message
this.method()
Ah
player.sendPluginMessage(this, "BungeeCord", out.toByteArray());
I didnt see it
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.
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
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()) } } }
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
}```
so my message is not being sent?
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
how can I check if its sending the packet or not
Well, make sure that you're not just logging packets sent from the client
@ 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.
there is no auto updater for paper
ah, i thought commits from aikar were auto ones
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
is possible to have a bungeecord of bungeecords?
not supported
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?
what
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
code ?
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());
}```
asString?
same question
public String asString(PluginMessageEvent event) {
return new String(event.getData(), StandardCharsets.UTF_8);
}```
use a ByteArrayDataInput
and then readUTF
writeUTF uses a length preprended string
is there some other separator I can use?
but yes, easy fix is what zzcat said
just write multiple time
and then you can even consider using stuff like gson, etc
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
I mean, for what you're doing there, why not just use the built in messaging channel?
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
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
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?
you write that to a single byte array and then read each element
yeah I've already read this, I just had a brain fart
:/
well thanks for the help
np
How would i fake the server brand?
what
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
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.
#rrbbgg
You have to use components imo
I don't think the legacy § formatting supports hex color
(i may be wrong)
theres some weird mangled format, xRRBBGG, with an & before each one
Yes the bungee-chat lib has something weird lije this but is it supported by minecraft client in legacy strings ?
that's dealt with by bungee chat when it converts stuff to a component from the legacy crap
btw, the replace method returns a new string, it does not edit the existing one
How do I get only one of the BaseComponents, and make sure it is the correct one?
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
yes the BaseComponent[] stuff is stupid
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.
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
pretty sure yes
might be depends
oh, no, is depend
Oh, "load"
no, you can't control the load order, depend handles enable order
I use depend to control it, but it still have ClassNotDefException
I don't know how to solve it
how do i disable a plugin in bungee/waterfall
Remove it from your plugins folder
nah as in programmatically
in spigot or whatever youd do getPluginLoader.disablePlugin
is there an equivalent for waterfall?
you can unregister listeners and commands maybe?
yeah
use bungeecord forks yikes
i also have an open pr for that at bungeecord
I mean, this IS a bungee fork lol
people are just crashing bungeecord with empty packets 🤣
feel free to open a pr on waterfall for it
yeah sure 🙂
Un/re/loading plugins at runtime is bad
It creates lots of known issues and a restart is always the better solution
nope, you can see on my pr its fully safe
- You’re not concerned with dependent plugins
- Only tasks using the synchronous part of the scheduler will actually be cancelled
- You can’t ensure that the plugin didn’t inject anything into the proxy
- Active parts of the software will stay in memory till they either gracefully disappear or create a memory-leak
- 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)
- You don’t account for class-loading of plugins on their own. While it’s bad practice, many still do that.
- 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
its fully safe
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.
just replace all references with weak ones 
Reference-count all your objects

just like use free() lol
well i could remove class loader release. and its developer who use this api's responsiblity to unload safe plugins(as i called #onDisable() ) but yeah i do agree with your points. but i see people have been requesting this future in bungeecord for years.
@ zzzCat early merge?
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
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?
something sending duplicate teams in general
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?
yup
hmm
Does Waterfall have a way to add Maven dependencies to the classpath without reflection with Java 16? (similar to Spigot/Paper using plugin.yml)
can't you just load them with the class loader?
yes, bungee added it last month or something
illegal reflection to add to the existing classloader
Java 16 enforced strong encapsulation so can't URLClassLoader#addURL anymore
I see
--illegal-access=permit works for the time being as a JVM flag but looking for a proper permanent fix
I feel like the proper fix is shading or directly adding them to the classpath on startup
Shading ofc, but some platforms have file size limits
well you could always add a way to manually add the dependencies
but yeah, Bungee supports the same libraries loading method that spigot does
can you elaborate? I'm not very familiar with Java class loading in general, so trying to figure this out here :D
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)
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
must be some shitty hosts then if they don't allow you to use the full power of java
runs
\kick phoenix616
he not wrong
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 ¯\_(ツ)_/¯
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
I also looked into how Lucko did the dep loading in LP but it looked pretty difficult
LP is over-engineered as Heck
Well, it's a big plugin
That said, 1,5 years with Java isn't much experience
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
That's also how I understood it 🤔
some jar-in-jar shenanigans, plugin loader loads the plugin & deps
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
Mmh, probably also an universal solution for every platform
wrong channel?
hey @flat arrow see #420 (nice) was that fixed?
pretty sure that they fixed that in the newer version?
nice
Thanks for the ping as well.
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()
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
I'm working on the pr for bungeecord
if anyone has an information we are missing about actionbar chat/title packet
https://github.com/SpigotMC/BungeeCord/pull/3107
fixed in bungeecord
The action bar packet which was added a few versions ago is the proper method to send action bar messages
😅
well that was the first version of the fix
but md-5 told me to use the chat packet
so...
why did they add a new packet for that? smh
oh they also split up the title into multiple packets, interesting (or annoying)
they split every action field in packets
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
i think we all agree with you kashike
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
well at that time https://bugs.mojang.com/browse/MC-119145 existed though so ¯_(ツ)_/¯
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
I can reopen a pr with https://github.com/SpigotMC/BungeeCord/commit/2de3c812743e2b9c9c609885e0bf9ccb55ae5a13
lets wait a bit imo
imo you should, that change is what should go in
the packet exists for a reason, it should be used for its intention
pr to waterfall or directly bungee ?
oh wow, just saw that the action bar shows as a full title without that patch lmaop
that's how we found the issue lmao
"humm, this text was not supposed to be THAT big"
heh
yeah, I have action bar join messages and the first thing I see is my big usernamexD
😅
feel free to ping me if you open a PR with that gain to BungeeCord@sharp isle
he's writing it
@lofty ridge https://github.com/SpigotMC/BungeeCord/pull/3108
👍'd
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
I’m very sorry to say this but we are most likely not going to accept that PR on velocity. That implementation is too heavy on what-if scenarios
I’m not available to talk about this till the 11th, but I’m free for an open conversation about all of this after
Ok
Has travertine been discontinued?
Yes.
Why?
basically: 1.7 is dead
and thats good imo
MC 1.8 death in MC 1.18? ❤️
doubt
people still swear by jitterclick combat 🙄
Doubt, too. But don't destroy my dream.
s/jitterclick/cheat client
Correction, <DiscordBot> <12naom e [not very smart]> people still swear by cheat client combat 🙄
TRUE
It's something we're open to considering, but the need to direct connect to a Forge server first is very close to a dealbreaker
It's a demonstrable regression from legacy Forge which could interoperate with vanilla servers
Yeah, i thought so. But its only necessary when needing to connect to vanilla first, that functionality could be made into a separate plugin.
tablist Bork
Kenny test with tablist rewrite disabled please
If that fixes it I know what to PR
Am still at work
isn't that a Waterfall thing?
Yes
Bungee is also broke
Enable that feature
oh
If that fixes it I know what I need to do
Do you have more informations on the issue ?
Depends on if that fixed it @vestal trellis
it didn't
Can have one of two reasons: The UUID in the tab-list update for the client gamemode doesnt match the client UUID or the abilities packet got mangled
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
I’m just about ready to PR a permanent “fix” to the entity mapping in waterfall
Not using it is the best solution
Will travertine support 1.17 soon?
travertine is dead
travertine is dead
phoenix how were we thinking the same thing
robots taking over 👀
heyo ✋
thanks
and travertine does support 1.17, you just shouldn't use it
is there a way to detect what's logged in console and be able to cancel it by chance?
alright
i'm really just trying to filter this spam from the one ip
I'd just use the firewall but 🤷♂️
my host would only be able to block it on a node level unfortunately
awesome i got it to work with log4j filtering, thanks
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
@mighty karma you’re trying to use the PluginClassLoader for something custom?
Well yes
Okay
Hey, macht es einen Unterschied wenn ich MongoDB Asynchron mache oder MongoDB Sync aber darum aber eine Scheduler Asynchron mache?
Ist relativ egal solange du im Kontext vom dem bleibst was du machst, und dabei nicht den proxy blockierst
Okay danke
<@&748618676189528155>
They are already mooted
ez
Anyone know how I can make plugin configs send bungee commands?
you just code it? 
boutta ask what the waterfall repo is
check pins and it's there
wow me and my good habits
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
Make sure you annotated methods with @EventHandler
did
Then it is registered
yet it doesn't fire
IntelliJ is yelling at me on this part
probably some import i'm missing?
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
Just like with Bukkit
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:
just me or are the waterfall javadocs 404ing a lot when searching for stuff
.jd
Hello is there any reason waterfall wasn't updated to latest BungeeCord version?
busy elsewhere and generally didn't seem ultra important with our existing patches
sure, thanks and nice to know
Just asked to know if there were any issues, i just made a pr
We now have two empty string checks
Q is generally "which one does a better job'
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
The last patch that was touched in that commit iirc
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
Yo guys i always get this Warning while Compiling, and its Annoying so how can i remove it? ```Could not transfer metadata io.github.waterfallmc:waterfall-api:1.16-R0.5-SNAPSHOT/maven-metadata.xml from/to jitpack (https://jitpack.io): Authentication failed for https://jitpack.io/io/github/waterfallmc/waterfall-api/1.16-R0.5-SNAPSHOT/maven-metadata.xml 401 Unauthorized
1 - your waterfall is outdated
2 - what command are you running ?
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
i am just building it with Maven, i updated paper now btw i didnt send all warnings these are all of them ```Could not transfer metadata io.github.waterfallmc:waterfall-api:1.16-R0.5-SNAPSHOT/maven-metadata.xml from/to jitpack (https://jitpack.io): Authentication failed for https://jitpack.io/io/github/waterfallmc/waterfall-api/1.16-R0.5-SNAPSHOT/maven-metadata.xml 401 Unauthorized
well i have an API of someone who uses Jitpack so what should i do
i have paper as repo
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
didnt help ;C
why was travertine archived?
Minecraft 1.7 is over 7 years old at this point, and we would rather put our time towards other projects.
thanks
I'm pagging irl
btw if you want 1.7 support you might want to use viarewind which is better maintained
That doesn’t change the fact that you need a proxy that supports that version

Since bungeecord doesn’t support resourcepacks I don’t think there should be any notable changes
im confused... i wonna try the 1.17 api via gradle but it cant resolve the repo for some reason
I know its there https://papermc.io/repo/service/rest/repository/browse/maven-public/io/papermc/paper/paper-api/
maven { name = 'papermc' url 'https://papermc.io/repo/repository/maven-public/' }
compileOnly group: 'io.papermc.paper', name: 'paper-api', version: '1.17-R0.1-SNAPSHOT'
i have to overlook something but can't find out what it is 🤔
still no idea why it can't resolve it... :/
nope
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
How can I make a Paper Plugin interact with a Waterfall Plugin?
What would happen if you were to remove something from ProxyServer#getServers? Would it "unregister" the server?
yes, but please use your plugin's logger, not the proxy logger
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
You'd load the yaml configuration manually
YamlConfig...load() or something, read the bungee API docs
i was struggling to find it
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.
no, bungee API doesn't have a mechanism to disable single plugins afaik
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! =)
yea, it just calls onDisable on shutdown, theres no real runtime mechanism, it doesn't even clean up after itself
@ kashike did we wait long enough before PRing this to Waterfall ?
https://github.com/SpigotMC/BungeeCord/pull/3108
Does bungee just drop that packet?
If yes someone should make an issue saying that to remind him
everything is explained in the comments
initial PR was this one: https://github.com/SpigotMC/BungeeCord/pull/3107
Any idea when papers updating to 1.17
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
BungeeCord class is not API afaik
If you're using proxy internals, you'll need to install it into your local maven repo manually
the friend used it with waterfall in the dependencies in intellij
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
i cant code so the first option go away, so what I must take in my .m2?
You'd need to build waterfall and then run mvn install
I think that will install the internals but god knows
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
in your pom youneed to depend on waterfall-proxy now
once again, this is not API however
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

COMPILE WITH ERRORS GO BRRRR
it worked... i took waterfall-api because it stands on github 😄
https://paste.gg/p/anonymous/fd01a02fb5bc496aaf9faf6a676b34f5 that gives this error 😦 should be an bungeecord wide tab completer
You need to fix those for it to compile

those compile errors are valid
youre not implementing the execute method, and the return type is a Collection not a List
yet i get even more errors 😦
https://papermc.io/javadocs/waterfall/
seem to be getting a 403 forbidden 
thats the link in the github, https://github.com/PaperMC/Waterfall, so it might have changed recently? not sure
@chilly laurel https://papermc.io/javadocs/waterfall/1.16/
Yep linked in that pr lol
What is the difference between a ConnectedPlayer and a ProxiedPlayer
former isn't even used 🤷♂️
still have this problem:
https://github.com/PaperMC/Waterfall/issues/498
don't add more than 128 channels?
What adds that Channels?
generally mods
bungeecord has a flaw in how it handles channel registrations and stuff
it is when someone teleports x times between the servers
Something is stacking up than
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
Is there a way for me to clean those channels?
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
i do, everyday
I mean, you linked a closed duplicate of the issue I'm talking about
do the permissions register just by adding the "whatever.whatever" to the command's constructor
depends on how you compile it
if you just maven package it should not change anything
ty
But one time rebuilded patches i build normaly?
Read the paper contrib guide
it goes over how the tooling works and such
oh, waterfall has its own contrib guide, forgot about that
how to build Waterfall based on my custom BungeeCord fork?
Read the CONTRIBUTING.md
If you have a custom bungee fork you can probably re-base your changes on waterfall and create a patch from them
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
Should be fine, but I wouldn’t delay it much longer
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.
- I have a class that extends Listener (from the net.md_5.bungee.api.plugin package)
- This class has methods in it that take events as parameters, and have @EventHandler annotations above their method headers
- 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
I tried to update Waterfall to latest BungeeCord, but i really don't know how to deal with the conflicting natives part 😫
Concerned commits:
https://github.com/SpigotMC/BungeeCord/compare/ad50fc9ad324d934e33dc47255359ef28712ba45...master
Can do in a few
i solved the first one this way, i think it keeps the same behavior
https://p.tomcraft.fr/a7a7f12.png
I'm just going to bump this
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
I assume importing net.md_5.bungee.connection.InitialHandler, when using the Waterfall API, is disabled for a reason?
it's not API
Understandable, have a great day.
@wide maple, I gave it a try and opened a PR
There is no main thread in BungeeCord
oh god #666
no
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.
use the logger, not system.out
generally looks fine, can't say, try doing a clean build
hasn't changed anything.
logs?
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
I have no idea, best I could say is maybe look at it through a decompiler and see if everything is there


