#waterfall-dev
1 messages · Page 1 of 1 (latest)
But just to clarify again, BC has no problems running but waterfall has (both are 1.19).
I mean, that's not posible
I use waterfall on most of my plugins, by changing it worked, they don't even touch location thingy.
Yes, I agree. However, it seems like for some reason protocol package is just missing. It doesn’t even display in 1.19 waterfall docs…
Just change i mean
For example, i handle a 1.7 fork and i updated
I know, but I don’t know what you are trying to tell me guys. I mentioned the plugin was already updated to 1.19 (where BC included the changed class location) and everything is running fine, just waterfall has problems.
So that’s not about my code but rather where the class went, because my users get class not found when they try to use the plugin.
I mean what problem lol?
Im based on waterfall, and waterfall did the same upstream pull
Okay nevermind, just found out they were using an older release which did not support it. I am away so I had no other verify existence of the problem. Thx and have an awesome day 😎
So you basicly downgraded? xd
No, they upgraded to the latest release of my plugin 😉
Well yes, bungeecord droped back versions support
what is the minimum java version for waterfall
Java 8. but recommendable is always lastest stable.
cool
So with waterfall, to get a players' IP and port you do #Player.getSocketAddress() right? But like, that gets the player's IP and port. My question is: Is there a better practice way of getting just the IP rather than using #String.substring()?
.getAdress().getHostString iirc?
Deprecated but yh ig
Well
so, basically, what you'd wanna do is getAddress and instanceof InetSocketAddress
then you should be able to cast it and avoid the deprecation
What, like (InetSocketAddress) e.getPlayer().getAddress()?
I mean, what's the difference between that and just using getAddress() on its own?
Both trigger a deprecation warning
Imma check they work
No, use getSocketAddress() and cast, not getAddress()
My Mojang Cape is not showing on my Server
Can you help with what? is it a problem with the server?
does net.kyori.adventure work with waterfall (specifically for components), or do i need to go back to the root BaseComponent apis for the waterfall/bungee part of my system?
It works, but is not built in, you will need to use base components ig
It even can be your client any ways i don't thing that this is even related to "waterfall"
I built a launch wrapper for server software, and it works fine for paper, but for some reason waterfall refuses to load plugins/modules, any ideas?
I'm using the latest build
Paper
Waterfall
I launch the server files using this
Because bungeecord assumes that the classloader it's running in is the system classloader
ah ok
makes sense thanks for clarifying
Alright i got it to work!
Used https://github.com/CGJennings/jar-loader/blob/main/src/ca/cgjennings/jvm/JarLoader.java
edit: crap i did setproperty instead of getproperty
nice one
pretty sure you can? the api might just not support it though
scoreboard api in bungeecord is pretty basic tbh
The players username is the one thing you must never touch
But that’s only partially true
I will describe the problem in more detail. I have a database where the data I need about the players is stored. When connecting, I need to change the nickname of some of them and assign the UUID along with all the items on spigot servers (because usercache.json stores both the nickname and the UUID, I don't think everything will be as I wish).
uuid is changing with using reflection
maybe there are some ways to solve my problem without focusing on the bungee api?
Hey, in general, i decided to make a custom constructor for interacting with inheriting classes (commands) that use an annotation with variables: name, permission, aliases. There was such a problem, super cannot get the class of the inheritor, which is created in the constructor, it produces null, in the case of super(this), "this" cannot be referenced before the supertype constructor is called. How can you get an inherited class without using variables for the constructor?
er, can't super literally call this.getClass()?
this does'nt work
I mean in the super
from this.getClass() i would have already received inheriting class, and from there i would take data from the annotation, but this is not called in superclass
I mean, you can't get that info because that info doesn't exist
there is literally 0 way around that other than hardcoding the class name
otherwise you'd need to initialise that later
but, inside of the thing which BaseConstructor extends
you can call "this", and get that info
this is clear
Hey electronic, i was testing stuff on my test server and i noticed that when you enter the proxy and move to the spigot (like switching to proxy -> server) the cpu consumption goes up disproportionately for a few moments (waterfall), happens also on BungeeCord on vanilla without plugins and that stuff.
Do you know why is caused? So i can take a look and try to fix it up.
probably due to compression of chunk data
^
Thanks, ill take a look
Any ways i disabled compression threshold on spigot and waterfall and nothing changed
ERROR: java.lang.NoClassDefFoundError: net/md_5/bungee/api/ChatMessageType
But in waterfall I see an enum called ChatMessageType maybe it was in 1.16 or before a class and now I updated to latest and see it's an enum, so maybe the error appears therefore, but dunno how to fix it
What api are you using of waterfall
The project itself doesnt hook into waterfall but uses a project to compile with latest waterfall, so 1.19 and on the server its the same jar - 1.19
Oh i see I used before 1.14 chat-api from waterfall and now the whole project (bootstrap) 1.19
maybe thats the reason... 😄
Yeah, is it.
I checked this https://github.com/PaperMC/Velocity/pull/357/files
When I get a ProxiedPlayer through getPlayer(String), would that be like getting a OfflinePlayer in Spigot using getPlayerExact?
Like will BungeeCord get any data it has, or is that just null for players not connected to the proxy yet?
bungee doesn't have any player cache iirc
yeah, there is no cache, only online players exist
What's actually the command to finish rebase on VIM?
Is there a way to register perms whilst the plugin is running on Waterfall? Like some waterfall equivalent of bukkit's #PluginManager.addPermission()?
Nvm, found it. For those curious, it's done in the constructor of a bungee Command
On another note, is there a waterfall equivalent of #Bukkit.broadcast(message, permission)? Or do you just have to loop, check which players have perms and send to them individually?
second
Can we remove these version posts?
I just want to write something different is that possible?
{
return new ServerPing(
new ServerPing.Protocol( bungee.getName() + " " + bungee.getGameVersion(), protocol ),
new ServerPing.Players( listener.getMaxPlayers(), bungee.getOnlineCount(), null ),
motd, BungeeCord.getInstance().config.getFaviconObject()
);
}```?
When you make a command in Waterfall, the constructor is Command(String name). That name doesn't seem to be the command label so what actually is it? Is it just for storing purposes?
As ever, I found out after I ask. The "name" is the main command
in spigot i can use ConfigurationSerializable to load a custom class from yaml config. how can i load a custom class in bungeecord? anyone have a tip?
e.g. with ConfigurationProvider.getProvider(YamlConfiguration.class).load(InputStream)
yes but i cant load the custom class. it can not be cast
i have this: List<DatabaseEntry> databases = (List<DatabaseEntry>) configuration.getList("databases");
you need to parse it
don't think bungee has a way to do that automatically
(unless registered with SnakeYAML directly I guess)
mmh ok thx
What command do i use to build the jar
depends. If you are a developer/have a non-build patch executing mvn clean package would do it. for non debug purposes just run ./waterfall b
Yeah, if you do again waterfall build it will basicly delete all your changes, take care with that
That’s why I worded it like that
If you have an uncommitted patch either rebuild the patches or don’t use the build system
I'm having a bunch of trouble connecting to my database via Spring-DataSource.
private static ApplicationContext loadSpringContext(Plugin plugin, File... configSources) {
var pluginClassLoader = plugin.getClass().getClassLoader();
Thread.currentThread().setContextClassLoader(pluginClassLoader);
try {
Class.forName("org.mariadb.jdbc.Driver");
plugin.getLogger().info("Found MariaDB Driver");
} catch (ClassNotFoundException e) {
plugin.getLogger().warning("Unable to find MariaDB Driver");
}
var appBuilder = new SpringApplicationBuilder()
.resourceLoader(new DefaultResourceLoader(pluginClassLoader))
.sources(SpringRoot.class)
.bannerMode(Banner.Mode.OFF);
includeApplicationYMLFromPluginResources(appBuilder, plugin);
includeConfigSources(appBuilder, configSources);
return appBuilder.run();
}
this is confirming that the driver is definitely there and accesible
but i'm getting an error that says "failed to determine a suitable driver class" every time
wondering if this is an issue unique to trying to load spring up underneath waterfall?
(and yes i know spring is heavy and overkill for this, it's just that this is 1 module of 4 out of a larger project that uses spring for the core data module so being able to load that core data module up in the 'small' waterfall module would greatly simplify things)
hey
where i can find the waterfall dependency
latest
on github the repo doesn't work anymore
(DiscordBot) Waterfall A point in a river or stream where water flows over a vertical drop or a series of steep drops. (https://duckduckgo.com/Waterfall?v=i&kp=1)
.g help
(DiscordBot) The Help (film) A 2011 period comedy-drama film written and directed by Tate Taylor and based on Kathryn... (https://duckduckgo.com/The_Help_(film)?v=i&kp=1)
i want only the maven repo
this reop not work
"not work"
that gives me literally nothing to go off
I can't help with 0 information, hows it not working?
hit the build button
try running from the terminal or whatever and providing the full build output
i try now to reset maven
maybe this can be helpful
i have fix it
thanks for the quick help
Hello can someone enlighten me to make a system where the player can connect to several versions a bit like ViaVersion for learn how it works, is it quite complicated to reproduce, or, it is quite simple, I guess I can use the PreLoginEvent event no?
I mean, you need to rewrite packets coming in
easy option, "just use via"
(in and out)
the thing is that I use FlameCord and I have a lot of error messages when I join with several versions using ViaVersion, then it works but at each connection I have an error message that comes from the source code of ViaVersion
the first error on starting server :
Because they made incompatible changes
you'd need to take that to flamecord
Waterfall lets you disable entity metadata rewriting and leaves those classes around for compat reasons
the second error at each connection :
Bro read what he said
You'd be better off tryna get flamecord to fix their compatibilies, get via to, or fork via and patch it yourself
Firstly, here forks are not "supported", and flamecord deletes competly entity meta data https://github.com/2lstudios-mc/FlameCord/blob/master/Waterfall-Proxy-Patches/0032-Disable-entity-Metadata-Rewrite.patch
yes I know it says that something is null but I don't have access to the code of ViaVersion ^^'
Remove that patch i sent and re-build it
how can I correct them myself?
that's on you to figure out
or I put ViaVersion only on my paper servers
a friend who uses FlameCord told me he does it like this
thank you anyway ^^'
Via plugins should be on backend servers anyways
just download the latest
when update waterfall to 1.19.2?
but I have one issue
if player takes damage, he kick him
I uninstall all plugins from bungee & lobby
and the problem persists
U can help me with this problem electroniccat?
<-> DownstreamBridge <-> [lobby] - bad packet, are mods in use!? Couldn't read all bytes from a packet. For more information, launch Waterfall with -Dwaterfall.packet-decode-logging=true```
look at 1:20min on video
u can join to my server for test it?
message.txt by @slim dawn: https://paste.gg/d85ad7cada8d4e61aefe153bb46959e3
electroniccat
- with the flag
- and I said, without plugins
given that you've only got 1 plugin installed, which has caused issues in the past, you probably wanna go check for updates to that thing
wait
In the error you copied earlier, "launch waterfall with", that goes before -jar
but, it's probs what I already said
my flags:
java -Xms500M -Xmx3500M --add-opens java.base/java.lang=ALL-UNNAMED -jar server.jar --nogui
on bungeecord
hosts tend to recommend/assign them like that to save on memory and can oversell machines easier
also it's not normal with non-server applications to assign everything at once. in a normal environment and short lived programs you only want to use as much memory as you need to leave room for other programs, the os and the file sytem cache
*system
I know this is most likely lame question from yall, but how do I check if .getFrom( ) is available in ServerSwitchEvent?
what do you mean by "is available"?
is there a way to tab-complete bungee-level commands?
yes?
how exactly? I don't see a tab complete method on the Command class
so if my command implements that it will be picked up automatically then?
off the top of my head, yes
kk, awesome. that helps a ton
Hello, is there a way to pass command onto player's proxiedserver? I have a command name conflict in proxy and spigot, so I would like to just let the spigot server handle it
*paperspigot
Why do you think that bungee haves g+command name
Just do for your proxy command "g+name" and for spigot keep withot g
Well I have registered a command /build to send you to the build server, it has been added for convenience not for any necessary functionality, making it /gbuild would not really help it
I believe that is not possible unfortunatelly
Speaking of which, is there an event for any command with the possibility of cancelling the event before reaching a spigot server?
ServerKickEvent has the kick message in it?
Isn't spigot actually kicking the player?
I guess you could keep the connection with proxy..
Im just dumb sorry
I mean, for kicks initiated from the backend, it will fire that event, if you wanted full access you'd need to hook into outgoing packets
as for cancelling commands, if unsigned, the chat event should work
Yeah figured that a few moments ago
I thought the connection with proxy is cut along with the player getting kicked
Kinda forgot what a proxy is apparently
public void onCommand( ChatEvent event ) {
String message = event.getMessage( );
ProxiedPlayer player = ( ProxiedPlayer ) event.getSender( );
if( message.substring( 0, 1 ).equals( "/" ) && ! authenticated.get( player.getName( ) ) ) {
event.setCancelled( true );
}
}```
message.txt by @raven frigate: https://paste.gg/f8cb7d6c75ff41cba0c20c1bac911350
Anyone has any idea why this error pops in when I send any command but am set to authenticated?
To clear up, authenticated is a hashmap of string and boolean
ye its containsKey but that is set on join and removed on disconnect, so there is no way the key isnt set
try debugging it
will do
Hah Im dumb
It was ServerDisconnectEvent instead of PlayerDisconnectEvent where I was removing the key from the hashmap
Waterfall yells at me for this when I handle the ProxyPingEvent.... Not sure how I could actually improve this.....
cache the data that is not dynamic
?
If you mean caching favicon, I already do that (At least for the image data) using the FaviconHandler:
https://github.com/Andre601/AdvancedServerList/blob/feature/favicon-support/core/src/main/java/ch/andre601/advancedserverlist/core/profiles/favicon/FaviconHandler.java
[WARN]: Using PROXY protocol for listener /IP HERE, please ensure this listener is adequately firewalled.
[WARN]: Since PROXY protocol is in use, internal connection throttle has been disabled.
[WARN]: Could not bind to host /IP HERE
io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Cannot assign requested address
``` anyone know the cause of this?
I'm super new to Waterfall
trying to connect a paper server to a waterfall server
are you using haproxy? otherwise you dont want to use proxy protocol
no, do I disable it?
yes, also waterfall has to run on a different port from the server if youre doing both instances on the same machine
they aren't on the same machine
nah
or the external address:port
external address:port
and you used the ip:port not a hostname?
it's a hosting panel
pterodactyl?
does it use docker? because it sounds like that
please understand we cannot exactly help with private solutions, you will have to take that up with your friend then
all we know is that the address you tried to assign is not available to the JVM for whatever reason
yea fair enough
could be either the interface is privileged, doesnt exist, or something else is already running on that port
how is it hosted
Links sent through #ProxiedPlayer.sendMessage() aren't clickable. Is there some way to change this?
The plugin is meant to take args from a command and show select players
So they're not JUST sending links, they're sending messages that may contain links that need to be clickable
Basically, the logic for sendMessage doesn't do that
only way to fix that is to use components
So like, make the whole message clickable?
No
I mean, you can make the whole message clickable, but, if you want just the link to be clickable you'd basically need to write your own serialiser or something
if you use the adventure platform stuff, there are ways to just convert a string to a component and then use a regex filter over the component to basically do stuff like that
Ah right. Thanks
Hello, i'm trying to cancel the ChatEvent so that all the players except one still see the message sent. Is it possible with Waterfall or only with the paper API ?
Only paper for 1.19 or newer
ok, thanks anyway 🙂
What is the best api plugin to create inventory guis from proxy?
wtf
Bro, that's kinda stupid why you would create an inventory trougth the proxy
well punishments gui or smthg like this
Can someone help me with TextComponent? I'm using the ComponentBuilder to merge to TextComponents (let's call them sub-components). If the sub-component has a link, I want it to be clickable but ONLY that sub-component. However, it seems that making one sub-component clickable makes all the following ones also clickable with the same link. Is there a way to cancel this?
I've tried setting the click event of the next sub-component to null but that's not worked
(Also while I'm on the topic, if anyone knows a way to carry colours over into the next sub-component, that'd be amazing <3)
i don't really think there is one to make a gui through the proxy
with that said, how i'm doing it is that i have a custom punishment system that runs on the proxy, and then i extend upon that with guis on paper / sponge servers
Anyone having an idea what exactly is not working here?
I use Caffeine in this class here:
https://paste.helpch.at/nipucihaqi.java
And I initialize the class here: https://paste.helpch.at/idewovezon.java
outdated dependency?
Issue is already solved... kind of.
Was the minimizeJar option deleting classes it thinks aren't used only for Caffeine to require them...
https://github.com/PaperMC/Waterfall/blob/master/BungeeCord-Patches/0006-Fetch-modules-from-the-Waterfall-API-endpoint.patch#L31
One little thing I noticed: In this patch shouldn't the API link be api.papermc.io instead of papermc.io/api?
/api was the old endpoint
Should ideally be api.papermc.io yeah
Feel free to PR :)
You can't manually edit patches via the webeditor, otherwise the hashes won't be updated, see the contributing guide
Yeah i know how to edit patches, i see.
Is the change just from papermc.io/api to api.papermc.io or are there other changes required for the URL?
Also, the contributing guide is... outdated?
Like doing git rebase -i upstream/upstream only returns a fatal: invalid upstream 'upstream/upstream'
So not sure what happens here
@bleak current Do you have some input on this ^
It's really frustrating when you want to update a patch (Because I don't think a new one is needed here) but the contributing guides are wrong
Works for me, are you cd'ed into Waterfall-proxy?
yeah it could definitely be made a bit clearer
Okay, I'm confused... I made the changes I wanted and made the ./waterfall rb at the end...
Is it doing the patches on the branch I created or does it default to master?
Okay, I think I got it
yeah, you did it right
Also, quickly improved the contributing file a bit... Mainly some formatting fixes
Spend some time cooking up a change for the contributing file... Feedback appreciated
https://paste.gg/p/Andre601/3329a6fd83a84570843aceba939b157f
Bump, still an issue
The structure of the component is what matters
i.e. you'd wanna structure them so that the components following your link, aren't a child of that one
https://spark.lucko.me/ioD1ZWlBIY if you filter by sources here you'll see Floodgate has a Netty handler that's taking up a good chunk of CPU, but it's also listing Brigadier when that shouldn't even be happening? As addInjectedClient requires a channel.
https://github.com/GeyserMC/Floodgate/blob/master/bungee/src/main/java/org/geysermc/floodgate/inject/bungee/BungeeInjector.java#L136 is the source but please don't look too hard. I'm pushing for less Netty for future refactors.
Is this some weird profiling bug or legit?
I mean, that would look like a bug
And the weird thing is that multiple spark profiles are reporting the same thing, so it's not a one-off
So appending text components to a component builder makes the new component a child of the existing component? Is there any way to get around this? This is how I'm forming the builder RN: for (String s : strings) { builder.append(toComponent(s)); }
Yes
I have an interesting issue, when importing Waterfall using gradle, it works mostly. But the Class BungeeCord cannot be found, is there a way to fix that?
do I need to also manually add the Bungeecord api?
Use something like https://oss.sonatype.org/content/repositories/snapshots
To get the proxy and call BungeeCord
any ways, why?
why what?
why you need to use bungeecord main class
so I can access the instance and get the PluginManager?
The BungeeCord class is not part of the api module
Yep, i sent him a repo that haves the proxy module imself
so I need to also add the Bungeecord-api?
Also you can do getServer() on your plugin instance or somrthing like this, i dont remember
I think you can do that without instance bungeecord
then I would need an Instance of the Main Plugin Class
Yes
or ProxyServer, its the same as the BungeeCord class
If you want to use the BungeeCord class just use the bungeecord-proxy artifact instead of bungeecord-api
^^
Changing the repo will do absolutely nothing without using another artefact.
I just used this solution, so I don't need to add another repo / artifact
Any suggestions on how I could improve performance here?
https://paste.helpch.at/voyefemidu.cs
The actual event handling:
https://github.com/Andre601/AdvancedServerList/blob/feature/improve-fakeplayers-creation/bungeecord/src/main/java/ch/andre601/advancedserverlist/bungeecord/events/PingEvent.java
I mean, with the time variability there, make sure that you're not tryna get reasonable measurements out of unreasonable overloaded harwdare
outside of that, work out where the performance hits are, it's pretty hard to say where the time is gonna be spent without digging deeper into that code
You can split the tasks
So you don't huge load the event once ig
My guess is the Favicon handling as I allow 3 separate sources to be used as input: file name (Will then take from a folder), url or player name (uses mc-heads).
I do cache the created favicon in the end to reduce calls and such, but there is obviously the initial spike at the start...

