#waterfall-dev
8550 messages · Page 6 of 9
there, finally pushed it from the branch, i tested it time ago and it worked
Omg, thank you Cat!
Isn't it a good idea to add a new method to the ProxiedPlayer interface as well? For now the only way to use the suppression is by using request builder
maybe, kinda prefer the builder over several dozen overloads, only added that one cos I noticed that the retry thing would lose that
Well, builder looks much more cleaner for me, yeah, that super long method looks ugly
Anyway, thanks!
https://pastebin.com/rK48UEYV
Why does this kick the client?
this is the kick message
This is called in the server switch event
After further testing this appeared to crash the client even when using the code provided in this post
https://www.spigotmc.org/wiki/scoreboard-not-api/
here's the version my server is running
it's supposed to be a json component, not legacy text
at least for whatever element it's upset about, it clearly says that it's tryna parse something as json
Do you know if all parts need to be json? Also, this is kinda weird because the tutorial linked above doesn't mention having to format anything in json
don't mention
2 second look at wiki.vg says that the value is a component
or, no, "the score name"
hmmm okay
i have some code that updates the priority order of servers to join, and i was concerned about potential concurrency issues (mutating data/updating the backing array storage while another thread is iterating/reading it)java for (ListenerInfo listenerInfo : proxyServer.getConfig().getListeners()) { List<String> servers = listenerInfo.getServerPriority(); servers.clear(); servers.addAll(serversByPriority); }would this code run into any concurrency issues of that nature? or is it safe?
if anything reads from that from a different thread than the one modifying it then it would of course not be safe
if you really think that would become an issue syncronize on the list I guess but that seems like a hacky solution
I personally would just not use the inbuilt priorities but handle that in the plugin yourself
for synchronizing on the list to be effective, wouldn't waterfall have to also be synchronizing on the list too? or does java synchronization work differently than .NET lock(x) {}s
this is probably the best solution lol, will do.
new to waterfall, can you give me a method or two for where to go for doing that? my guess is i'd need to register a listener when a player joins and then call some send method to send them to a server (and cancel the event so waterfall doesn't handle it), but i'm new to minecraft stuff so i'm not sure
oh, yeah, I guess it wouldn't work either with synchronized
what you are doing is already pretty hacky, usually one wants to just use listeners and do the logic in the plugin
there are server connection events where you can send the target server directly
or if your goal is to only do that on connect then set a custom reconnect handler
alright i'll handle sending the player in some class that implements Listener, thanks 👍
ah wait i see what you mean by a reconnect handler, ill do that instead
new mesage in #waterfall-github
[PaperMC/Travertine] New star added
react with kekwhyper
funniest thing 😆😆😆😆
what's the most idiomatic way to maintain configuration in a waterfall plugin? i have something like this going on```java
import net.md_5.bungee.api.plugin.Plugin;
public class HeadControllerPlugin extends Plugin {
@Override
public void onEnable() {
String controllerIp = getConfig().getString("controllerIp");
}
}
```but since getConfig() isn't implemented, i'm wondering if there's something simple like bukkit's getConfig() lying around or if i'd have to implement getConfig() myself
solved - needed to read documentation lol https://www.spigotmc.org/wiki/using-the-bungee-configuration-system/
I heard bungee priorities work contrary to bukkit, is that true?
HIGHEST is first?
and
LOWEST is last?
no
they work exactly the same
(as you can see by their priority values: https://github.com/SpigotMC/BungeeCord/blob/master/event/src/main/java/net/md_5/bungee/event/EventPriority.java#L14-L18 )
no
there is bungeeguard
waterfall doesn't support modern forwarding
there is no plugin to fix that
somebody did start on a PR for adding that to waterfall but idk what the state was
(They told me to hold on review of it or something because of that)
tbh I would question why you need a separate bungee instance in the first place
I mean, maybe?
as said, there is a PR which was started on
like, it's an entire set of extra state, so, no idea if you can do it from a plugin, that's a question you'd need to answer yourself
I see. might be easier to just use BungeeGuard on all your servers or add a feature to set that on a per-server in velocity itself
I mean they could also try using Velocity with Snap but that's a pretty huge change for them for something that is basically an issue on your end 👀
I mean, either try that PR or modify WF yourself to add modern forwarding/see if you can skim it in a plugin, or use bungeeguard across the entire setup, or give up
I mean if your setup doesn't allow outside access anyways you could just not use forwarding secrets 👀
pretty sure it supports all packets between the client and the proxy
what do you mean by "LoginPayloadRequest"? the login plugin request packet/custom query packet?
what's your LoginPayloadRequest implementation?
uh
no, you need to use a Protoclize packet
their API works completely without you messing with bungee internals
see the Protocolize docs for the provided packets, the rest you need to implement yourself e.g. by looking at https://wiki.vg/Protocol
or the bungee/minecraft source
yeah pretty sure that's the one
Actually i need help creating an new patch (I already saw the guide, but when i commit my changes github just says that it's clean and nothing to commit) Even the git plugin of the IDE creates a patch but that system suck, is buggy as hell.
I don't find any solution because i did nothing wrong.
(I built waterfall cleanly)
Did all two times to ensure that wasn't my fault.
make commit in -Proxy, use script to rebuild patches, commit in the root project
Thanks, also i want to edit an patch but i thing that upstream/upstream it's an example, but when i put the rigth command it throws this git rebase origin/master Current branch master is up to date
So, i don't know what im doing bad.
It's not an example, upstream/upstream is the right branch
Well i get this error then:
fatal: invalid upstream 'upstream/upstream
then you probs ran it in the wrong folder
Can you explain me where i need to do it? I guess it's on patches folder?
No, it's in the -Proxy folder
Read the contrib guide for paper, stuff in -Server/-API is in -Proxy and upstream/upstream instead of base
Can you modify a ChatEvent just for 1 receiver/player?
well, no
Better tell me how to do it then.
chat event is just when the player chats and the message is sent to the client
if you where dealing with chat on the proxy you'd be cancelling that event for handling it yourself and then do whatever you want with it in terms of who/what you send
Just want to get what's send, don't really care what event it is, modify it just for 1 player and that's it.
https://github.com/SpigotMC/BungeeCord/blob/c7b0c3cd48c9929c6ba41ff333727adba89b4e07/proxy/src/main/java/net/md_5/bungee/util/AllowedCharacters.java#L10
Is there a way to overwrite that method?
I want to allow the "§" character, because I'm using Geyser and I want to allow this character to Bedrock Edition Players.
I mean, the event is there, you can modify it all you want, idk if it does what you're expecting though
fork the server and remove that check?
When I try to fork Waterfall and build it, it just says "Waterfall-Proxy" module is missing.
cos you need to apply the patches
And how can I do that?
So. What would be the best solution to my problem?
Without rewriting too much stuff?
krusic, waterfall basically doesn't handle chat
the event is fired and the stuff is just passed through
if you wanna modify chat itself for a single player you'd need to deal with a packet library or something
xD
How can I modify waterfall's code? I tried to change it but everytime I build it, it turns back to the old code.
make sure that you rebuild patches
or just build with mvn
read the contrib guide, etc
I tried to build it with maven but still the same results. my changes don't have a effect
if your patches are applied and you build with maven, then the changes will be compiled
if it's not working idk what to tell you
my patches applied? is there a command?
you did modify waterfall-proxy?
yes
then, if you run mvn package, your stuff will be in -proxy/bootstrap/target
yeah, but it still doesn't work. Or do i need to use the -shaded jar?
whateverjar was the largest
don't run stuff in onedrive
should just be the Waterfall jar
but, the fact that they're all the same size, idk what you did there
I just used maven
the fact that all those files are the same size, idk what to tell you
as said, don't run in onedrive
make sure that you've commited and rebuilt patches and such if you're gonna use the scripts to build; but, running maven directly should work fine
Onedrive is not the problem. Everything I did in onedrive before works flawlessly
onedrive has caused many issues in the past for people using our tooling and such, but, 🤷♂️
nvm... It worked now
maybe you are right with onedrive. I've deleted the entire target folder and rebuilt. Then it worked.
Thanks
Weird, never happened before tbh.
hey, i'm new to bungeecord development and i'd like to know how to add configuration values in my config.yml
This is the waterfall dev channel. Go to the bungeecord discord
waterfall is literally a fork of bungeecord so i mean
Hello, I'm used to bungee and stuff is everything on the paper doc supported from proxy? https://papermc.io/javadocs/paper/1.17/index.html
no, that's for paper, not waterfall
What I thought
Is there a specific doc for waterfall?
yes, it's linked on teh javadocs site
Wow thanks completely blind
Is there any reason why my plugin wouldnt be firing this event?
do you have it registered?
Good question
Do I still need to register if its in my my main class, no right?
you do
Would it be
getProxy().getPluginManager().registerListener(this, this);
```?
probably
yep :))
ty <33
Been a while so I'm a bit rusty
but forgetting that I guess im more dull then rusty 😂
wrong TextComponent import
how can I broadcast a message only to the staff?
For loop through players and check for a permission?
it works only for a single server
for (ProxiedPlayer p : this.getProxy().getPlayers()) {
if (p.hasPermission("bb.staff")) {
p.sendMessage("Hello");
}
}```
hello i have this warn in the console waterfall 😢
[23:54:54 WARN]: Plugin listener be.shark_zekrom.Events took 97ms to process event PostLoginEvent(player=shark_zekrom)!
[23:54:54 WARN]: Plugin listener me.lucko.luckperms.bungee.listeners.BungeePermissionCheckListener took 113ms to process event PermissionCheckEvent(sender=shark_zekrom, permission=HolocronMC.bypassMaintenance, hasPermission=true)!
[23:54:54 WARN]: Plugin listener be.shark_zekrom.listener.OnJoin took 306ms to process event PostLoginEvent(player=shark_zekrom)!
[23:54:55 WARN]: Plugin listener be.shark_zekrom.discord.Link took 104ms to process event PostLoginEvent(player=shark_zekrom)!
[23:54:55 WARN]: Event PostLoginEvent(player=shark_zekrom) took 513ms to process!
[23:54:55 WARN]: Plugin listener be.shark_zekrom.listener.OnJoin took 90ms to process event ServerConnectEvent(player=shark_zekrom, target=BungeeServerInfo(name=Station, socketAddress=/92.222.199.97:25567, restricted=false), reason=JOIN_PROXY, request=net.md_5.bungee.api.ServerConnectRequest@4c492611, cancelled=false)!```
it's my bungeecord plugin
I don't quite understand where it can come from
(ping me)
be.shark_zekrom.listener.OnJoin took 90ms to process event ServerConnectEvent
Why that is that way depends on your code.
What do you do in your Listener when a player joins?
i have this
public void serverConnectEvent(ServerConnectEvent event) throws SQLException {
if(!event.getReason().equals(ServerConnectEvent.Reason.JOIN_PROXY)){
return;
}
ProxiedPlayer player = event.getPlayer();
Connection connection = Database.getConnection();
PreparedStatement preparedStatementActualProfile = connection.prepareStatement("select * from players_profiles where uuid = ?");
preparedStatementActualProfile.setString(1, player.getUniqueId().toString());
ResultSet rsettingActualProfile = preparedStatementActualProfile.executeQuery();
if (rsettingActualProfile.next()) {
Integer actualProfile = rsettingActualProfile.getInt("actual_profile");
PreparedStatement preparedStatementLocation = connection.prepareStatement("select * from players_location where uuid = ? and profile = ?");
preparedStatementLocation.setString(1, player.getUniqueId().toString());
preparedStatementLocation.setString(2, String.valueOf(actualProfile));
ResultSet rsettingLocation = preparedStatementLocation.executeQuery();
if (rsettingLocation.next()) {
String planet = rsettingLocation.getString("planet");
if (!event.getRequest().getTarget().getName().equals(planet)) {
Main.getInstance().getProxy().getServers().get(planet).ping((result, error) -> {
if(error != null){
event.setTarget(ProxyServer.getInstance().getServerInfo("Limbo"));
} else {
event.setTarget(ProxyServer.getInstance().getServerInfo(planet));
}
});
//player.connect(ProxyServer.getInstance().getServerInfo(planet));
}
}
}
}```
it's a server target
- You should use try-with-resource blocks to automatically close the connections to the database
- You execute 2 querys on the database. Connections use a lot of time (in a programming sense) Try to use a join so it is only one query.
- Don't do a ping if possible. A ping will also travel over the (internal) network and take time. Try connecting the player directly to the planet and add another handler for when that connection doesn't work.
okay i will try all 🙂
@torpid rampartI made a system that if the server or the player must be put it is closed it is tp on another server
Hello,
I've created the command "/p h" with my bungeecord plugin but it's not working
And yes it's registered into the main class
i don't think you can have spaces in your command
commands can't have spaces in their name
exactly
yes
thanks
everything after /p will be considered an argument, separated by spaces
https://kodirati-is.not-an.engineer/UcljOk2M Pretty new to using gradle, for some reason it isn't building- can someone help?
You cannot use the BungeeCord class when you import the api of waterfall. You have to use the ProxyServer class.
Also you cannot compile if you have existing errors.
How can I get IntelliJ to understand the Gradle depends?
If you reload the project, IntelliJ will detect that automatically.
Tried many times.
Which one?
generally you use build itself
Well, as literally already said, you don't want the BungeeCord class, that's not part of the API
jar is in the build/libs folder
don't mention.
Sorry just did the reply thing lol
I mean, the thing places it in the folder I said
Wellll it's not here... I tried gradle build, gradle clean build, gradlew build, gradlew clean build, etc.
None of them lead to a JAR for some reason
build goal should dump out the jar into build/libs unless you changed something in the gradle setup to move it
I can't really comment based on the small info of what I can see
What information do you need?
Ah alright I got it now
What I've done wrong? My IDE can't find waterfall-api 😮
<repositories>
<repository>
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.github.waterfallmc</groupId>
<artifactId>waterfall-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
```(Java 17, IntelliJ)
try building
error: release version 5 not supported
Language level is invalid or missing in pom.xml. Current project JDK is 17. Specify language level in <Here my plugin name>
set the source/target level thing in maven
Ohh lol, got it xD yea, there went something wrong while settig up ^^ Thanks anyways 🙏
If I'm using BungeeCord right now and plan to change it to Waterfall will my BungeeCord plugins work with Waterfall without any changes?
yes
Waterfall is like a copy of BungeeCord.
I see, thank you
I would not call it a copy. Technical term is "fork". Waterfall is based on BungeeCord with changes here & there to improve performance, security and configurability.
yea, i was trying to explain it easy to understand
Wrong channel and no, this will never be possible.
kinda impossible because the JVM has to load the new jar into classpath and unload the current paper jar and if you simply do that it may cause issues unless you restart the JVM itself
How do i prevent Mysql connection using JDBC driver from disconnecting after idle?
use hikaricp
it will keep connections alive by keeping them active, safely, as well as ensuring that there are connections available, etc
Hello, is there any AsyncJoinEvent in waterfall like the "AsyncPlayerPreLoginEvent" in bukkit? 🙂 Thanks
pretty sure that the login event in waterfall was already an async event
Oh yes, youre right 😄 Thanks cat
don't crosspost
I dont know if I can ask for bungeecord development, but does getStringList(example) returns a list even if example in the config isn't a list but a "normal" string?
ok, thank you. How can I dynamically have a String List or a string based on the value of example?
you'd need to check if it's a String or not
there's a method which will return an Object, I believe getObject. Use that
That’s easy to do; but it’ll break the game. There’s a reason it’s a new protocol version and without translating the version you’ll break the client
ViaVersion + ViaBackwards is something you can use to do just what you said
For that kind of use Via should also be rather light in resource usage because there isn’t a lot to translate overall
I wanted to update a plugin, but it seems like the used API version is outdated?
There are some missing imports such as net.md_5.bungee.UserConnection and idk what I could do to fix this.
The plugin in question uses the original BungeeCord API 1.16 Snapshot version (As mentioned in the outdated wiki from them)
My personal guess is that the original dev probs used a local jar or had a different dependency in their MavenLocal...
UserConnection is not API
I guessed as much
Question for me is now how they actually accessed those particular classes.
Normal maven download doesn't provide them (obviously)... So a local jar?
Tho, would that then not also be defined in the pom.xml?
idr, mabe just waterfall-proxy or something, or whatever bungees equiv is
you'd need to install to maven local or something
or just use the api...
do the classloaders in bungeecord nor waterfall supports multi-release jars?
probably not
Does anyone know of a specific reason why md5 never pulled the multi-release patch that paper has into spigot? I assume that happens a lot for patches that arent super significant?
We stopped speaking to md years ago when he was basically blanking us
-Djdk.util.jar.enableMultiRelease=true exists fortunately
Does ProxyServer.getInstance().getPlayer("example") return null if the player specified isn't connected/doesn't exist?
How can I download the latest Waterfall JAR via the API?
Trying to make a custom Pterodactyl egg to do all the work for me lol
https://papermc.io/api/v2/projects/Waterfall/builds/???
So far I have this, but where the question marks are I have no clue lol
Looking at this but no clue for the latest part
Hmm alright
yea ofc dude
given waterfall has nothing to do with worlds, in this context, basically, no
as for on the server? within the bounds of the API? no
if you wanna mess with server internals, etc, sure
don't mention
from the proxy, i.e. the context of this channel, basically, no
from the context of the server, "yes"
but, 100% unsupported
iirc
multi-release support can be forced with some flag. cant put it directly in bungee/waterfall because java 8 is still supported and the multi-release is a java 9 thing
i think paper uses reflection lol
and yeah its something -Djdk.util.jar.enableMultiRelease=force :)
paper builds against java 17 and so can just set the flag
waterfall builds against 8 because jenkins is a bitch
True
Waterfall GitHub Actions when?
Or is there a reason why you're keep using Jenkins?
Well, we moved away from jenkins now
Ok, so just a artifact from the past.
I couldn't bump past 8 because jenkins just kept breaking with waterfall, me and z spent many hours upon tryna work out why and gave up, so, when paper was pushed forward, we didn't bother to see if it was magically working yet
Now that we're off jenkins, I generally am kinda burned out from waterfall, and don't really care to deal with tryna move the min java version forward
Yeah, fully understand Waterfall is eol enough that it isn't worth it.
It's only worth it when new Java features are utilised.
i am trying to understand this but is there going to be no more updates for waterfall or am i just reading this wrong?
sometimes there are updates
so what would be the best proxy to go to then, because i want one that will be updated when new minecraft versions come out?
waterfall will still be updated for a while but long term you should be looking towards modern solutions like velocity
thank you very much
differences between TextComponent#toString() and TextComponent#getText() ?
onw gets the text of the component, the other generates the string representation of that object which is usually not really useful for much (beyond reading it as a human)
*one
thanks
if I need to convert the TextComponent which is formatted to a String with the colorcode character (& or $) what method I have to use ?
example:
TextComponent:
Stop (in red)
String:
&cStop
you'd use the legacy ampersand/section serializer
is it possible to get instance of OfflineProxiedPlayer
I need to check there ip I got there uuid
but I get null point if I try to get ProxiedPlayer
and I am hooking to litebans to check if they are banned and LiteBans need there ip
You'd have to store the player info yourself
But I am a bit confused that LiteBans needs the ip to check if a player is banned, that should work on an uuid basis as well 
there is no "offline" proxied player
The litebans API really isn't the best. I suggest a superior punishment plugin
This is more of an operational question that I couldn't find the answer to while googling and reading the docs: how does one trigger a graceful stop eg. when running through systemd or other such service layers? Many pieces of software listen for various signals, eg USR1 or USR2 to do graceful stop / restarts, and I was wondering if waterfall had something similar. If stop/end can only be triggered through STDIN then using a named TTY or even wrapping it all in screen / tmux are options, but those are quite frankly somewhat dirty solutions. Graceful service handling would be sweet, so any tips / pointers are greatly appreciated.
Additionally: if these facilities don't already exist, are you open to considering a patch that adds that functionality?
java should already handle the standard kill signals and afaik the shutdown hooks already exist in bungee for them
I can ctrl-c just fine
Ah, so a graceful shutdown on SIGINT should work?
yes
That is great 🙂 Thank you for replying. I'll just have systemd SIGINT it instead of SIGTERM'ing it, then all should be fine.
I see now what confused me earlier. When runnning manuallu from a terminal and from another tty doing a kill -s SIGINT $pid the process logs that it is stopping gracefully. When running the samme start command using systemd and doing a kill -s SIGINT $pid then the messages about a graceful shutdown are not printed / journaled through systemd. So presumably the process either detaches stdout in some way when run through systemd, or I have messed up something. Or both.
Oh, no something else is afoot. In waterfalls own logs the log lines for graceful termination are present in the former scenario, but in the latter (systemd) then even though the process is sent the same kind of signal then waterfall does not log anything about a graceful shutdown.
So there seems to be a difference in how it operates based on how it is started.
maybe down to log4j
chances are it shutdowns properly but the logger just doesn't deal with it
Good point. Might very well be that.
Would that be considered a bug in your opinion? Or just a quirk?
Ok, so I have checked with a couple other Java applications that also use log4j and I haven't found instances where the messages logged during shutdown aren't picked up by systemd's journal. So might this just be something with waterfalls usage of log4j? I don't really do any java myself so I have no knowledge about these specifics of log4j.
I potentially patched it yesterday
it's all down to the order that stuff shuts down
the logger was shutting down before the proxy did
Ah, that would do it I imagine. 🙂 Super cool that you have patched though. Would you like for me to try a specific build and see if it has been fixed?
I mean, you can try the latest build
I'll do that, and report back. Thank you for your time so far.
Tried with build 483, but unfortunately observe the same behaviour as previously. Can it be that the output buffer log4j uses is not flushed soon enough, and the process is terminated before that is done?
is there any waterfall plugin template thats cloneable from github?
Is it possible to check if a server is online/running from a plugin on another server? I saw some people using sockets, but those say the server is running when it's still starting up.
No; but there are ones for bungeecord plugins
Besides that the Minecraft development plug-in for intellij idea provides a usable template
is there a way for create a placeholder and make it available for all the servers under the proxy?
possible? sure
with developing only a proxy plugin ?
depends on what your actual goal is
i want to create a chronograph but it needs to be handled by a proxy plugin
i want to make available this chronograph through a placeholder
a what?
ok and what partare you struggling with?
i dont know how to make it available through a placeholder to the backend servers
you just send the data to them?
do i have to create a back-end plugin for this? (receive the data, handle it and create a placeholder)
yes
unless whatever placeholder plugin you are using already allows registration from the procy
does Placeholder api support it?
no idea, last time I checked it didn't
Is it possible for multiple players to have the same uuid when offline mode is on in waterfall?
No, unless a plugin is doing that
I got it thanks
Hi! When working with waterfall is it needed to get back to the "main thread" after executing something async? Or it's fully thread-safe?
Oh I see. But that makes me wonder : Is it even as useful to run database queries async? As I think that listeners are all executed in their own threads?
Like if I don't work async with such slow things will I slow down my whole proxy and/or others plugins?
Bungee has some horrifying undocumented breaks in threading continuity
If you find some I’ll try to fix them but usually these aren’t reproducable easily
What is a good way to find out what part of my plugins uses a lot of memory / allocates a lot of short-lived objects?
What tools should i use / What websites have good, useable guides or documentation?
I already have visualvm set up, but i can't find anything interesting in it.
please ping me when replying.
@torpid rampart make a heap dump and use eclipse memory analyzer to see the content
spark also has a heap overview but I'm not sure how detailed that is
So I currently have an Issue where Maven can't build because the Checksum of the waterfall components can't be validated. IntelliJ outright says it can't resolve it, while my CI Pipeline states that it can't validate the Checksum. Any Idea how to fix this
org.eclipse.aether.transfer.ChecksumFailureException: Checksum validation failed, no checksums available
Thats the error
is there a way to check if a player was kicked by an operator or if the server shut down?
Did some more testing. When I deploy it to my maven repo myself it seems to work. So the missing Checksums disappear somewhere in the process from pulling it from the paper repo
@ionic inlet first will be the join on the new, then the quit on the old. which is pretty reliable afaik
thanks phoenix
Yes
well, something went wrong
check the full log, all we can say is what is right there in english
otherwise, speak to the relevant plugin authors
(also, wrong channel)
not reading that
if you want me to look at it provide the actual log file
proxy.log.0 by @flat pawn: https://paste.gg/e0a0de35c4e74ec9ad3847f8d9132e79
that's not waterfall
You have bukkit plugins on bungeecord...
and literally nowhere is viaversion
W8 1 sec
proxy.log_1.0.crdownload by @flat pawn: https://paste.gg/fb634aabf7714244bba4f1f0a8d1d412
And that's not waterfall either
💔
Yo, is there some way to mask this log of the failed attempt of a connection by time out?
Because when some attack or just a lot of connections are beeing established is ass to see the console like that
nvm i saw it on waterfall-help, but should be a way to mask
Hello, i just wanna ask about netty pipelines in bungeecord and all forks of this - where excatly it handles bukkit packets? As far i seen MinecraftDecoder/Encoder parse just packets added in Protocol map so can't deduce any other pipelines that just forward it to spigot directly without parsing
it just passes the packets it doesn't need to care about through
but MinecraftDecoder pipeline as input gets ByteBuf ```java
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception
"bukkit packets" makes 0 sense
the server sends a packet
the packet hits the decoder
if the packet type is in the registry, it's decoded and dealt with, if not, it's basically passed through as the raw bytes
By bukkit packets i mean all of them that are not added to protocol map in bungeecord
it's basically passed through as the raw bytes yes i'm just looking place of this, where and how or where i can add my pipeline to handle with them
depends on your goal
For example i want send raw packets from bungeecord to spigot about Head Rotation (Entity Head Look 0x3E) player's B to player A, but pipeline parse only DefinedPacket i guess
I tried it in this way ```java
player.getPendingConnection().unsafe().sendPacket(array);
use a library or something which deals with that
When i registered 0x3E in protocol map and wrote parsing it works, but raw data no
because it's not designed to let you just shove in a bunch of raw bytes
You'd send a ByteBuf, idk what exact it would expect in there in terms of data
I ain't really touched this mess in a while
Okay, but client -> bungeecord packets are handled to spigot - ofc after PacketEncoder, compressor and packet prepender (so they're raw data that bungeecord gets)
and handle it to spigot
sure, i'm sorry
client -> bungee packets are passed through the deframer, the decoder, IF they're mapped packets, they're decoded, if not, they're wrapped and passed through the chain
bearing in mind that the clent connection and the server connection are two entirely different things
that makes sense, but MinecraftDecoder ```java
} else
{
in.skipBytes( in.readableBytes() );
}
Oh excatly, haven't seen before. You gave me a little different look at this, I'll try to do it again. Thank you
Do waterfall/Bungee have the jdbc driver shaded?
SQLite and MySQL Connector/J are shaded. Note that Velocity doesn't shade any drivers, nor will it ever (I developed it for a server that used PostgreSQL as its database, so...)
Thank you!
Hi, I need to do some time demanding stuff in PreLoginEvent (takes about half a second, I can't speed it up), but I get this annoying message:
Plugin listener <listener> took 504ms to process event ....
Is there anything I can do with it?
Oh, I can register an intent and do the stuff async
Does adventure work on Waterfall?
I think the easiest way is to use
https://ci.md-5.net/job/BungeeCord/ws/chat/target/apidocs/net/md_5/bungee/api/ChatColor.html#translateAlternateColorCodes(char,java.lang.String)
and https://ci.md-5.net/job/BungeeCord/ws/chat/target/apidocs/net/md_5/bungee/api/chat/ComponentBuilder.html#appendLegacy(java.lang.String)
I need to disconnect a player and I'm only able to use disconnect(BaseComponent[] message)
Is it possible to have MiniMessage in the config and somehow make it to BaseComponent?
yes, use the gson serialiser tocreate json and then deserialise that with bungee chat
it's the parse method, isn't it?
what?
ComponentSerializer.parse(json);
apparently so
I got this now and it throws two exceptions: NoClassDefFoundError: net/kyori/adventure/text/serializer/gson/GsonComponentSerializer;
ClassNotFoundException: net.kyori.adventure.text.serializer.gson.GsonComponentSerializer
MiniMessage miniMessage = MiniMessage.miniMessage();
Component component = miniMessage.deserialize("<red> test </red>");
String json = GsonComponentSerializer.gson().serialize(component);
BaseComponent[] bc = ComponentSerializer.parse(json);
player.disconnect(bc);
The pom.xml is most likely working as I took everything from the docs
<repository>
<id>sonatype-oss-snapshots1</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
...
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>4.10.1</version>
</dependency>
you' d need to shade that stuff into your own plugin
waterfall doesn't bundle adventure
compile into scope tags?
hey! I want to have an auto update config function for my plugin. The problem is that i don't known how to get the "internal" config (inside the .jar) and the "external" (in the plugin data folder) and then compare them.
Thank you
you just need a version: in your config and compare it against a static final variable you declared somewhere in your code
yes i already heave that, but if it founds an update what do i have to do?
if the user already installed the lastest jar
depends on what you're doing
you'd have logic which deals with renaming config options
if you wanna compare against the default config you'd need to load it from the classloader or something
i would just get everything out of the old config, move it to config-old-date.yml and create the new config with these old variables
really depends on what you want to do as electroniccat said
thanks, my problem's solved.
Have a great remaining day / evening / night, really appreciate your help ^^
I made a progress for the configuration thing.
My config looks like this:
messages:
error:
noperm: '&cInsufficient Permissions'
nocommand: '&cThis command doesn''t exist!'
noplayer: '&cSpecify a player'
config:
clearchat: true
commandblocker:
enabled: true
whitelistedcommands:
- "/example"
For checking if the config inside the .jar coincidence with the external config I iterate on it using internalConfig.getKeys() and then check if the external config contains the value.
But this method doesn't check if "sub-values" (like message.error.nocommand) are missing,
How can I do it ?
Hey, I'm wondering if Waterfall has something equivalent to "RegisteredServer" that Velocity has
that would generally just be ServerInfo i'd imagine
That actually worked out a lot better than I expected, thanks dawg
I currently get this error while trying to build my Project. Maven tries to resolve a Snapshot Version that neither exists in my Repo nor in the Paper Repo I have mirrored. Any Idea on how to fix this. I already tried to force maven to update SNapshots with the -U Flag but that didn't work
Because we publish the API, not the entire set of packages
if you want access to -parent, you'd need to install it yourself
oh, nvm, -parent is published
But, you have some other repo which is interferring
I have the API as a Dependency, Maven just tries to download the transitive Dependencies of it. And the Version Maven is looking for doesn't exist in the Paper Repo either. I tried Removing my Repo and switching it to the official Paper Repo. Same Result
I mean, am just looking at the version info that it's looking for
such a version never existed on the paper repo
that once again screams that it was pulled from another repo
see the metadata info stored in the local maven repo, I guess
Yo, thanks for patching it, but wouldnt be better do an boolean for toggle the log?https://github.com/PaperMC/Waterfall/blob/master/BungeeCord-Patches/0063-Don-t-send-exceptions-to-the-client-during-kicks-etc.patch
no
why? I would like to know your opinion
Because people ask for support, and not having basic info of why something happened works against that?
You can literally just use a log filter if you don't wanna see it, I don't see the need to add a boolean for every single bit of "something unexpected happened"
rip
is there something like Spigot ? ConfigurationSection#getValues(boolean deep)
honestly i never worked with nested data structures so I dont know what I have to do
I want each server to write its own name at the beginning of bungeecord messages
e.g:
%server_name% >> this server is down
Is there anyone to help?
if you ask a specific question then someone might answer it, yes
At what point in the login events is a player's username verified with Mojang?
Wdym?
If you’re asking about when the authentication takes place: between prelogin and loginevent
I want each server to write its own name at the beginning of bungeecord messages
e.g:
%server_name% >> this server is down
you are already connected to this server
I want to make it the prefix fixed at the beginning of the message it the name of each server
if you want to do it on the proxy then you might need to completely replace the chat handling unfortunately
Can I do it with an additional plugin or how can I do it with a proxy?
would be better to do it on the individual paper servers as they provide proper chat rendering api
I mean you are in the dev channel so I assumed you wanted to create a plugin?
yes i know but i don't know how to set up algorithm so i wanted to ask in developer channel
well did what I said answer your question then?
which part do you not understand?
I want each server to write its own name at the beginning of bungeecord messages
e.g:
%server_name% >> this server is down
you are already connected to this server
At the beginning of this message I want it to prefix the name of each server
i don't know how to do this
you listen for the event that triggers it and replace the logic with your own which sends that message
there is no good way to modify any inbuilt messages or the chat
I got it, can you show a code as an example?
there's lots of examples on the internet (different wikis, forums, videos, whatever you prefer)
or just look at how other plugins do it
I couldn't find a sample plugin or I couldn't find a sample code
I don't know how to search
"bungeecord plugin tutorial" should lead to tons of results
also learning how to google is one of the most important things you can learn nowadays
Yeah that's what I thought thx
no i'm not talking about that
I want each server to write its own name at the beginning of bungeecord messages
e.g:
%server_name% >> this server is down
(unless you pay or are lucky I guess)
I'm looking for a developer for 40 thousand dollars already for BungeeCord Proxy
well I hope you find one. this is not the correct place to hire someone though.
okay 🙂
🤣
Just create an boolean on ProxyConfig named "logExceptions" for example i guess and add it on the Waterfall config but is for debug i guess.
ye and i have no clue how to do that its been years
that would be extremely helpful but if possible the latest version of waterfall would be good
is there a an api for downloading the latest build of a version?
i found https://papermc.io/api/v2/projects/waterfall/versions/1.18/ where i could get the information from, but I wonder if there is already a path which does this for me
no
okay thanks
can i use net.kyori.adventure.text.Component in waterfall or is there other component with the same features?
you need adventure-platform-bungeecoord
I believe there is a (dead) waterfall PR to add adventure support though
thx
Hello i have a bug with waterfall.yml
Can you say what's the bug?
heyo, I'm tryna make an mc server and I have a plugin that needs access to a mysql database (im using mariadb) but it always denies permission.
I have enabled remote root login (not that it matters), created an admin account and both of them still doesn't work
create a new user, noting that the biggest thing is that the hostname matches
i.e. lazy option of using the % for network access, or localhost, which iirc is only for the local socket (which, you're probably not using)
is there a function that returns the max player count?
oh it's show max players
loll
i just realized what the problem was
do u know how to fix this?
i am using mariadb and i've heard that they have messed up some ssl connection stuff
How do i check if the player had some problems while connecting to a server ?
like not whitelisted, banned, connection refused, etc.
Dont ping cat.
Remove using a client mod? Fine. Remove without? good luck.
What youd need to do:
Full entity-ID rewriting,
Full location tracking,
Full player state & other player state tracking.
Optional: Client location rewriting
Stateful ID tracking (maps etc) and rewriting
nevertheless not impossible
just not worth the effort
Go ahead. You’ll desync and break the client in a whole bunch of different ways, but that was true back then too
Because if you aren’t able to clear the client then the next server doesn’t know what the client already has or knows
You’ll run into conflicts and desyncs
Most of the things you need to track are only reset on respawn or even worse only on joingame
No.
Still no. I’ll throw you a bone though, rather than tracking and rewriting you’re better off hiring someone to make plugins for proxy and server that syncs that data so the next server knows what is given
That solution is easier to pull of on velocity as it requires less edits internally
.
Anything that has an increasing volatile ID and anything that has cache on the client
Which is quite a lot of stuff
Also waterfall is lacking api to make this easy
Well easier
But this is as far as I’m gonna help with that
You were probably saved by bungeecord having this feature in the past, but it won’t be helpful in modern versions. The rewritten entity IDs in 1.16 and newer was limited to things that couldn’t be cleared on a respawn, so you’re gonna be desynched either way
You removed the respawn?
Tough luck. The modern versions always require JoinGame if you’re not reconnecting to the same server
The dimension and biome registry is the reason
If those match 1:1 you can skip it
But only if that applies
No, well yes, but not if you tell the client it’s the same world
Then it won’t clear any data
That idea went out the window with 1.16. Those are there by default but don’t need to be
World > respawn > other world
Where the other world can be of the same dimension type from the dimension registry but doesn’t have to be
If the name of the next world is the same then no data is cleared
That makes it unusable to switch servers on bungeecord
But if you want a detailed draft on the issue you’re in luck; I had an extensive one here:
This doesn’t include the changes to the respawn packet later on so keep that in mind
No. Future versions enforce a list that the client also gets
See this https://github.com/PaperMC/Velocity/tree/dev/3.0.0/proxy/src/main/java/com/velocitypowered/proxy/connection/registry to understand what kind of data is in the respawn packet and the joingame packet
How do i check if the player had some problems while connecting to a server ?
like not whitelisted, banned, connection refused, etc.
best there is is the kick events, afaik
I don't recall the API exposing that stuff too well, unless there was a callback? idr
ok thanks
is there something that I can use without events?
I'm working on command that send the players to another server and I have to "interrupt" it if the users have problems to connect
See the send command implementation?
As said, pretty sure that there was a callback or something
Has anyone here experience with Unit Testing Waterfall. If so, are there some examples you can share
Waterfall doesn’t have unit tests itself, what are you trying to do
Where I can see all the exceptions that can be thrown by ProxiedPlayer#connect(ServerInfo target, Callback<Boolean> callback) ?
so the Throwables
that's not documented
Well, the thing itself shouldn't throw any exceptions, outside of if the server info is null
Just, the exceptions aren't passed to anything afaik
I have to check if the plugin is trying to connect someone who is already in the target server
use the connection builder
the one in the package java.sql ?
When I write a plugin I want to unit test it. For Spigot there is MockBukkit. But since I haven't found anything like that I thought I might ask here
There's very little to mock
Unit testing is just writing tests to ensure functionality, having to mock 3rd party stuff is often a test smell/indicative of bad design
I already use Dependency Inversion for most stuff. But I can't use it for everything
And I would mainly just do unit tests in bungeecord to get the coverage up
But I'll look into writing the mocks myself
i tried it but i actually dont know how to wait for an async task to finish.
Code:
p.connect(ServerConnectRequest.builder().target(serverTarget).reason(ServerConnectEvent.Reason.COMMAND).callback(((result, error) -> {
if (!(result == ServerConnectRequest.Result.ALREADY_CONNECTED || result == ServerConnectRequest.Result.ALREADY_CONNECTING || result == ServerConnectRequest.Result.SUCCESS)) {
staff.sendMessage(format("&cThere was an error while connecting you to the Server!"));
cantConnect = true;
return;
}
})).build());
if (cantConnect) {
return;
}
the callback is called when the thing is finished
yeah, that's the problem
The ideal pattern is that you do stuff in the callback vs blocking, because, you can't safely block
how can I do it? if I return in the callback it doesn't block the entire execution of method containing it
I mean, as I said, ideally, don't
do your stuff in the callback
otherwise, use a future
ok, thank you for the patience
is it possible to hook into item-despawn-rate? I want to make an advertisement hooking into this default spigot.yml setting to alert players when there are less than 30 seconds before despawning
wrong channel?
wrong channel...
sniped :P
Ah yeah, I was sure it was paper-dev xD
I tried to use CompletableFuture but i probably misunderstood how it works because the if (cantconnect) is still executed before the callback of ProxiedPlayer#connect(ServerConnectRequest scr)
https://pastebin.com/BrtbR3qu
your future is returning the wrong thing
you need to complete the future in the callback for it to work
You're literally just returning the result of connect()
something like this?
staff.connect(ServerConnectRequest.builder().target(ss).reason(ServerConnectEvent.Reason.COMMAND).callback(((result, error) -> {
CompletableFuture<Void> connectS = CompletableFuture.runAsync(() -> {
if (!(result == ServerConnectRequest.Result.ALREADY_CONNECTED || result == ServerConnectRequest.Result.ALREADY_CONNECTING || result == ServerConnectRequest.Result.SUCCESS)) {
staff.sendMessage(format("&cThere was an error while connecting the suspect to the &4ScreenShare Server!"));
cantConnect = true;
}
});
})).build());
create a future outside of connect
inside of connect, comp,lete that future
You probs wanna pass in the actual result to the future instead of using void, given that tryna update a field like that is basically dumb
now it waits endlessly, at least its something new
https://pastebin.com/U61mc2BZ
Hello, what could explains my CompletableFuture taking a very long time to complete during peak hours until basically my whole bungeecord is lagging?
Initially the CompletableFuture will take around 20ms to complete, sometimes I see it taking 200-600ms (Already too much I guess?). But when it start lagging requests will pill up and it can takes up to 20 seconds to complete. I am using a FixedThreadPool with 5 threads.
My theory is that for some reason threads are not released in the pool until a saturation point is reached which means all the new requests are throttled but what I can't understand is how the saturation of this pool would make my whole bungee lag
What is the CF doing?
Well, I mean, CFs "complete" when the thing trying to complete them completes
if you're using a fixed thread pool, that means that it's not gonna resize and so if work starts piling up, it's gonna pile up
one might suggest actually using a profiler or something and doing some digging to see where the time is spent
What the CFs are doing :
https://gist.github.com/jdkeke142/db1d8d6743ae8b05aae2c11a336a4409 <-- Here are the managers methods used
https://gist.github.com/jdkeke142/524780680d06541a215147839ba6baf9 --> Here is VotesTable
https://gist.github.com/jdkeke142/ba41d47bc572f482fb5cf49a5c5b10ca --> Here is the NamesTable
And then these managers are called by a javalin webserver ran when waterfall launch:
I know there is non-existant handling of exceptions in these CFs I wasn't aware of how it was working when I wrote this code, I need to implement it asap
About monitoring I would like to do a thread dump but while using docker containers with pterodactyl I don't really have an idea of how to do it
SparkBungee seems to provide some good tools but you can't create a thread dump afaik
what exactly is your goal by doing a thread dump?
Seeing what happens on the threads backed up by CFs, what precisely is taking so much time making the whole plugin stucked?
But I've never done a thread dump before so maybe I am not aware of the actual usage of them?
sounds like you want to use spark's profiler
That's what I tried to do but for some reason, on bungeecord the latest version of spark wouldn't let me paste a profiler
https://www.toptal.com/developers/hastebin/ofadujuvic.properties
but that's out of this channel purpose I guess
make sure you are running the latest version but yeah, that would be an issue for them
seeing as you aren't even running waterfall it's really out of scope anyways lol

i still didn't figured it out lol
Can someone confirm that bungeecord/waterfall isn't respecting my depends
I would also expect errors from floodgate & protocolize since i softdepend on them, but luckperms is the first lib that i reference
I think it's case sensitive softDepends
I have this code to check if a server is online
private boolean pingServer(InetSocketAddress addr) {
try {
Socket s = new Socket();
s.connect(addr, 10);
s.close();
} catch (IOException e) {
return false; // Not online
}
return true;
}
it always returns false though, idk why
debug mode shows this, the server ip is a perfectly fine server
The connection timed out
I mean, I can't really say
10ms is not that long in the scheme of things
and that's ignoring networking issues
(i.e. routing, network config, etc)
this checks if the server is up before sending a player there. When I removed the check my player connected
so it cant be a network thing
ill try increasing the timeout ig
that worked 😅
if i've got a #Configuration, how would i clear it?
could i just set it to a new instance of Configuration
So I know that sending an actionbar to a player is possible with velocity, is there a way to do that using waterfall as well?
Yes you can
Send an ChatMessageType as actionbar like "player.sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(ChatColor.translateAlternateColorCodes('&',"blabla"));
If you want to keep it for time, do an timertask
got it, thank you
np
Hello, I need some help with the bungeecord javadocs
"ServerConnectEvent" will be called when the "ServerSwitchEvent" is called?
Also when a player joins the proxy
how do I have my plugin save a config file into the main waterfall proxy folder?
Well, the default PWD is the main proxy folder
(and, File, etc, is relative by default)
(but really, put your stuff in your own folder)
Yeah, but rn when I try putting stuff in a config it defaults to the one in a specific node on the server
so how do I like get a config file to save to the waterfall proxy?
new File("mymagicalfile.wat")
will place mymagicalfile.wat, alongside where the bungee config, plugins folder, waterfall config, is
but let's say I need them in all the servers and on the waterfall proxy, wouldn't that created an instance of that folder in every server?
Well, yes
I mean, if you want it somewhere else, either use the full, or a relative path, to that folder
right now I am doing "new File(this.plugin.getDataFolder(), "data.yml");"
I would assume I need to replace "this.plugin.getDataFolder()" with the location of the Waterfall plugin folder
but idk how to get that location
File has a method to get the parent
you can even literally just hardcode the path, etc
is there a way to not hardcode it? maybe smth like "Waterfall.getDataFolder()" or smth?
ok, so how do I get the plugin folder of the waterfall folder using a function
you don't
there is no method.
either get the parent folder of your plugins data folder, or, hardcode the path
I don't think my plugin has a data folder inside of waterfall
what do I do with the parent of that though?
that will be inside of a random node of the server
not the main Waterfall proxy
wait
if that's actually a server plugin
the server doesn't know a single thing about where your proxy is
But, I mean
if you're actually tryna share data between multiple servers, using a file would be stupid
I have three instances of my plugin, in the two nodes of the server and in the waterfall proxy of it
I have a plugin that does it tho (I didn't make it), by saving the folder in the waterfall proxy's "plugins" folder
so yeah, does anyone know how I can share that a yml between servers, maybe by saving it in the proxy?
I'm getting this error:
https://pastebin.com/HmaJzBGf
Waterfall plugins can't have anything from Bukkit in them?
Bukkit does not exist within bungee
You can't call bukkit stuff in an environment where bukkit doesn't exist
so how does SkinsRestorer save data in the proxy
It’s open source but please don’t use it as a reference.
It has some of the worst code conventions and style I’ve ever seen
I just want to know how to save to the proxy
Like in the plugins folder
Of waterfall
This is how you go there
But also while not doing in like in a waterfall plugin
I want to know how to access that from a server plugin
Like have one total shared dataFolder between multiple different nodes on the same waterfall network
And I only say that it could be in the plugin folder on the waterfall proxy because that is where it is located in the SkinsRestorer plugin
Again; cat provided the solution; plugin messaging
this.plugin.getDataFolder() just gets a datafolder in the server
and the waterfall plugins can't use bukkit sstuff
this server is gay
and?
💩
I suggest you changeskin
Me when redis but the mongo
is there a runTaskTimer in the bungeecord api or something similar? I need it for a stopwatch/chronograph
use a scheduled executor
well, I mean, there is the schedule methods on the TaskScheduler
How can I send a string between a plugin on the proxy and a server plugin? Do I need to use a socket… how do I use that?
If you need to be able to do that while no player is connected then yes, use that or rabbitmq/redis
Otherwise you can use plugin messaging
Understood
is there a way to check if a certain server is online or not?
Well, basically, ping it
the plugin api even has a method for that
When will Waterfall 1.19 combability be released?
Okay, because the version that allows you to join with 1.19 usually comes on the same day as the update.
Or should that already be possible with the latest version?
Not happening this time around, too many changes.
Okay, thanks for the info 😄
ETA Counter: 2 (+1 deleted)
What? 😅
Is there any documentation on how Velocity Modern Forwarding Protocol works? I'd like to implement it into my server software.
can't find any but I suggest just looking at the paper patch
@bleak current I think something is wrong with public key reading
Five had the math somewhere
@wide maple you around?
limit seems to be 4096 bytes
I ain't touching it anymore
am building now
yeah fair
kek didnt see cat fixed stuff already
Java 17.0.3 fixes darkmode on mac os. 😄
waterfull is really slow to build, holy hell
You're already building Waterfall 1.19?
Paper isn't even updated yet 😮 what is this sorcery?
it's a bunch of patches over bungeecord
Time to remind this PR never got merged https://github.com/SpigotMC/BungeeCord/pull/3108
I mean, minimal diff and whatnot
why change what's not broken?
runs
arguing on something like this is just a waste of time anyways ¯_(ツ)_/¯ (on all sides though...)
the code is on the github?
there are?
if you are asking for a download (in the wrong channel): use the download api
not for version changes
that needs manual modification on the website iirc
of course it will
it's a major minecraft update, that stuff breaks all the time
yeah, no
...
of course it has packet wrappers lol
how else do you think plugins would work
you just described a packet wrapper, good job
sure, you know what was a major change in 1.19?
chat
the website needs updating, there are still issues and such
so yes, it needs to be updated
and all the cases that were actually changed and are required for the proxy to work need to be found
first off: wat
second: completely unrelated to this channel
.
all builds list: https://api.papermc.io/v2/projects/waterfall/versions/1.19/builds/
Why are new versions not added to the website?
They will be soon
I don't think those builds are stable yet... but "stable" is a pretty subjective word...
Hey guys anyone know how i can take only servers name from this?
ProxyServer.getInstance().getServersCopy()
ProxyServer.getInstance().getServersCopy().keySet() since the map is keyed by server names
BTW, can anybody tell me if adventure support is soon coming to the waterfall api as it was implemented to paper api?
probably not, my inclination to spend too much time these days on waterfall is minimal
ah okay, thank you
i just found it weird that in paper i now had to get rid of my ComponentBuilders and stuff but in waterfall i still have to use them
You can use the adventure platform stuff in waterfall, they have a bungee module thing
I'm honestly burned out of working on waterfall much these days, last time I put in much effort into tryna deal with anything component related I generally got screwed by bungee refusing to deal with modern things and plugins catering to bungee
oof thats hard 😬
That's sad :(
Really want to switch to velocity but it's far from ready for the switch. Massive incompatibilities force me and a majority of other larger servers to stick with waterfall.
Updated to Waterfall 1.19
And using the latest ViaVersion ViaVersion-4.3.2-SNAPSHOT.jar
But I get connection reset
And using 1.18.2 also is now now working, I assume because of the Tab plugin?
that error is from a plugin, yes
Just wait for update of thst plugin
Is not a wf problem imself
And dont use vía on proxy, instead on backends
What are the plans about when will you release officially the 1.19 version of waterfall?
can someone help me?
Is it possible to make a plugin for waterfall for the server motd that allows for mini messages to be used in the config?
The correct channel is #waterfall-help
Hey anyone know what condition i need add for only console command?
if ((sender instanceof ProxiedPlayer)) {}
this is for the players but for the console?
I've tryied this but don't work
if ((sender instanceof ProxyServer)) {}
( i found another solution , if (!(sender instanceof ProxiedPlayer)) )
?
ConsoleCommandSender
Nope, because its bungee
thats also bungee
maybe that's not included in api module
if it's not in api module then you're out of luck and can only check "if not player"
@scarlet nova
Yes i write it bere
Here *
Does anyone also have the problem when bedrock players start trading with enchantment villagers that they don't work, this problem is with enchantment villagers
Wrong channel
i have a custom PluginMessage channel. I send strings to the subservers, which then perform actions based on these data. This data is transmitted via a player in the PluginMessage channel, isn't it? Can the player theoretically manipulate this data by e.g. recording his traffic?
no
it's sent on the player connection between the proxy and the minecraft server, it never reaches the client
they could theoretically sent their own plugin message on that channel though if that's not properly blocked on the proxy (not sure if that's done by default once registered)
ah thx but how can i block this
just don't forward plugin messages coming from the client in your proxy plugin
should be enough to just register an incoming listener to stop that but I suggest testing it if you sent sensible data via that
alternatively you could require an authentication token on each message I guess
i have only one PluginMessageListener which i registered in onEnable for my channel. is it possible that the players also send data on this channel?
the player can send data on any channel
you need to make sure that it's comming from the server
you check who sent it, yes
yes but in the event this information is not available
ah thx.
in paper there is also this event. do you also have to check the sender or can only the bungeecord use this channel there?
so i have to make sure that no player uses this channel? e.g. by encryption?
well authentication or as I suggested blocking messages from the player on the proxy would be enough
ok thx
Hey, maybe mis thread. Where i can get 1.18.2 waterfall?
use latest version.
(it supports 1.19, 1.18, as well as a lot of other versions)
Okay, thank you. You helped very much
how can I use mojang api to get the name of a player from their UUID?
Everything on google is a few years out of date, so doesnt work that well
afaik, that API literally hasn't changed in a good while bar some trivial things
otherwise, cross ref wiki.vg, they have a page which goes over how mojangs API works
Hi guys its possible autogenerate a yml on bungee?
i have added config.yml on resoruces but don't create it
And this create lang.yml in plugins folder
file = new File(ProxyServer.getInstance().getPluginsFolder() + "/lang.yml");
you need to handle that yourself via saveResouces iirc
Ehy, when i try to create a scoreboard, it appears like this without some spaces, even if some lines have only "&r"
What's going on with 1.19? serverkickevent isn't being fired if a server shutdown and yeah, in 1.18 was working
try using normal &d without any text
i think i figured it out
the issue is coming from bungeecord, is like the serverkickevent gets fired only on /kick and /restart, what's the sense of killing it on /stop?
i cant use the same character for make a space
Opened a issue on github for serverkickevent, the issue is pretty weird i'd say
is there a Configuration#getConfigurationSection(String path) in bungeecord/waterfall?
iirc it's getSection
I don’t think there is
At least, I can’t check atm and I can’t find a bungeecord configuration documentation
I'd imagine you just call get() and get a Map<String, ?> back more or less
The configuration look like this, so I should get reports.buttons, then iterate on the map and get all the present buttons with their “properties”?
reports:
buttons:
ban:
button: “&4&l[&c&lBAN&4&l]”
command: “”
goto:
button: “&2&l[&a&lTP&2&l]”
command: “”
sorry if it isn’t aligned but I’m using the phone rn
eww, the waterfall javadocs site doesn't include all artifacts
waterfall-chat, waterfall-config and waterfall-event are missing
and Configuration#getSection clearly exists: https://docs.phoenix616.dev/bungee-config/net/md_5/bungee/config/Configuration.html#getSection-java.lang.String-
We are aware, it’s currently broken. Will be fixed soon
👍
Hello, is there any aikar flags for Waterfall?
start.sh has a selector for proxies and iirc there is also a message pinned in the help channel
- https://flags.sh/ I mean
Yo, i got simple plugin for /lobby command but its crashing when server get up [21:24:43 ERROR]: Exception in thread "main" java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class java.util.Map (java.util.ArrayList and java.util.Map are in module java.base of loader 'bootstrap') [21:24:43 ERROR]: at net.md_5.bungee.conf.YamlConfig.load(YamlConfig.java:113) [21:24:43 ERROR]: at net.md_5.bungee.conf.YamlConfig.load(YamlConfig.java:67) [21:24:43 ERROR]: at net.md_5.bungee.conf.Configuration.load(Configuration.java:82) [21:24:43 ERROR]: at io.github.waterfallmc.waterfall.conf.WaterfallConfiguration.load(WaterfallConfiguration.java:67) [21:24:43 ERROR]: at net.md_5.bungee.BungeeCord.start(BungeeCord.java:279) [21:24:43 ERROR]: at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67) [21:24:43 ERROR]: at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
public class LobbyCommand extends Command {
public LobbyCommand() {
super("lobby");
}
public void execute(CommandSender sender, String[] args) {
if ((sender instanceof ProxiedPlayer)) {
ProxiedPlayer p = (ProxiedPlayer)sender;
p.sendMessage(new ComponentBuilder("").append("Trwa przenoszenie na serwer Lobby...").color(ChatColor.GREEN).create());
p.connect(ProxyServer.getInstance().getServerInfo("lobby1"));
return;
}
sender.sendMessage(new ComponentBuilder("").append("This command can be used only by players").create());
}
}```
How do i fix?
your bungee config is bad
Okay, i found out that is caused by group: []
{} for empty map
Hi guys i want add the status of server in mine plugin, did anyone know any solution for implement it?
if (!(sender instanceof ProxiedPlayer)) {
String[] Servers = ProxyServer.getInstance().getServersCopy().keySet().toArray(new String[0]);
System.out.println(ChatColor.GREEN + "" + configuration.get("info-server"));
for (int i = 0; i < ProxyServer.getInstance().getServersCopy().keySet().size(); i++){
System.out.println( ChatColor.AQUA + "" + Servers[i] + ": " +
String.valueOf(ProxyServer.getInstance().getServerInfo(Servers[i]).getPlayers().size()));
System.out.println(configuration.get("player-list") + "(" + Servers[i] + ") \n" + ChatColor.DARK_AQUA +
String.valueOf(ProxyServer.getInstance().getServerInfo(Servers[i]).getPlayers()));
}
System.out.println(ChatColor.YELLOW + "" + configuration.get("total-players") + " " + ProxyServer.getInstance().getOnlineCount());
}
ping it
With what?
with the ping method?
Yes, but how i can ping certain server?
I see the method with ProxiedPlayer
But another method without ProxiedPlayer?
on ServerInfo or something
https://jd.papermc.io/waterfall/1.18/net/md_5/bungee/api/config/ServerInfo.html#ping(net.md_5.bungee.api.Callback)
Ping return the player count async
yes
i do the method isReachable, for semplified all things
Hi, I am working on a prototype of syncing multiple waterfall instances together. I have round robin dns handled, but what would be the best way of syncing configurations on the servers? I was thinking some sort of wrapper on the waterfall jar that downloads a zip with the whole server config (waterfall.jar, plugins, etc). Does anyone have any better ways of doing it?
Docker image with all stuffed into it.
server send class
public static void SendConnection(Player player) {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("_connection");
out.writeUTF(ServerCore.getInstance().getServer().getName());
player.sendPluginMessage(ServerCore.getInstance(), "oak:connection", out.toByteArray());
}
Server main
getServer().getMessenger().registerOutgoingPluginChannel( this, "oak:connection" );
Bungee lsitener
@EventHandler
public void onPluginMessage(PluginMessageEvent event) {
Messenger.log("PLUGIN MESSAGE = " + event.getTag());
if (event.getTag().equalsIgnoreCase("oak:connection") ) {
DataInputStream in = new DataInputStream( new ByteArrayInputStream( event.getData() ) );
try {
String channel = in.readUTF();
if ( channel.equals( "_connection" ) ) {
String serverName = in.readUTF();
ServerInfo server = Oakland.getInstance().getProxy().getServerInfo(serverName);
sendConnection(server);
Messenger.log("PLUGIN MESSAGE 2");
}
} catch (IOException ignored) { }
}
}
Bungee listener isnt receiving messages from spigot plugin.
Its logging the normal minecraft ones, but not the oak:connection one
You need to actually register the channel somewhere
otherwise it won't send the register packet to the server, and then the server will basically just ignore it
I have this in the server plugins class
getServer().getMessenger().registerOutgoingPluginChannel( this, "oak:proxy" ); // Register the outgoing channel, to Bungee
getServer().getMessenger().registerOutgoingPluginChannel( this, "oak:connection" ); // Register the outgoing channel, to Bungee
getServer().getMessenger().registerIncomingPluginChannel( this, "oak:outconnection", BungeeChannel.getInstance() ); // Register the incoming channel, from Bungee
getServer().getMessenger().registerIncomingPluginChannel( this, "oak:staffaccess", BungeeChannel.getInstance() );
and in bungee I have
ProxyServer.getInstance().registerChannel("oak:outconnection");
ProxyServer.getInstance().registerChannel("oak:staffaccess");
Im sending the message in the playerjoinevent event
meh, I wish there was a good way to get all listeners of an Event :S
How do I detect server socket disconnection?
ServerDisconnectEvent only detects ... <-> DownstreamBridge <-> [lobby] has disconnected (when the player was already connected to the paper server)
I want to detect <-> ServerConnector [survival] has disconnected (when the socket between waterfall and the target paper server is disconnected)
Well, basically, iirc the server conectior request builder thingy had a callback just for that
otherwise, outside of the events, you literally have no info of that without being set in the pipeline
So there is no way to detect this solely using a plugin?
did you try the connection request thing?
I am not sure which thingy you mean
Yes I have found it, there is a callback but I am not sure how do I use it to connect a player to a server. I normally use ProxiesPlayer.connect
use the builder to create the connection request
I cannot set target on it
There is only getTarget method
P. sure it was in the method to create the builder

oh, didn't notice that xd
Its usually named like setTarget
How do I pass the ServerConnectRequest to the player now?
oh, just player.connect(ServerConnectRequest )
This callback does not detect when the socket is closed before logged in, result is "SUCCESS" right after the socket is opened, does not care about that the socket was closed right after that before responding with minecraft login packet.
oh, ouch then
idk, bungee never did a good job of exposing that mess
(and, I got tired of tweaking smaller things in the API and breaking shit)
To fix that, I'd need to add another concurrent connection request system alongside the existing one
there is no option for windows?
How do I edit this thing, everything i do is always restored back to original when i build it