Can i cancel switch on ServerSwitchEvent event?
Why would you cancel it
well i want to make something like whitelisting system
is the event cancellable?
i've changed to serverconnectevent, and this one is cancelable but if i cancel it still connects me
probably boils down to the circumstances in which the event is firing/being mutated
oh, no, nvm
If the event is cancelled, it pretty much bails out of the logic which attempts to connect somebody somewhere, so, probs either not being cancelled or something is uncancelling it
Can i mute listener X took Xms to process event?
Why you would do that
cause i got warnings when redis take 50ms to process
I mean, it is stupid to filter the log of a stacktrace that is saying that X plugin is taking longer than usual to pass the event. It is better to fix it instead of hiding it
how can i fix it when using redis?
Is the plugin oss?
Well probably you can split the tasks of the listener so gets faster to process
I don't know how is built that, so i can't say too much
But definitly use a LogFilter to hide a warning like that feels stupid
It is made for a reason, not to be annoying. It is to inform you that something is wrong in the process and it took longer than usual
Events generally block stuff, sometimes it's nothing of care, sometimes, it's the entire network pipeline
Can adventure-api be used on a waterfall proxy
using adventure-platform, yes
cool ty
@trail plume did we find any solution to that serverkickevent issue?
I found the cause but no good solution
The cause is the event loop thread not being able to join back into the event pool.
Changing that fundamentally screws with the networking though and not doing it also fundamentally breaks the event
Don’t think we can fix it without breaking something else
I should note
If you want something that definitely works then add your own channel handler into the pipeline, you can get notified on closing.
It’s just not a pretty solution
oof moment
how's the chat signing protocol for proxies looking?
hacky || ass
so, apart from this, what should i do for making it work? the main feature of that plugin is working on kicking
Hello, when i use Server#sendData or ServerInfo#sendData on Bungeecord, the plugin i received in the spigot "onPluginMessageReceived(String channel, Player player, byte[] bytes)" is the first one or is there a way to send data from a specific player? It seems that the ProxiedPlayer#sendData dont send to the server which makes sense i guess, should I not use Player on onPluginMessageReceived for waiting a response for a specific request i did by a specific player?
dependeicy information is useless
which dependency information?
All you provided was a list of the libraries your project uses
dependencies { testImplementation(kotlin("test"))
compileOnly("net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT")
implementation("net.dv8tion:JDA:5.0.0-alpha.19")
implementation("io.requery:requery:1.6.0")
kapt("io.requery:requery-processor:1.6.0")
implementation("io.requery:requery-kotlin:1.6.0")
implementation("mysql:mysql-connector-java:8.0.30")
implementation("com.zaxxer:HikariCP:5.0.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.4")
implementation("com.github.minndevelopment:jda-ktx:fc7d7de58af04e25eb58c0e8b4923621e3179719")
implementation("com.squareup.okhttp3:okhttp-brotli:5.0.0-alpha.10")
}
sorry, my client doesn't respond now, I will send you a detail as soon as my client reply
I don't do support by proxy
well I'm dev of his server and he is admin, and I don't have access to console, anyway. I misused word.
Hello, is the ChatEvent still supported in 1.19 ? I'm using a plugin that replaces some strings with others but it seems like after the update it does not work anymore.
I'm trying to event.setMessage and in a debug output the right message is shown but in chat, it is not
No, the event still fires but modifications won't apply unless you take over chat handling
BungaCord updated netty and build failed? do they actually test this stuff?
also technically speaking having builds that fail when an error was made somewhere is kinda the whole point of CI
runs
(although that's more a thing with big projects that are impossible to fully compile on dev machines)
I'm sorry but i don't understand what you mean by "take over chat handling" . I don't see what i'm supposed to do to change the message
You can't change the message
The only way to do it now is basically to handle chat on the proxy
Hi, do you all know if its possible to run .append() in a forEach() loop?
I don't see why it wouldn't, but I'm having some trouble making it work.
I mean, yea
I mean, depends on what it is
if it's an immutable object and append returns a brand new object, you're potentially gonna have some headaches
This is what I'm working with so far
@Suppress("Unused")
@CommandAlias("vote|votes|votesites")
class VoteCommand(private val configuration: ProxyConfiguration) : BaseCommand() {
@Default
fun onVoteCommand(sender: CommandSender) {
val siteList = ComponentBuilder("VoteSites").color(ChatColor.DARK_GREEN)
PlayerData[sender.name]?.voteTimes?.forEach {
val siteName = configuration.voteSites[it.key]
val color = if ((it.value - System.currentTimeMillis()) <= 8400000) { ChatColor.GREEN } else ChatColor.RED
siteList
.append(
ComponentBuilder("$siteName/n")
.event(HoverEvent(HoverEvent.Action.valueOf(it.key)))
.event(ClickEvent(ClickEvent.Action.OPEN_URL, it.key))
.color(color)
.create()
)
}
sender.sendMessage(siteList.create())
}
}```
sendMessage() wont accept whatever data type siteList.create() is
apparently a Array<out BaseComponent>? ?
Yea, bungees chat API is pretty shoddy
You might need to do something like create()*, I forget what the thing was to get it to explode an array
oh, * goes before the thing
I was reformatting this to be expandable
sender.sendMessage(
*ComponentBuilder()
.append(```
If I try to stick it in the for loop, it just causes errors
Thanks, that was the lead I needed, I'll see if I can do that another way.
Basically, I do not know if the component builder is immutable or not
or, well, no, now I'm just mentally gone in general
Hello there!
Duplicating question from #paper-dev coz, my question could be related to waterfall too.
Is it possible to use Remote JVM Debug feature in the IntelliJ IDEA debugging the plugin, on a server that is started under the Waterfall proxy?
yes
how to log message in console without plugin prefix?
getProxy().getLogger() ? 🤔
Using sout, using the log4j logger
Can i use \n in a string to get to a new line when i send a message to a player ?
I think so?
Yes, you can
Trying to change the following message: https://gyazo.com/0e53393e31a07b901d6dd8a338d1fb13
I tried putting the messares.properties in the root dir (where the waterfall JAR is) but that seemed to make no difference, and going through the API I don't seem to be able to catch the event that causes this message anywhere and set my own custom message, does anyone know of any way of changing it short of doing so in the JAR itself?
Thanks!
The thing will load the file from the disk assuming its in the place where your proxy is running
Weird. it didn't seem to do so
file named messages.properties correct?
Don't need an _en or anything at the end?
you just copy the file out from the jar and shove it in the cwd of the proxy
That's what I've done
oh
this is embarassing
it works now
I think I spelt it wrong first time 💀
Thank you for the help ❤️
Amy ways #waterfall-help i think
Does anyone know how i would automatically copy the jar to a location after building? im using maven + intelliJ
is there a way to specify it directly in the pom.xml? i did that with paper but the pom.xml of velocity is different
Yes
tbh that's not really how you are supposed to use maven but ¯_(ツ)_/¯
It's the fastest and easiest way i know of to just press one button and have everything build and put in place 😅
Unless there are better ways without having to use commands every time please tell me i really don't know much at all about maven
Why, after applying patches just do mvn clean install or something like that, you will get Waterfall binary on /boostrap package
moving the output folder to some other folder generally breaks the concept of using maven
and, as said, theres people who copy the jar using antrun
or theres stuff like symlinks, etc
@Bekaert your IDE's run configuration is usually what you want to use for copying the plugin and starting the server
(or a makefile)
*"building, copying and starting" of course
What would be the best way to get a player by their UUID (who can be offline)?
Waterfall doesn't have a concept of offline players
Yes but many proxy plugins are able to get uuids from names and vice versa. So I was wondering how they are doing this
Like punishment plugins
They either just have their own cache, like a database
or just have their own logic to lookup against mojangs API
Ok thanks
Why would you make a single task async
You will save multiple's?
Just wondering if it can be done inside an async method
Bungee doesn't have a concept of a main thread
And the things generally gonna boil down to the data structures in play
If your data structure can be accessed concurrently, it's probs not gonna be a concern
I mean does the network control thread count? Historically some of the stupider events are still called from that context
Alright thanks 😄
When i want to cancel the ChatEvent, is there a way to remove the blank line (if possible without a paper/spigot/bukkit plugin)?
Or only with a plugin on every connected server and not just a waterfall plugin?
There are 2 ways
- Cancel PlayerChatEvent on spigot server
- PacketListener and remove ChatPacket before is caught by proxy (I don't recommend this)
I need the packet, so ill do the first way
Uh, second way definitly i wouldn't count it as a way.
Does it just edit the message to be “ “ or what does bungee do to cancel it?
or as empty
how to check client version on waterfall
I think that the protocol version is exposed on the players connection somewhere
getProtocolVersion() (With handshake)
Also getVersion() method of the initial handler
That's hacky way
Does bungeecord has another channel for plugin messaging? One with "namespace:path" format.
Perfect, thank you :)
In the second line it throws an nullpointer exception, but the file exists
Why does it work when I use the default waterfall jar than only waterfall-config + waterfall-native?
.load(new File("config.yml"));```
One would guess the the environment you're in hasn't registered the YamlConfiguration provider thing
means it's not the project itself that's the problem, but that the environment has not registered the listener and that is why the problem occurs
cause its an alone instance working with waterfall and not in a waterfall server 😄
ah youre right, with the waterfall-config, the Yamlconfig class isnt included in the jar. then I have to take the whole waterfall jar itself 😄
for velocity dev use #velocity-dev
though same thing was asked in velocity-help a few hours ago, see #velocity-help message
oh rip, that's why I didn't find anything haha
Hey electronic, i was looking the protocol & velocity protocol's implementation. On the StatusResponse packet (readString) you could limit the received data to 65536 on the DoS improvement patch.
Don’t see why not, if you PR it then it’ll likely be pulled
Sure, but i suck at editing patches, i will see contributing file. Also EncryptionRequest/EncrptionResponse packets could be limited tho.
I will make a proper pull request
You remind me
There’s something that absolutely does need doing too
Sigh
This is too ugly to use
Mostly for my own network i backported almost all those from velocity.
I have another question why does waterfall send 3 exceptions instead of the same cache in MinecraftDecoder? Velocity only sends one called as "DECODE_FAILED"
Did some byte change?
Probably an oversight. Being on lifesupport waterfall isn’t getting much love
No, just me attempting to limit the asn1 containered player key in some way
It’s unnecessarily complicated
Well, I tried to change that, limit some packets that were not and in exception attack it improved something (besides I added a boolean property called logStacktraces in the handlerboss)
Not a good solution. I’d rather you add a class like Quiet*Exception (trace-less) and filter that in the logger
part of the seperate exceptions was generally to know what was going on
I think they would not accept a pull-request adding the option to disable the logs by "debug" but it would always be toggleable. Since the logs are proven to be quite wasteful in an attack.
I see.
One of the big headaches of caching exceptions is that you lose information about stuff which otherwise would be useful, not to mention even the people running in stupid environments expect help too
reducing the cost of exceptions during the login process is generally something I aim to do, but, honestly, bungeecord in general has me burned out (ontop of just general burnout)
The issue for hardening is trying to avoid having exceptions thrown by something that’s outside of the direct control of the system.
Catching those and re-throwing a cached exception is the stupidest that can happen
I will leave the exceptions to someone else, the pull request I will make will only limit some unlimited packets that are missing in the Waterfall protocol
I saw this from Janmm
upstream generally doesn't care to invest time into resolving that sort of stuff
Although honestly it's not too bad so far, bungeecord closes the connection after the first exception when the isActive channel triggers, so isn't that easy to kill bungee by way exceptions
Wasn’t a fan of that PR because some of the design changes are unnecessary, plus it has quite a bit of stolen/non attributed code too
and throwing in a fuckton of work on waterfall generally kinda feels wasteful especially as I tend to see stuff that ends up in waterfall butchered upstream or upstream just ends up doing weird things
Always they point as out of scope instead of avoiding the issue
Velocity seems like doesn't have even some bungee exploits
The issue is also there’s no clear distinction between active and inactive
That’s bungees biggest issue
Something you can’t exactly change
Velocity deals with state better, and is smarter about when to stick in the pipeline, and better about data validation, etc
Yes.
For an experiment we are looking into how viable it is to make most of the networking run on rust and use jni bindings for api
ç
I have another existential doubt, right now how is waterfall if someone starts to saturate Encryption requests, since there is no established limit it will be saturated? I tried limited/unlimited and only was a few % usage of difference
Something like ->
private final QuietException OVERSIZED_PACKET = errorBuilder("A packet could not be framed because it was too large");
public void oversizedPacket(int packetCount, int expected, int actual) {
if (DEBUG) {
throw new CorruptedFrameException("Packet #" + packetCount + " could not be framed because it was too large (expected "
+ expected + " bytes, got " + actual + " bytes.");
}
throw OVERSIZED_PACKET;
}
Has waterfall an api for tab completer ? Because Bungee one doesn't work well for me
exact same as upstreams, and a command define event
outside of that, the thing generally works fine, just its only called for commands registered on the proxy
is there any dev version of waterfall?
no
All commits of Waterfall are instantly a update. But why you would like a dev-branch
No just got me curious.
Hi, i want to collect the online time for players so my first thought was to store the join date and calculate the timespan between join & quit. So basically everytime a player quits the proxy i calculate the difference and update it to my store. Is this a reliable way of doing this? I mean the quit event should always be called unless the proxy dies, right? Is this so "reliable" that i could expand this to things like player money etc?
how does che BungeeCord channel work, is it available via waterfall?
i currently have this code which was taken from the spigot wiki and it should apparently send a message on all bungee servers.
tho i don't see any message in the servers
does anyone know why?
Yes, the channel exists on waterfall and works the exact same as in bungee
then my aren't my messages showing in the servers
there could be a problem with my code definetly but every check seem to pass without problem.
Outside of making sure that you're actually connected through the proxy, no idea
wdym by actually connected
i.e. make sure that you're actually connecting to waterfall and not the backend server
my servers are set up correctly
i can log-in and switch servers in game
i've finally got an error.
apparently the channel wasn't registered
The channel is bungeecord:main for 1.13 and newer
Spigot does some mangling for the BungeeCord channel, so you just wanna leave it as that, otherwise it breaks
issue they have is that they didn't register it
Hiya. I'm attempting to implement Teams this into a custom plugin of mine, but I'm struggling to find any documentation for Teams anywhere. I'm attempting to add prefixes, suffixes, color, etc in tab, but I'm not having much luck. I would be extremely grateful if you had any suggestions or snippets of code that you could share. thanks
public void initTeam(ProxiedPlayer player) {
Team team = new Team();
team.setName(player.getName());
team.setDisplayName(player.getName());
team.setNameTagVisibility("always");
team.setCollisionRule("always");
team.setColor(1);
team.setPrefix("test");
team.setSuffix("test");
team.setMode((byte) 0);
team.setPlayers(new String[] {player.getName()});
for(UUID p : connectedPlayers) {
ProxyServer.getInstance().getPlayer(p).unsafe().sendPacket(team);
}
^this Team is net.md_5.bungee.protocol.packet btw
and more specifically, the client is disconnecting with "Connection Lost" when this packet sends.
I strongly suggest avoiding touvhing the scoreboard on the proxy. especially the api for it on the bungee is not fully synced with the client in some cases
(also of course that's not how you use the scoreboard api... the packet sending methods are for packets, not random objects)
ok well I guess you could use the Team packet (which I'm not sure you are using?) if you try that then check the error which cases the disconnect I guess and fix the issues that error points out
Yea i'm using the Team packet and getting no console or client errors. If you don't recommend touching the scoreboard on the proxy, how would you recommend manipulating the Tablist on a bungee network?
I would not recommend manipulating it. if you really need to use the api of established plugins like BTLP or GlobalTablist
mk, i'm not fully ready to use an api of something else yet as i'd really prefer to keep this within the current plugin. I'll keep trying to figure out the Team packet issue i guess, but the only error im getting from it is a MalformedJson exception
Prefix and suffix have to be json chat not text
Aka while yes the type is string
The data is json chat
Good look figuring that out with bungee chat
Heyo- I’ve got a similar question to the guy above- so we got the stuff figured out with proxy teams and stuff however when we send a PlayerlistItem it doesn’t like the team players- and doesn’t change the prefix, but when we don’t change a PlayerlistItem the teams work perfectly,
Am I missing some type of data in the PlayerlistItem that needs to be persistent in terms of the teams to work?
how are you trying to modify the playerlistitem? the playerlistitem contains only UUID, displayname, username, gamemode, and properties(cant remember what these are). the rendering of the Team stuff(prefix, suffix, etc) is done on the client.
managed to figure it out 🙂
out of curiosity, how do you handle other team attributes such as collision or nametags, do you completely ignore them ie not use them?
Using packets for them
managed to achieve this
just regex based tab syncing, i.e skyblock.* will see each other n shi
gotcha, i'm using packets as well, but i was trying to get something like no collision, ie setCollisionRule("never"); working, but havent figured it out
interesting, did you do anything from the backend server or only by pushing the packet from bungee?
you broadcasting the team packet to each user?
yep
even to self?
yep 100%. how did you format the collision json? team.setCollisionRule(ComponentSerializer.toString(TextComponent.fromLegacyText("never")));
thts what i did^
using net.md_5.bungee.protocol.packet.Team right?
mhm
really, do i only need json for the suffix and prefix?
yeah
yes
and displayName
only display stuff is json
if you use that
did you not look at client src? xD
don't feel too bad, it was 4am yesterday and i rewrote ours completely after 3h of work on it xD
literally yeeted it
I don't recall the server caring about player on player collisions, given that player movement is 100% client sided
cramming is a server thing
works now. amazing. ty
Oh wait yeah crammng is then collisions is client mb
collisions is client
cramming is server
if in doubt with packets there's always pakkit 😄
be careful with proxy packets though, you're the only synchronization with it
i'm basically only doing it on ServerSwitchEvent and PlayerDisconnectEvent
btw electronic whilst you're here, does velocity not care about team packets?
Looked into that earlier for a personal project and couldn't see anything regarding it
velocity doesn't handle scoreboards at all atm
ohh so it's near impossible to do sorting or does it just forward?
it just forwards the packets from the server, like a proxy
How do plugins like BTLP accomplish using multiple format codes on a name in tab? ie. Bold and a color. I can do one or the other with a Team packet, but not both from my attempts.
prefix/suffix
Really? That’s what I assumed at first too, but it didn’t change the name.
the "name" only supports a singular color, derived from the team
So, generally, you just replace that
Ohh, so they’re using the prefix and suffix to display the actual name?
Yes
gotcha, how do you accomplish removing the actual player name from in between the two?
afaik, you can set the display name or something
aha gotcha. ty for your help
I want to write a code under this code there is a system I want but I don't know how to do it
add a new readString
with a new variable called "key" or something
and done
the client now needs to send the key in the login process
cancel if the key is not correct
I saw 2 servers with private clients. You can't login to the server with any version other than your own client.
when i log in they show me a message i think they did it with bungeecord handshake package
I want to do this to my server but I have no information on how to do it bungee sided
well just add a new field to read to the packet I assume and disconnect when it's not there?
not sure why you wouldn't just do it with plugins though
really no need to mod the proxy for that
I don't know how to do it with the plugin
I think it would be more logical to do it through proxy because players should not login with any version, if they try to do it, a message should be shown because it will tell to use private client
I guess I'll have to find a developer on this but I can't find it
pretty sure there is an event which can be used for arbitrary data in the login process
otherwise just use the plugin message channel to communicate with your custom client
youre about to break all non-modified clients
There is a method to identify the version, the initial handshake has the protocol version
if you need to do an exchange before login please consider using login plugin messaging
can we talk a little privately
Inyect netty?
There is no discussion to be had here. Also I strongly recommend you use Velocity since you‘re developing your own plugin.
Velocity has api for login plugin messaging, probably the ideal thing for you to use
Both fabric and forge mod loaders have easy integration for login plugin messaging (presync)
As for how you‘d do this on Velocity
Take the PreLoginEvent:
https://jd.papermc.io/velocity/3.0.0/com/velocitypowered/api/event/connection/PreLoginEvent.html
Get the connection #getConnection()
Check the ProtocolVersion against what you want
If everything matches
Cast the connection to LoginInPhaseConnection
Send your request for token/whatever
https://jd.papermc.io/velocity/3.0.0/com/velocitypowered/api/proxy/LoginPhaseConnection.html#sendLoginPluginMessage(com.velocitypowered.api.proxy.messages.ChannelIdentifier,byte[],com.velocitypowered.api.proxy.LoginPhaseConnection.MessageConsumer)
Listen to the response in your consumer
then decide to deny or accept the connection
None of this is supported on Bungeecord/Waterfall
Velocity-spam moment 🥵
Id rather give context and guidance over answering two dozen small questions
I see it as a good thing, but I don't think it's right to promote velocity even if it's from Paper here. This channel is to discuss Waterfall and the plugins made on its base
Only waterfall """supported""" solution for what they wanna do would be to fork waterfall, or basically to inject into the netty pipeline to hijack that stuff before it gets there
Well, yea, but that's not supported even though it's the obvious solution given the limitations of waterfall
Well, this channel is for Waterfall and plugin development i guess. Solutions for this software.
Anyways i'm not the one to say which channel is for what, just my opinion.
I dislike it, but on the nature that there's no supported way to do it it gets a bit weird
To use some velocity stuff i need to change the license of bungee to velocity ones? Is just for testing (is on github public)
strictly speaking you need to have original project attribution, at least license this part under the gpl or any compatible license and disclose your changes for users. Velocity is not under AGPL so if this is just for your own/your direct network use it doesn‘t need to be open-sourced to anyone (see agpl: network use is distribution)
But that all goes flying out the window since Bungeecord itself is all-rights-reserved and not compatible with GPL
I digress, we won‘t get at you if you:
- Include attribution in the project, like a comment at the top of the file
- Include the license header at the top of the file or a copy of the license and a list of taken files
As for it having to be open-source, it can be kept private if you‘re using it strictly privately or as part/developer or network.
But as general rule of thumb: If you give someone a finished jar you also have to give them access to the source-code
The bungee license itself is a massive headache
yes
It's not something I'm going to use anyway, I just wanted to test how fast bungeecord could be with some optimization tuning, always it will be open-source, and never i will provide to someone the binary file.
If I or someone else opens a pull request to waterfall with the faster var-int, and the velocity frame decoder would it be "legal"? Since it is more than demonstrated even in the asteii page the effect it has
If the attribution is correct then yes.
You‘re the first one in quite a while showing interest in improving Waterfall in quite a while
I'm going to look further into licensing, as I'm not very good at it. As far as I saw the "Dos-Improvement" patch is based on most of the velocity stuff without implementing anything out of courtesy.
After that, I will create a patch for Waterfall, since I work with it and I'm interested in pushing it forward.
So i need to put this? @wide maple
On the waterfall patch i mean
https://github.com/PaperMC/Waterfall/pull/783
If you don't mind, could you check if it's ok? Everything looks correct to me (I tried on my network and all works pretty) - It works on java 8.
Hey electronic, can you see the latest pull-request? I sick at licenses and i would like to know what you think
hello i am trying to broadcast in specific servers only, how can i achieve that? i am using channels to receive from the spigot server and i want to send a message that has been recieved to specified spigot servers connected to the proxy.
ok i fixed by getting all players online and their current server, if it matches mine i just send him else not
for the solving of this problem i just checked the Bungeecord source code to see how the /alert command works https://github.com/SpigotMC/BungeeCord/blob/511017ab35e621f4173e7425c0735aa3c19b3964/proxy/src/main/java/net/md_5/bungee/BungeeCord.java#L743
Use bungeecord channel system ig
I wonder if it is possible to send message between Velocity and the backend server without online player
So a socket connection or a dummy player is required?
oh wrong channel I'm sorry
Error: https://hastebin.com/ixujexeqed.properties
Does I need to use a other event for checking something like this?
@EventHandler
public void onJoin(PostLoginEvent event) {
if(event.getPlayer().getServer().getInfo().getName().equals("lobby")) {
}
}
That's the login event
i.e. right after their session data has been checked with mojangs API
They're not even close to being logged into a server yet
What would be the join event then?
for having fully connected to a server, search for a Connected event
Hi, how can I set the priority of a Listener based on a config value?
Unless theres API to register an event manually you can't
"easy" option is to just have the same listner multiple times with an if check based on the priority
ok, thanks
How can I cancel respawn packets from being sent?
For what?
to prevent the loading world screen from showing when switching servers
I don't think that possible actually, probably you can reset it
How hard is it, to add a Server to the config programmatically ?
trivial
Is there something already implemented or do I need to manually modify the config?
Do you have maybe a Link or something? I am currently clicking through the Javadocs and I am not finding anything so far
This maybe
Yes, that
but it doesn't save to the config
That's a POJO representationof the config
if you wanna actually modify the config afaik you'd need to do that yourself
What would be easier modfiying the actual config.yml or just create a custom config and load the servers on startup. in your opinion
I mean, ideally you'd just have your own config thing
Ok thought so too. Another small question, is velocity replacing waterfall? is it worth it switching to velocity rn?
Is it possible to wait inside the PreLoginEvent but don't let the user log in?
aka wait x seconds or until task is complete before continiung
you can i guess, calling the event after with a task
Does doing async tasks on bungee actually help as much as doing it on spigot? Would it prevent the network experience lag spikes from larger tasks?
well, depends on the contxt of where the event fires
You generally don't wanna be doing expensive stuff on the event loop
how can i add servers on runtime to my waterfall instance?
When will waterfall be updated?
or is there documentation somewhere on how the "patch" system works?
Bungeecord's update is currently broken afaik
ouh, so we have to wait for their fix
Could probably fix it ourselves, but waterfall isn't really a priority since paper isn't even updated yet
alright
Just to make sure I understand you correctly, there are plans to update Waterfall, right?
yes
Okay, thank you! 😄
Regarding the broken update, are you talking about the packet issues? https://github.com/SpigotMC/BungeeCord/issues/3407
I saw Cat just ninja in an update. Was this commit for that issue, or are there other known problems? https://github.com/PaperMC/Waterfall/commit/6192b90a784723dd17fcf60f7cac1bfe6cea098b
yeah that was the issue
Thanks for the clarification!
anyone?
since i am adding stuff but it seems that it doesn't change
Is there an event like PlayerCommandSendEvent for Velocity?
Or how can I make it so particular players don't see a command registered on the proxy?
Oh, there is, PlayerAvailableCommandsEvent
I would assume you define your permissions properly
best to ask such questions in the velocity channel though
oh shoot, I just noticed it was the wrong channel, and yes, this is just to hide commands that are available to everyone by default and should be, I just don't want it to be visible because it will clutter the command suggestions list

is anyone here messing with registering their own receicing packet listeners in bungee and could link some code? having some issues where my listeners wont fire on 1.19.3 anymore although I'm 100% sure I use the correct packet IDs for that version :S
does anyone know how I can go about changing a players skin?
all the things i found on google are outdated
There isn't really a skin api
You can gide youself with this https://github.com/MrIvanPlays/IvanCord/blob/master/Waterfall-Proxy-Patches/0040-Skins-api.patch
changing skin is something that we don't support here as it leads to Mojang EULA violation 👀
It does?
I understand the context that most people want to change the skin is for not being premium, but I do not see the problem if you have bought the game and is for something private
you can extremely easily do stuff with it which goes beyond just skins which violates the EULA

wait really?
Yeah my face was the same
thanks a ton
Hay I have a problem I have downloaded to my server Waterfall via Git and (git clone URL)
I also ran the command that is on github (./waterfall b) after everything went through I put it on my desktop and now open with intellij everything loads except proxy and throws lots of import errors how can I fix this ?
https://prnt.sc/rpmKJmAi00pU
@frigid venture I guess that somehow the module wasn't implemented properly on the main pom.xml
Try to add it
Try to do "mvn clean build"
It does not change anything
I guess that try to build it again, clear your cache and that stuff
also make sure you don't have some the desktop set to sync with OneDrive. (it is by default) I could imagine that messing with stuff
im trying to ping a server, which is online but apparently it doesn't work https://nekobin.com/qazidemoci
this is my current code for the solution
like here the xxpasde server is actually offline but the other one is not
fixed my issue, just placed the redis publish inside the callback.
that would breaks lots of stuff that is currently taken as a guarantee so no, it really shouldn't
the people that want something like that are also not chaining smart proxies but use a proper proxy like HaProxy
the connection is readable before start decoding -> Could i remove that exception?
if (!ctx.channel().isActive() || !in.isReadable()) {
in.release(); //release instead just return
return;
}
Because this exception would be useless then ->
if (in.isReadable()) { //Already verifying if is readable
// Waterfall start: Additional DoS mitigations
if (!DEBUG) {
throw DECODE_FAILED;
}
// Waterfall end
throw new FastBadPacketException("Packet " + protocol + ":" + prot.getDirection() + "/" + packetId + " (" + packet.getClass().getSimpleName() + ") larger than expected, extra bytes: " + in.readableBytes()); //NullCordX - Cached exception
}
It would return before this happens, only would keep it for debug
Not sure you understand what that code is doing
Not sure if you understand what i mean, i check if the connections is readable before. Because i don't really need that debug message. Why would i do it two times
It throws an exception if it's readable, as it shouldn't be readable from there on
That buf passed jnto there is a deframed packet, i.e. if the thing is read properly, there should be no more readable bytes left
Applying: Add message for outdated clients that don't support secure profiles
Patches applied cleanly to Waterfall-Proxy
scripts/build.sh: line 6: mvn: command not found
install maven
thanks
md_5 is stupid or smth?
He broke my plugin lmfao, cause it expected void setPing(int) and now it's setPing(Integer) lmfao
there was some reason for that iirc
it's not api so ¯_(ツ)_/¯ really not his problem lmao
a simple recompile fixes this so I really don't see the issue
It does, just doesn't see a reason why he did that
it might have something to do with different versions not having specific fields. and you can't null primitives
other packets don't do it that way though so not sure ¯_(ツ)_/¯
The packet changed, much of the stuff is optional now
The thkng has an action now
So it can say, just change the game mode, rather than sending everything again
ah, I see
update it ;)
Can someone help me with using local dependencies with Maven on IntelliJ? Posting here because I'm making a Waterfall plugin. Everything's fine in the IDE and during compilation but I get a java.lang.NoClassDefFoundError: net/buycraft/plugin/BuyCraftAPI. Here's the dependency in the pom.xl:
<dependency>
<groupId>net.buycraft.plugin</groupId>
<artifactId>BuycraftX</artifactId>
<version>11.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/BuycraftX.jar</systemPath>
</dependency>
I've also tried using the following:
<repository>
<id>lib</id>
<url>file://${project.basedir}/lib</url>
</repository>
.
.
.
<dependency>
<groupId>net.buycraft.plugin</groupId>
<artifactId>BuycraftX</artifactId>
<version>11.0</version>
</dependency>```
This isn't related to waterfall development
do you have buycrsft on your proxy
If you have somewhere better to post it in mind, LMK
Yes, read this
Thanks, I noticed that. Please refer to my previous answer
No, lemme try
they’re making a waterfall plugin i don’t see how this is not the right channel??
that’ll fix your issue then
need the plugin on proxy
BungeeCord* plugin, is not definitly a only-waterfall thing that need's to be asked here
huh
"yes"¿
i don’t get your point
they’re using waterfall, creating a plugin using the waterfall api and have an issue with it
My point is that it seems to me that it is totally out of sight that in this channel, it seems to me correct if someone asks about something of Waterfall specifically, not an external plugin that works with the base of it
But isn't a waterfall plugin, is a bungeecord one.
You're not understanding me
“i’m making a waterfall plugin”
I didn't see any Waterfall thing that isn't already on BUNGEECORD
so they can still use this channel??
I didn't see that reply always when some one asks a bungee or spigot stuff, but how ever sorry.
It worked! However, Buycraft can't startup on waterfall. Is there a way around this?
make sure you downloaded the bungee version of it
As far as I can tell, it's all in the same Jar but I can't tell it which version to use since no config has loaded
It's throwing [00:51:55 WARN]: Error loading plugin BuycraftX java.lang.NoClassDefFoundError: org/bukkit/plugin/java/JavaPlugin. I'm assuming that's it thinking it's a bukkit server
yes that jar is meant for bukkit
Yeah but it has all the bungee stuff in it? I guess I'll try and find out how to make it work
Isn't the api for the proxy
Anyway, I don't really get why you need BuycraftX on the server to make it work though. I thought the whole point of the compiling with the jar linked was that the jar file would take all the necessary code from Buycraft and use it so you wouldn't have to have Buycraft on the server (unless fetching a specific instance)
Yeah but like, it's ON the jar. The support is there, I just need to figure out why it's not using its Bungee code but only using the Bukkit code instead
Don't use the bukkit stuff, but the api should have modules (like buycraft-bungeecord, buycraft-bukkit)
How? The Jar comes packed with it all
Oh
Try with methods
The API that I'm referencing is under the common dir
So I figure it should work regardless of platform
If that's what you mean
Like, this is what it looks like:
import net.md_5.bungee.api.plugin.Plugin;
public final class StoreChecker extends Plugin {
@Override
public void onEnable() {
// Plugin startup logic
BuyCraftAPI api = BuyCraftAPI.create("*code*");
}```
Is there any way of setting a player's IP address / masking a player's IP
I've read every single document and thread on Spigot
You can obtain it and use replace i guess for what ever you want
Any ways, why?
What's the point of -Dwaterfall.acceptInvalidPackets=true
I don't understand why accepting invalid ping packets, it can open up problems with attacks I think.
I checked the patch and it says it's due this issue -> https://github.com/PaperMC/Waterfall/issues/23
But i dont think this still a problem
accepting invalid packets might lead to bugs when parsing them
I think there are better ways, like filtering the exception with a trace-less instead of creating a property, but the patch is already old and should be replaced.
what's the patch?
ah I you mentioned the property, found it
that patch just adds an option that a ping packet can be received at a time where it shouldn't be. not sure how that would change anything
That's why I say it's redundant in my opinion, it was only created because of an issue that opened which sends the entire stacktrace, why instead of making a property to accept invalid packets make one to avoid the entire log?
the option is there if people want to for whatever reason allow those packets
hi, i am writing my client, when i try to connect to the server, i get this error "bad packet, are mods in use!? No more bytes reading varint"
You messed up some package during the join process of the client
Im not into the protocol sry
np
wrong channel?
yep sorry 🙂
file = new File(ProxyServer.getInstance().getPluginsFolder() + "/config.yml");``` How could I make it have its own folder? Doing `"/SlashLobby/config.yml"` does not work, so I'm quite confused on this.
Thank you!
is there a way to fix this?>
Could not transfer metadata io.github.waterfallmc:waterfall-api:1.19-R0.1-SNAPSHOT/maven-metadata.xml from/to jitpack.io (https://jitpack.io): authentication failed for https://jitpack.io/io/github/waterfallmc/waterfall-api/1.19-R0.1-SNAPSHOT/maven-metadata.xml, status: 401 Unauthorized
Did you add the correct repository?
i added the repo described in github readme of waterfall
remove jitpack
I have removed it but it seems to work even with it now! I think maven has cached something
Remove it, load the proyect and then put jitpack again
What do you mean with "load the Project"?
Reload from disk or invalidate caches or a simple IDE restar?
Reload maven
is the proxy async scheduler also running async tasks a "tick" later or how does that work there?
and this is for waterfall
looks like it will actually run instantly
also TIL that there is no way to get bck to the thread that you were on originally on bungee
there should probably be a utility method for that on paper too instead of creating your own threads 👀
i can't get system print to work, im trying to debug on waterfall
it works on bungeecord though, what is the correct way to print debug to the console when using waterfall
i figured it out, was related to print line and buffer
You could use Log4j tho
Exploit4j scares me
what
The proxy uses log4j, no matter what you do, your output goes through l4j
Your general headache is going to be that the loggers are not setup to print debug level sstuff
you can dynamically adjust the levels programatically, but for most people, they just tend to print stuff manually
(System.out should work fine, but, that is intercepted by the logger stuff, and there is weird cases where you can trip l4j up with that to my understanding)
That was fixed any ways

Better on chat 😎
;_;
can I run waterfall plugins on standard BungeeCord?
as long as they don't using things of waterfall
but why running it on bungeecord? ig waterfall would be a better option
if a plugin is "made for waterfall" that usually means it uses something waterfall provides that bungee does not
its no different to how spigot plugins will run on paper, but paper plugins will not run on spigot
Only one event isn't on bungee, so most of bungee plugins run on waterfall!
yeah meant it with that

how do I define getDataFolder? where do I import it from?
it's from the Plugin class you've extended
i'm not in the Main.class, I'm trying to use it on my commands package
then you have to create an instance of your main class
singleton or constructor, anything you like
how can I sort TabList?
scoreboard entries are sorted by the team name
oh frick
wrong channel
aand how can I sort them, when roles aren't in alphabetical order?
We're trying to synchronize multiple servers regarding their inventory of chests for example.
I heard, that waterfall has a way to let servers communicate with each other.
Sadly I can hardly find documentations about waterfall or bungeecord.
Is waterfall the correct software to communicate between servers?
no, waterfall is a proxy that goes in front of your server so your players can switch without reconnecting
it has some communication abilities (via plugin messages) but those come with their normal limitation (that they requier a player to be connected to the source and target servers)
thanks
I think he's searching for a messager like Redis
Hi, I get this error every time i send a scoreboard objective packet to a player. Ideas? Thanks
// API Version: 1.19-R0.1
// Client Version: 1.19.2
String sbName = plugin.getScoreboardManager().generateSbName(staffer); //Generates a random name for the obj
String sbValue = ChatColor.translateAlternateColorCodes('&', Config.SCOREBOARD_STAFF_TITLE.getString());
ScoreboardObjective sbObj = new ScoreboardObjective(sbName, sbValue, ScoreboardObjective.HealthDisplay.INTEGER,(byte) 0);
player.unsafe().sendPacket(sbObj);
are you sure you are using the correct packet?
also pretty sure the display name of an object needs to be a json component
Hurt durr this isnt just string there. it wants a json-formatted chat component and not just a string
either shade/use kyori adventure or figure out how to convert that with bungeecord-text
I used gson to create a string similar to: { text: “The actual text”}, does it look good to you ? I can’t test it right now
json keys are strings
Hi guys, i need this dependency (not necessarily this specific version) for my plugin, it's available from bungee but I can't find it on waterfall.
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-proxy</artifactId>
<version>1.8-SNAPSHOT</version>
</dependency>
i was only able to find those:
just replace it with the waterfall values
of course you need to manually build waterfall/deploy it to a repo to find the internal classes
that's not in the official bungeecord repo either
found it
pretty sure threading in bungeecord is a mess so ¯_(ツ)_/¯ ? xD
What's the best way to update the score name in a scoreboard? I need to update a timer but I dont want to create every second a new scoreboard objective with a different name.
I want to change the "display name" of a score
a "Score" doesn't have a display name
i mean the ScoreboardScore#setItemName
a Score is an entry of a player/entity with a value for a specific Objective
what is your actual goal here?
also ScoreboardScore is not a class that exists in waterfall as far as I can tell?
also it looks like the item name is just the name of the entity/player that is displayed e.g. when showing it in the sidebar
so just remove the old score and add a new one with a new name, don't think you can actually modify that as the client will probably not accept it
one of the many reasons people tend to use team prefixes/suffixes instead of the actual score as they are more easily modifyable
*actual score entry name
net.md_5.bungee.protocol.packet.ScoreboardScore
net.md_5.bungee.protocol.packet.ScoreboardDisplay
net.md_5.bungee.protocol.packet.ScoreboardObjective
My bad, i'll try to explain myself better. I have scoreboard that looks like this:
ScoreBoardTitle
Name: Ender
Cooldown: %time%s
That time placeholder needs to be updated every second. To reach this goal what i did is basically send every second a new scoreboard objective packet with all the new scores. Probably this isn't the best method so my goal now is to only update the score containing the %time% placeholder. How can I do that?
oh, that's not api...
no idea how you do that with packets, sorry, never bothered to look into that as there's APIs for that ¯_(ツ)_/¯
I actually don't know, do you suggest to use the api instead of the packets ? the spigotmc wiki says "they aren't ready to use yet"
it's usually suggested to do this kind of stuff on the minecraft server itself
Does anyone now why this code not work?
package zytexpluginwaterfall.zytexpluginwaterfall.hub;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Command;
import zytexpluginwaterfall.zytexpluginwaterfall.ZytexPluginWaterfall;
public class hub extends Command {
public hub() {
super("Hub");
}
@Override
public void execute(CommandSender sender, String[] args) {
if ((sender instanceof ProxiedPlayer)) {
ProxiedPlayer p = (ProxiedPlayer)sender;
p.sendMessage(new ComponentBuilder("Ansluter till Hub!").color(ChatColor.RED).create());
p.connect(ProxyServer.getInstance().getServerInfo("hub"));
}
}
public static class Hub extends Command {
public Hub(ZytexPluginWaterfall zytexPluginWaterfall) {
super("Hub");
}
@Override
public void execute(CommandSender sender, String[] args) {
}
}
}
remove the 2nd class
Any of this? import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Command;
import zytexpluginwaterfall.zytexpluginwaterfall.ZytexPluginWaterfall;
Then i have these errors
You’re redefining your class in your class
you have two namespace conflicts with the names too
Also side-note: never use lower-case starting names for classes
package zytexpluginwaterfall.zytexpluginwaterfall.hub;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Command;
public class hub extends Command {
public hub() {
super("Hub");
}
@Override
public void execute(CommandSender sender, String[] args) {
if ((sender instanceof ProxiedPlayer)) {
ProxiedPlayer p = (ProxiedPlayer)sender;
p.sendMessage(new ComponentBuilder("Ansluter till Hub!").color(ChatColor.RED).create());
p.connect(ProxyServer.getInstance().getServerInfo("hub"));
}
}
@Override
public void execute(CommandSender sender, String[] args) {
}
}
}
Where is the thing wrong? Can't find it


