#waterfall-dev

1 messages Β· Page 7 of 1

sly crown
#

proxy on shared hosting lefbad

sick skiff
#

let me guess, there is no way to catch Error dispatching event ServerConnectEvent(player=user, target=BungeeServerInfo(name=AuthLobby, address=localhost/127.0.0.1:24581, restricted=false), cancelled=false, reason=JOIN_PROXY) to listener me.vik1395.BungeeAuth.ListenerClass@57abad67 java.lang.IllegalStateException: Cancelled ServerConnectEvent with no server or disconnect. at net.md_5.bungee.UserConnection.connect(UserConnection.java:311) ~[waterfall-312.jar:git:Waterfall-Bootstrap:1.15-SNAPSHOT:4936da5:312] ...

trail plume
#

no

molten jackal
#

So if ProxyServer#getServers() is deprecated, what is the correct means of dynamically registering new servers on bungeecord?

#

Dunno if ConfigurationAdapter#getServers() will do the same thing...

#

Looks like it might. Would ConfigurationAdapter#load() be needed to be called in this method?

deft trail
molten jackal
#

I mean the copied version of the method is a copy of the map... I won't be able to modify it and have it actually be used.

#

I'll use the ProxyConfig

#

Thanks broski

molten jackal
#

I believe I may have found an issue with bungeecord/waterfall (probably bungee).

When an event is called, it does not call event methods that are inherited from super classes.

For example, I have ServerListAppearance which is abstract and has a ProxyPingEvent listener. When I have LiveAppearance extend ServerListAppearance and then register a new LiveAppearance instance as a listener it does not call the inherited event listener.

trail plume
#

not a bug

#

That's basically intentional design

molten jackal
#

Odd. Because the exact same thing works in spigot perfectly fine.

trail plume
#

Bukkits event system goes to find the handler list on the event

#

Bungees system doesn't care about inheritence whatsoever

molten jackal
#

What is the benefit of not acknowledging inheritance?

trail plume
#

"it's easier" i guess

molten jackal
#

😐

trail plume
#

bukkits event system is superior, imho

molten jackal
#

Yeah

sly crown
#

still sux

molten jackal
#

Still sux but superior.

#

Wish there was a way to override the eventhandling system for bungee 😐

trail plume
#

Bukkits system is more expansible I guess, bungees system makes sense for a simple event system

molten jackal
#

Yeah I suppose its simple. However its frustrating, because I've found that my code everywhere except for bungee ends up being beautiful and effective. slight_discomfort

trail plume
#

I gotta deal with multi-plat for mcmmo down the line

#

Probs just gonna use kashikes event system

molten jackal
#

Dunno if this is ideal, but my solution was to just have an event method for the same event that just calls super.onClientPing(e) πŸ˜›

long crypt
#

You may also try using Delegate instead of inheritance.

sick skiff
sick skiff
#

any way to do so?

lean gobletBOT
#

"isn't working" is a pretty vague description of the problem

sick skiff
#

nevermind, i'm going around it by using the event system

#

i was trying to set the bungeecord config for an active listener, which is impossible.

molten jackal
#

Why does custom bungee channels need to have a semicolon? slight_discomfort

naive finch
#

Does Waterfall have a Maven repo?

molten jackal
#

Believe so

#

its probably on the paper repo

trail plume
#

Mojang requirement, channels are namespaced

random comet
#

dam didnt know i turned into a server

#

bungee bug?

molten jackal
#

Is there any way to send a TextComponent to a player through the plugin messaging system (spigot -> bungee -> player)?

trail plume
#

But, why?

#

Like, yea, you could, you'd just need a plugin on the proxy to deal with the message you send

molten jackal
#

Because I want to announce a json clickable message on the entire bungee server from the bukkit.

#

Would I just have to parse it as a raw json and send it through a custom message channel?

trail plume
#

Yes

#

Then your plugin on the proxy would need to actually do the broadcast part

molten jackal
#

Right

wary inlet
#

I have a feeling I've set the sources up wrong in IJ; the entire Waterfall-Proxy dir is marked excluded (the IDE feature) and certain completions just don't work (presumably because of absence of certain dependencies in the IDE's eyes)

#

How would one actually go about doing it? ./waterfall b then opening the root dir of it didn't seem right

bleak current
#

./waterfall p then you'll open the root dir

#

building isn't needed, just patching is good enough for IDE usage

#

opening the root dir works just fine, so-called super pom.xml takes care of pointing IDE to correct place

cerulean kettle
#

Just wanted to share that bungeecord crashing/not responding at bot attacks is because waterfall doesnt remove the connection from the pipeline when closing it so the pipeline overloads and this happens on premium or no premium servers.

#

Would be nice to get this fixed in a official update :)

lean gobletBOT
#

bungeecord or waterfall? xD

bleak current
#

doesnt remove the connection from the pipeline when closing it so the pipeline overloads

#

what

#

if you close the client then it's... closed and not handled anymore

cerulean kettle
#

@bleak current Yeah i mean, it closes with delay of 250ms normally.

#

you need to do .flush() before closing it

#

i dont know too much about connections, im sharing what it seems to be working

#

some methods already implemented .flush() before closing, some others didnt

#

and when i say bungeecord i mean waterfall, travertine, etc

trail plume
#
Benchmark                      Mode   Samples         Mean   Mean error    Units
p.v.MyBenchmark.testReturn    thrpt        20  3013791.442    55585.919   ops/ms
p.v.MyBenchmark.testThrow     thrpt        20  1988293.912    76826.576   ops/ms
#

Wow

spring bloom
#

I'd be very fucking surprised if the JIT didn't optimise out that throw call :>, at least its handling

trail plume
#

I honestly have no idea how JIT deals with exception stuff, but, dam

spring bloom
#

idk I wouldn't take that benchmark for anything

#

oh that's in units/ms?

#

too used to time/call :L

trail plume
#

Yea

spring bloom
#

one is a useful metric and the other isn't guess which :>

trail plume
#

ur a useless metric

spring bloom
#

I'm not a metric

trail plume
#

lol, I just added a test for a straight up throw

#

p.v.MyBenchmark.testSlowThrow thrpt 20 819.045 62.066 ops/ms
p.v.MyBenchmark.testThrow thrpt 20 1969040.690 76668.714 ops/ms

spring bloom
#

3k ops per ms is very fishy

#

3 million

#

that's like what 3 billion per second

#

kekw slow throw loses by like 1000x

trail plume
#

That's more for a baseline than anything

spring bloom
#

that's like your cpu's clock speed

trail plume
#

Like, I knew throw would be slower, I have no idea of the relevance of that, however

#

It does paint a wtf as to bungees handling of packets

spring bloom
#

it's really hard to bench what a return is to a throw because that return is probably being entirely nuked

trail plume
#

But, i mean, it could be worse

#

Fair point, that could easily be inlined

spring bloom
#

it's probably measuring the jmp call back to whatever is benching kekw

trail plume
#

My brains dead; but it was only really there to serve as some level of baseline, a return of a boolean is going to be thereabout

spring bloom
#

well I guess

trail plume
#

Well

spring bloom
#

in any case

trail plume
#

I just added a field to prevent JIT being JIT to some degree

#
Benchmark                         Mode   Samples         Mean   Mean error    Units
p.v.MyBenchmark.testReturn       thrpt        20  1497960.015    46930.268   ops/ms
p.v.MyBenchmark.testSlowThrow    thrpt        20      855.432       24.422   ops/ms
p.v.MyBenchmark.testThrow        thrpt        20  2003033.271    61452.801   ops/ms
#

at first, I thought it was unboxing as I derp'd and used a Boolean, then I went to go fix that and saw no change :L

spring bloom
#

update gist or riot

trail plume
#

der

#

either way, seems to validate that the cost of returning a boolean vs throwing a cached exception really ain't that much of a concern

spring bloom
#

slow throw though Pog

#

.wa 1.0/24.422*1000

lean gobletBOT
#

(DiscordBot) Result: 40.94668741298828924739988534927524363279010728032102202931... - https://is.gd/rcYqno

Wolfram|Alpha brings expert-level knowledge and capabilities to the broadest possible range of peopleβ€”spanning all professions and education levels.

spring bloom
#

40us per throw Pog

#

bet it's way worse with deeper stacks

#

wait wrong field

#

.wa 1.0/855.432*1000

lean gobletBOT
#

(DiscordBot) Result: 1.168999990648000074815999401472004788223961694208306446333... - https://is.gd/OFuhxL

Wolfram|Alpha brings expert-level knowledge and capabilities to the broadest possible range of peopleβ€”spanning all professions and education levels.

trail plume
#

Saying that though, making it actually create a new instance of the exception, even with the "fast" stuff, Statistics: (min, avg, max) = (48118.724, 55133.728, 57406.464), stdev = 3001.615

#

Saying that, it's practically irrelevant

#

But, kinda interesting

gleaming sedge
#

How does the plug-in messaging channel work for inter server communication? Please tell me it doesn't need a player because it uses it to relay the message

lean gobletBOT
#

it needs a player

#

any plugin message needs a player

#

it's suggested to use a proper pub sub system like RabbitMQ or redis (if you have that already running) for anything bayond basic player information sharing

gleaming sedge
#

Yes, I know that is bad, I am asking how it works

#

Is the message sent to the player, who then relays it to the server, or how is this done?

#

I use plugin messaging to communicate with my mod, but I haven't really used it for bungee much.

lean gobletBOT
#

the message is relayed by the bungee

#

server -> bungee -> server

#

it never reaches the client

gleaming sedge
#

Cool, thanks. I am relieved

#

not like I will use it lol

molten jackal
#

Which event should be used for disconnecting players on login due to a ban or something of the sorts? I need access to their UUID, so PreLoginEvent is ruled out. PostLoginEvent does not implement Cancellable, so I can't prevent them from logging in on this event. Unless, if I were to just call the kick method on the ProxiedPlayer who is logging in, don't know if that will cause flickering though.

#

By flickering I mean, when they join they see the game for a split second then are disconnected.

trail plume
#

use PostLogin

#

Should be able to just kick them

molten jackal
#

Okay. Trying that

trail plume
#

oh, wait

#

No

#

use the LoginEvent

molten jackal
#

Ok πŸ˜‚

#

Thanks

brazen walrus
#

I added the repository and the dependencies to the pom.xml but I get this error:

#

am I doing something wrong or is there a problem with the repository?

trail plume
#

${revision}

#

either you did a derp or they did a derp

brazen walrus
#

yeah, it looks weird

#

but I have no idea where it comes from

trail plume
#

probs something wrong with their deployment

#

based upon that fact that it's tryna refer to a token and not an actual set value

brazen walrus
#

It actually works if I retrieve 1.5.0 instead of 1.5.2

#

so yeah, they probably did something wrong in the latest release

craggy furnace
#

Why I can't register my own bungee channel?

#
 getProxy().registerChannel( "my:zcbans" );```
#

Caused by: org.bukkit.plugin.messaging.ChannelNotRegisteredException: Attempted to send a plugin message through the unregistered channel `my:zcbans'.

#
getServer().getMessenger().registerOutgoingPluginChannel( this, "my:zcbans" );```
#
    public static void sendData(String data) {
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeUTF("zcbans");
        out.writeUTF(data);
    
        ByteArrayOutputStream msgbytes = new ByteArrayOutputStream();
        DataOutputStream msgout = new DataOutputStream(msgbytes);
        try {
            msgout.writeUTF(data);
        } catch (IOException exception){
            exception.printStackTrace();
        }
    
        out.write(msgbytes.toByteArray());
        Bukkit.getOnlinePlayers().iterator().next().sendPluginMessage(Main.getInstance(), "my:zcbans", out.toByteArray());
    }```
molten jackal
#

Are you registering the plugin message in the same plugin as the calling to it?

craggy furnace
#

getProxy().registerChannel( "my:zcbans" ); in the proxy Plugin
Everything below in Spigot plugin

trail plume
#

You're registering it on the proxy

#

You're not registering it on the server itself however, which is literally the one that is bitching about it not being registered

molten jackal
#

He said he is

#

Look at the third code block

trail plume
#

They didn't register the outgoing channel on the player

#

Oh, that's not needed, I forgot how janky this entire API is

#

But, I'm inclined to believe the server

#

if it's saying that they didn't register it, it clearly wasn't added to the channel registrations for some reason

bleak current
#

69
69

#

nice

spring bloom
trail plume
lean gobletBOT
#

(DiscordBot) Steve1989 MREinfo Nice compilation - length 1m 8s - 3,615 likes, 15 dislikes (99.6%) - 104,738 views - CinmarRS on 2016.11.29

spring bloom
#

but why

weary grove
#

Nice

#

That's Steve1989's classic. "Let's get this all out onto a tray... Nice". Every time.

warped loom
#

I have a question

#

172.18.0.1

#

how is this private ip called?

#

just private ip?

lean gobletBOT
#

In IP networking, a private network is a network that uses private IP address space. Both, the IPv4 and the IPv6 specifications define private IP address ranges. These addresses are commonly used for local area networks (LANs) in residential, office, and enterprise environmen...

#

not using a single class A network is for plebs

#

runs

bleak current
#

so i have a question what features does waterfall have that bungeecord does not?

bleak current
bleak current
#

does waterfall/bungee plugin require a commands and permissions: section for the plugin.yml or is that just a paper/spigot thing?

#

oop nvm, it doesnt. I just saw the PluginDescription.java

autumn trail
#

Sorry if this has been answered before, I can't seem to find the maven repository and dependency tags for the latest waterfall anywhere, could someone point me in the right direction? Or does it not exist and I have to use the jar file?

trail plume
#

same repo as paper

autumn trail
#

Gotcha, much appreciated!

warped loom
trail plume
#

yes

warped loom
#

Paint 3D approved

lean gobletBOT
#

"you still don't know theirs (unless they are dumb)"

#

runs

trail plume
#

am netscan ur nan

warped loom
#

I mean unless you have all server on the same dedi you should not be able to get backends server IPv4

#

I've even tried myself with wireshark on Linux and i only did see data from Proxy

random comet
#

just make sure you firewall off the backends

#

people DO portscan hosts for unprotected servers

stone fiber
#

people scan literally all the things

#

secure your everything

#

if you arent using an SSH key, start

#

that's one of the bigger ones

#

then firewall firewall firewall

bleak current
#

put the firewall on the backend or the waterfall thing

random comet
#

uhhh

#

what u think

fluid stump
#

Is there an event that fires when a player leaves a server, and the proxy is preparing to connect it to another server?

lean gobletBOT
#

there are events for that but they happen in a different order than you think

trail plume
#

there is a connect attempt event or something like that

lean gobletBOT
#

proxy connects player to other server -> connection to old server is closed

trail plume
#

and ^^

outer cosmos
trail plume
#

He won't accept that, lol

outer cosmos
#

Ok, because of Java version or what?

trail plume
#

Because he doesn't accept PRs for protocol updates, etc

outer cosmos
#

Oh, weird

spring bloom
#

kek sneaking in 1.8

outer cosmos
#

Of cause j 1.8. next time sneaking in Kotlin 1.3.60 or 1.4 🀣

trail plume
#

Plz don't even joke about about

#

smh

lean gobletBOT
#

so because your setup is broken you changed the java version? thonk

trail plume
#

I mean, not really broken

#

Just, using a modern version of java

sly crown
#

can you not target down?

trail plume
#

I know that they pulled support for compiling against 1.5, which is fun because maven still targets that

#

ysl said that it drops a warning

#

am assuming that it still compiles just fine

sly crown
#

Didn't build without it.

#

sounds like 1.6 didn't work at all for him

#

which i kinda doubt is normal

#

unless they pulled support for targeting 1.6

trail plume
#

maaaybe, hm

stone fiber
#

they did pull support for targeting 1.6 in java... 11? 12?

sly crown
#

oh

#

so he's just not even using 8

stone fiber
#

12

#

Java 12 removed support for targeting 1.6

outer cosmos
#

Maven compiler plugin dropped support in 3.3.9

stone fiber
#

maven compiler dropped support because java dropped support

outer cosmos
#

And md didn't. Just why?

stone fiber
#

md believes that newer versions of java just add "fluff"

#

and that 1.6 is the true java

#

or some such nonsense

shell lagoon
#

I prefer Java 1.4 or lower, generics are garbage anyway /s

outer cosmos
#

πŸ˜‚

stone fiber
#

anyway, here's the deprecation policy for supporting old java targets. http://openjdk.java.net/jeps/182

To sum it up:

In JDK 9 and going forward, javac will use a "one + three back" policy of supported source and target options.

However, it appears they are just "reserving the right" to use the "one + three back" policy, but are really allowing "one + five back" for JDK 12.

outer cosmos
#

I think the one + 5 has changed because of the LTS cycle.

stone fiber
#

I expect theyll drop 7 shortly as well

#

8 is going to hold on though

#

their "policy" is 1 + 3 but Java 8 being LTS throws a wrench in that

trail plume
#

Lol, I just had a peek

stone fiber
#

then again, maybe theyll just tell you to go use java 8 to target java 8

trail plume
#

Only reason we got 1.8 for -API was he seemingly wanted to use lambdas for some loottablestuff

stone fiber
#

I remember when MC itself had moved to 8 but he still refused to bump the API

#

at least now he finally did that

#

Im sure if you sent him a PR that wasnt pure enough 1.6 he'd reject it though

shell lagoon
#

I like repeating my generics

trail plume
#

I mean, it just looks like typical "this is the rules, unless it's me"

outer cosmos
#

Stefvanschie Java generics are kinda bad. No runtime generics.

stone fiber
#

compile time generics is still better than no generics

bleak current
#

With chat event is there a way to get the whole message being sent including displayname on that particular server?

bleak current
#

display name?

#

you mean a name held by a plugin in your backend server?

#

such as /nick etc?

high lily
#

No he means like the name next to the message that was on the server, like the suffix and prefix I think

bleak current
#

What @high lily said

#

that heavily depends on a plugin where you get that info from

#

for example if you're using luckperms then you can fetch the metadata yourself on chat event

bleak current
#

So i am trying to complile my Waterfall Project and all of the sudden i get this Error Message:

Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find net.md-5:brigadier:1.0.16-SNAPSHOT.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/net/md-5/brigadier/1.0.16-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/net/md-5/brigadier/1.0.16-SNAPSHOT/brigadier-1.0.16-SNAPSHOT.pom
       - https://repo.maven.apache.org/maven2/net/md-5/brigadier/1.0.16-SNAPSHOT/brigadier-1.0.16-SNAPSHOT.jar
       - https://papermc.io/repo/repository/maven-public/net/md-5/brigadier/1.0.16-SNAPSHOT/maven-metadata.xml
       - https://papermc.io/repo/repository/maven-public/net/md-5/brigadier/1.0.16-SNAPSHOT/brigadier-1.0.16-SNAPSHOT.pom
       - https://papermc.io/repo/repository/maven-public/net/md-5/brigadier/1.0.16-SNAPSHOT/brigadier-1.0.16-SNAPSHOT.jar
     Required by:
         project : > io.github.waterfallmc:waterfall-api:1.15-SNAPSHOT:20200124.224937-15 > io.github.waterfallmc:waterfall-protocol:1.15-SNAPSHOT:20200124.224930-15

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
#

My Build.gradle:

plugins {
    id 'java'
    id 'org.jetbrains.kotlin.jvm' version '1.3.61'
    id 'com.github.johnrengelman.shadow' version '5.2.0'
}

group 'eu.sirrob'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
    maven {
        name = 'destroystokyo-repo'
        url = 'https://papermc.io/repo/repository/maven-public/'
    }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
    implementation 'org.javacord:javacord:3.0.5'
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compileOnly 'io.github.waterfallmc:waterfall-api:1.15-SNAPSHOT'
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
sly crown
#

add md5's repo?

civic valve
#

yeah https://oss.sonatype.org/content/repositories/snapshots/

#

that usually fixes it

#

or it could be other gradle fuckery

bleak current
#

or just my Server Fucking with me:

I just got a Unexpected Network Error

civic valve
#

try resyncing

bleak current
#

Just restarted the whole thing.


19:09:58: Executing task 'shadowJar'...

> Task :compileKotlin UP-TO-DATE
> Task :compileJava NO-SOURCE
> Task :processResources
> Task :classes
> Task :shadowJar

BUILD SUCCESSFUL in 2s
3 actionable tasks: 2 executed, 1 up-to-date
19:10:00: Task execution finished 'shadowJar'.

tyvm. πŸ™‚

stone fiber
#

I could chuck that in our repo too so people don’t need to do that

civic valve
#

that'd be to simple

stark bone
#

I am getting thise when connecting to a forge server through water fall

Caused by: java.lang.IllegalArgumentException: No provider for argument minecraft:
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) ~[server.jar:git:Waterfall-Bootstrap:1.15-SNAPSHOT:4339bb7:317]
        at net.md_5.bungee.protocol.packet.Commands$ArgumentRegistry.read(Commands.java:524) ~[server.jar:git:Waterfall-Bootstrap:1.15-SNAPSHOT:4339bb7:317]
        at net.md_5.bungee.protocol.packet.Commands$ArgumentRegistry.access$000(Commands.java:306) ~[server.jar:git:Waterfall-Bootstrap:1.15-SNAPSHOT:4339bb7:317]
        at net.md_5.bungee.protocol.packet.Commands.read(Commands.java:83) ~[server.jar:git:Waterfall-Bootstrap:1.15-SNAPSHOT:4339bb7:317]
        at net.md_5.bungee.protocol.DefinedPacket.read(DefinedPacket.java:238) ~[server.jar:git:Waterfall-Bootstrap:1.15-SNAPSHOT:4339bb7:317]
        at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:52) ~[server.jar:git:Waterfall-Bootstrap:1.15-SNAPSHOT:4339bb7:317]
        at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:12) ~[server.jar:git:Waterfall-Bootstrap:1.15-SNAPSHOT:4339bb7:317]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) ~[server.jar:git:Waterfall-Bootstrap:1.15-SNAPSHOT:4339bb7:317]
        ... 30 more
civic valve
#

#waterfall-help but it looks like an issue with Bungeecord not waterfall itself

stark bone
#

This is a development issue. Due to the fact I am using a modified Forge server with an IP forwarding PR

#

I wan't to know if this is within bungee or an issue on my side

#

As I expect forge_support to help but apparantelly not

civic valve
#

does this happen in regular bungeecord

#

non waterfall

bleak current
#

very likely happens in bungeecord as well

#

so basically something from the server sent invalid commands info

stark bone
#

Well exactly

#

But its a forge server. So why is waterfall not supporting it when "forge_support" is enabled?

bleak current
#

being a forge server does not really excuse server sending invalid commands info

stark bone
#

yeh...

#

Basically, im messing with forge source to let the server support ip forwarding

#

but im failing on this point. I want to show if its waterfall playing up

#

or forge sending random shit

bleak current
#

forge_support covers only passing through and doing workarounds for its plugin messages (FML messaging channel etc.)

stark bone
#

hm

bleak current
#

so that it'd simply work

#

it does not enable "allow broken shit to be passed through and ignore broken stuff even though it's necessary for me to work" mode

stark bone
#

Alright

#

I guess it's time to figure out why the forge server is sending broken shit

#

just trying to work my head around whats going on

bleak current
#

simply figure out what's sending invalid brigadier commands info; your clue is a mod what... registers commands in odd way(s)

stark bone
#

No mods

#

It's a PR of forge, so forge itself is sending something

bleak current
#

show me that pr

stark bone
#

brace yourself

bleak current
#

shouldn't affect anything related to the commands

#

unless forge broke something somewhere

stark bone
#

I need to push some changes

#

I basically want to get IP forwarding a thing in forge

#

and I am going to PR that

#

but then attemtping to join everything broke

#

and it looked like empty brigadier commands are being sent

bleak current
#

though why do you want to get this inside forge itself?

stark bone
#

to enable ip-fowarding?

bleak current
#

why wouldn't a (core)mod be sufficient for that?

stark bone
#

eh

#

No one likes CoreMods

bleak current
#

do you have any facts to back that statement kekw

#

anyway, if you aren't touching anything related to commands then it's not your problem

#

it might be vanilla's or forge's

stark bone
#

Thank you

bleak current
#

haven't needed to pull up vanilla server yet (using fabric for example + a mod for bungee/velocity forwarding support), can only tell using that tbh

stark bone
#

I guess I will investigate. As theres no decent forge proxy atm

bleak current
#

or not

#

alright, pure vanilla with bungee forwarding seems to work ok

stark bone
#

not with ip-forwarding tho?

bleak current
#

bungee forwarding, in other words "ip forwarding"

#

which does literally what you want to do

stark bone
#

Oh yes

#

I saw this

#

Luckily Fabric doesn't send random shit to the player causing waterfall to freak out

#

I want to figure out why forge is sending random stuff first...

bleak current
#

now figure out what makes forge misbehave

stark bone
#

Yes I'm searching

#

unfortuantely a very large codebase

sly crown
#

forge does a bunch of handshaking to sync mods and registries and such

#

fabric by default does none of that

#

there is a fabric-networking api that lets mods do some of that, unsure how/status/etc tho

bleak current
#
~/projects/MinecraftForge/patches/minecraft/net/minecraft 1.15.x
❯ grep -r "minecraft:"
world/biome/Biomes.java.patch:+   @net.minecraftforge.registries.ObjectHolder("minecraft:ocean")
command/impl/LocateCommand.java.patch:+              .executes(ctx -> func_198534_a(ctx.getSource(), ctx.getArgument("structure_type", net.minecraft.util.ResourceLocation.class).toString().replace("minecraft:", ""))
client/renderer/ItemRenderer.java.patch:             p_229111_8_ = this.field_175059_m.func_178083_a().func_174953_a(new ModelResourceLocation("minecraft:trident#inventory"));
client/renderer/model/ModelBakery.java.patch:       this.func_217843_a(new ModelResourceLocation("minecraft:trident_in_hand#inventory"));
#

maybe that'll help you

stark bone
#

Well

#

This is currently my prediciment

bleak current
#

i mean it's definitely forge's fault at this point

#
  1. does not happen with spigot
  2. ... paper
  3. ... vanilla + fabric + fabricproxy
#

what's left?

stark bone
#

Well, lex has spoken apparantelly

#

However, was a bit hurtful to have some messy test code im working on insulted

spring bloom
#

lex will tell you what he thinks

bleak current
#

and there's nothing wrong with that

#

why wouldn't a (core)mod be sufficient for that?

see ^

trail plume
#

Bungee doesn't support modern forge at all

#

I do wanna look into adding support for it, just gotta find the time/dedication for it, coming off my meds means that I'm slowly getting my brain back, just, don't really have the setup to toy with stuff, nor do I really have an environment where I can actually test stuff, so, some level of bleh

stark bone
#

This entire forge thing is way out of my scope

#

However, I wish you luck with everything electroniccat. I hope to see some forge support in the near future

craggy furnace
#

If I have chatEvent blocked, how can I make so that spigot would still detect asyncChatEvent?

#

Tag me when anwsering

random comet
#

what are you trying to accomplish

#

.xy

lean gobletBOT
random comet
#

πŸ˜„

craggy furnace
#

Mute plugin blocks players from chatting in bungee level, I need to detect when player writes something in a server while doing an action

#

My problem is that blocking chat in bungee level will not trigger AsyncChatEvent in server

#

So, If I have chatEvent blocked, how can I make so that spigot would still detect asyncChatEvent?

random comet
#

if its blocked on waterfall why would it matter

craggy furnace
#

Because a plugin needs input from chat to do a specific task

#

It shouldn't care if the player is muted

sly crown
#

if the chat is blocked before it gets the to server, how is the server supposed to send an event

#

lmao

#

make your own bungee plugin to detect it proxyside

craggy furnace
#

It is my bungee plugin

#

So no way?

#

Or I just didn't understood the message

random comet
#

you would need to use your bungee plugin to send a fake chat message if thats the way you want to do it

#

which seems very off to need to do to me

craggy furnace
#

Yea, wouldn't be able to check if player is doing that action

#

It's better to just check for if the player is running some kind of command and cancel the action

#

And allow it only when the player is not muted

trail plume
#

That's not waterfall

#

Yes, but that message is not from waterfall

#

Probably a plugin or something stupid, idk

#

But, you literally will not find a mention of that message on the proxy itself

#

no

#

More than likely you have some plugin that tried to connect to another server

#

So, don't do that?

short saddle
#

How can I load a world?

lean gobletBOT
#

waterfall can't load worlds, you need to do that on a minecraft server xD

short saddle
#

ah shit wrong channel xD

#

sorry

molten jackal
#

I have found that PostLoginEvent does not have a server for the ProxiedPlayer yet. It also looks like there is no event for when a player joins the proxy fully and is fully connected to the server. What should I do? I'm looking to send a plugin message to the server they have connected to, but only when they join the entire proxy. So when swapping servers, this should not be called.

ancient quail
#

I'm having trouble sending a message to a player from a bungee plugin. I initially tried TextComponent.fromLegacyText, but nothing was being sent to the player. I afterwards tried to use the chatcomponent API, but everything appeared warped. I tried simply using the normal TextComponent API and kept using .addExtra, but that wasn't working either. So I made my own method for legacy text to a single basecomponent... nothing is being sent to the player. I had the BaseComponent print out a json message, and the "toLegacyText" version. Both looked correct, and using /tellraw in game with the json worked perfectly... So finally I tried something like from.unsafe().sendPacket(new Chat(json)), which also sent nothing to the player.
The text I am trying to send is simply a light purple and bold "Teleport."
I must be missing something blindly obvious.

bleak current
#

inb4 client chat options

ancient quail
#

It works with the chatcomponentAPI, it just doesn't come out right (As in all white, bold doesn't set, etc), so it's not client

wary inlet
#

Why does Waterfall load & enable plugins while their dependencies have not been enabled? I'm depending Holmium-InventorySync on Holmium which does a tonne of required work before invsync can load. invsync has depend: [Holmium] in its bungee.yml, so should see it?

#

oh it's because the platforms differ on depend vs depends, of course...

lean gobletBOT
#

@S​we​dz​ there is a ServerConnectedEvent and a ServerSwitchEvent that should do what you want

proper rampart
#

Is there a way for me to check if player is pinging the server with an unsupported protocol instead of just checking the int?

#

For example atm I just use ProxyPingEvent#getConnection().getVersion() < 47 (47 is 1.8) to compare.

civic valve
#

what do you want to do?

proper rampart
#

I want to "tell" them to use x version instead of the unsupported one.

civic valve
#

do what you're doing now

#

and if it's unsupported

#

tell them

proper rampart
#

that doesn't really help me

#

please read the question i asked again

civic valve
#

why don't you want to check the int

proper rampart
#

i'm asking if there's an alternative

civic valve
#

no

proper rampart
#

thank you

civic valve
#

all the client sends is the protocol version

proper rampart
#

i was thinking more in sort of a check between the player and the bungee version itself

#

so if my bungee supports 1.8 - 1.15 then any protocols except those will get my message

#

i was just wondering if it's possible for me to make such a check

civic valve
#

there's no built in method no

#

you know the bungee supported protocol versions tho

proper rampart
#

yeah i was just looking for sort of a shortcut

#

thank you

civic valve
#

Protocol numbers are also kept in net.md_5.bungee.protocol.ProtocolConstants

#

if you don't want random ints lying around

proper rampart
#

that's exactly what i'm looking for, thank you

stark bone
#

ProxiedPlayer#getAddress() is now deprecated. I'm assuming ProxiedPlayer#getSocketAddress() is what we need to use. Am i missing something or is there an eaiser way of getting just the IP without port?

#

as socket address would be (example) /172.13.256.12:60553

lean gobletBOT
#

just call getAddress on it

#

(after you checked if it's an netSocketAddress of course)

stark bone
#

Oh

#

WAIT

lean gobletBOT
#

*InetSocketAddress xD

stark bone
#

ahhhh

#

I got you

#

Thank you

#
InetSocketAddress addr = (InetSocketAddress) player.getSocketAddress();
addr.getAddress();
#

This is correct right?

#

After checks and that

lean gobletBOT
#

yeah

stark bone
#

Cheers.

proper rampart
#

hi, so I want to change the "Version" name from services like mcsrvstat.us (https://mcsrvstat.us/server/mc.divinerealms.us)
I want to just say "Join with 1.8-1.15" instead of "whatever (Waterfall)"
What I've tried is this: java @EventHandler public void onPing(ProxyPingEvent proxyPingEvent) { if (proxyPingEvent.getConnection().getVersion() > Collections.max(ProtocolConstants.SUPPORTED_VERSION_IDS) || Collections.min(ProtocolConstants.SUPPORTED_VERSION_IDS) > proxyPingEvent.getConnection().getVersion()) proxyPingEvent.getResponse().setVersion(new ServerPing.Protocol(messagesModule.color("&eJoin with 1.8 ➜ 1.15.X"), proxyPingEvent.getConnection().getVersion())); }

#

is there a way to do this with a plugin or will I have to edit the source of waterfall itself?

#

but if i do that then actual players that ping the server with those versions will not be able to see the player count

#

for protocol 4 i will just add another check, but for protocol 573 i want them to be able to see the player count (my server is 1.8-1.15 even thought i use travertine, i disabled 1.7 with viaversion)

#

actually i guess no one will use 1.15

#

they will more likely use 1.15.2 or 1.15.1

#

so i guess 573 can go too

#

yep I've solved it now

lean gobletBOT
#

uhm waterfall has a config option to set the version string

#

oh wait, you wanted to have conditional version strings based on whether or not the user uses a supported one

#

interesting idea

proper rampart
#

yeah

#

thanksies, i got it to work

molten jackal
#

Why does bungee throw a LinkageError when I access my JSONObject in a scheduled task for bungee?

#

The linkage error says:

Task BungeeTask(sched=net.md_5.bungee.scheduler.BungeeScheduler@4096aa05, id=0, owner=org.mccubed.bungee.BungeeMain@148c7c4b, task=org.mccubed.bungee.announcements.AnnouncementRunnable@9d3c67, delay=60000, period=60000, running=true) encountered an exception
java.lang.LinkageError: loader constraint violation: loader (instance of net/md_5/bungee/api/plugin/PluginClassloader) previously initiated loading for a different type with name "org/json/JSONObject"
trail plume
#

that means that more than one classloader is tryna load a class

sly crown
#

are you shading json

bleak current
#

and that's why relocation is good

arctic jacinth
#

How can i compile bungeecord (or waterfall)? i've done the changes i need but don't want to import it as a full project in IDEA

trail plume
#

use maven

arctic jacinth
#

IK, is there a command that i can use to build it? i haven't used maven that much
i did import the project in IDEA but its full of import errors

stone fiber
#

mvn package

trail plume
#

you need the lombok plugin for firing it open in your IDE

stone fiber
#

🀒

trail plume
#

java 8 evuhl!

#

Lombok is luv!

#

runs

stone fiber
#

.lombok

lean gobletBOT
#

[03:01:27] <gabizou> fuck you and the lombok horse you rode in on

arctic jacinth
#

This might be a stupid question but where can i get the jars i just built with maven?

trail plume
#

in the bootstrap/target folder

#

That's the only one you really care about outside of the modules

arctic jacinth
trail plume
#

then it didn't finish building or something

#

Wait, are you working with waterfall or bungee?

arctic jacinth
#

bungee

trail plume
#

ah, kk

#

God knows, check the build log

#

assuming you ran package, the jar should be in there

arctic jacinth
#

Isn't waterfall just a lot of patches for bungee?

sly crown
#

asking for bungee help in waterfall

trail plume
#

yes, but our tooling setup is different

#

If you was looking in a folder like that with waterfall, I could tell you that you're in the wrong place

arctic jacinth
#

nvm i forgot to do nvm install

arctic jacinth
outer cosmos
#

@arctic jacinth What changes did you make? The thing I did was adding the ProtocolConstants. Cannot join the 20w06a server. Did you modified something else?

trail plume
#

gotta fix protocol constants and the entity map

#

also, gotta watch out for any entity metadata changes fuckin' up the map

#

(Which is often why these days I just forcefully disable metadata remapping on "newer than supported" sips tea)

arctic jacinth
#

Just duplicated the 1.15 entity map and added a new command thingy for the available_biomes argument

#

The protocol version for 1.16 is 701

#

I would like to add waterfall patches to that but donno how

outer cosmos
#

Ah ok thanks. I've updated the Protocol version already and used the 1.15 entity map for 1.16. The command thingy is the left key in my modification.

You're running a fabric server? That's probably the second key component why my vanilla server is not accessible using bungee.

trail plume
#

ah, nice, no metadata changes

#

huggles mojang

#

Make sure that you have ip_forwarding disabled

#

vanilla doesn't like that

arctic jacinth
#

Yes
You need a special mod in fabric
Trampoline

trail plume
#

part of why I don't care to add support for snapshots

#

it's literally useless to the majority of people, it's only really on release where it's a nicety

arctic jacinth
#

Is the entity remapping thing really necessary? What can we do if they change something? Just disable it?

trail plume
#

in bungee, yes; In waterfall/travertine, no, that can be disabled

#

saying that, disabling introduces some quirks, which ain't always ideal

outer cosmos
#

CODY_AI That registerDummy( "minecraft:available_biomes" ); ?

Edit: Yes that was the missing thing. Thanks for support.

arctic jacinth
#

Yes, np

Is there a easy way to apply waterfall patches to bungee?

ornate bloom
#

Follow the readme on GitHub

bleak current
#

With that pluigin channel thingy, can it be setup to send as
Bungee sending msg to spigot server (and vice versa)? Im trying to have a system that allows me to run a command on spigot server via bungee command.

lean gobletBOT
#

you could do that, yes, but plugin messages might not be the best tool depending on what you want to do

#

also you might want to look into adding authentication to that if you want to make it execute commands as the console

wind tapir
#

What has to change in BungeeCord/Waterfall each time a new Minecraft version is released to support the new version?

bleak current
#

protocol version must be added into supported protocols list and if needed, update packet read/write methods

trail plume
#

Somebody directed md to a waterfall patch, and now, he's basically got that connection init event, whih I can agree that the naming of is bleh, but "Client" specifically in there was a bit of a iffy one given that people fail to understand client/server relations... But, he also pulled in some delombok stuff from like 5 years ago lol

chilly coral
#

Is this a temporary branch for properly merging upstream changes that collides with Waterfall's changes ?

trail plume
#

that's a "my brain hurts and I don't wanna smoke test it"

chilly coral
#

πŸ˜‚ u're right, we can contribute in don't hurting your brain too much

warped loom
#

Hello!

#

Is it possible to get the chat of backends server from a BungeeCord plugin?

trail plume
#

You can handle chat messages players send

#

for anything else, no, not without a packet listener or actually sending stuff to the proxy from a server plugin

warped loom
#

Mhhh yeah I don't think I could make a BungeeCord version of my Paper plugin without complicating it too much for me sadly.

ornate jasper
#

epic PR merged

bleak current
#

epic gamer moment

violet saffron
#

What is the underlying event that is fired no matter what when a player leaves the server / proxy? Is it PlayerDisconnectEvent?

#

Or would I need to listen to ServerKickEvent and ServerDisconnect?

remote condor
#

I always listen to kick

fervent geyser
#

@violet saffron It is PlayerDisconnectEvent

violet saffron
#

That's what I figured it was but the issue is is that for some reason it's not handling correctly when it's being fired. Probably something on my end.

wind tapir
#

https://github.com/hypercubemc-github/HyperFall

  Patches applied cleanly to Waterfall-Proxy
/mnt/c/users/evere/Servers/HyperFall_Source/HyperFall
Cloning into 'HyperFall-Proxy'...
done.
Checking out files: 100% (335/335), done.
Resetting HyperFall-Proxy to Waterfall-Proxy...
Your branch is up to date with 'origin/master'.
HEAD is now at 16c3864f ConnectionInitEvent
  Applying patches to HyperFall-Proxy...
Applying: Pom changes for rebranding
error: sha1 information is lacking or useless (api/pom.xml).
error: could not build fake ancestor
Patch failed at 0001 Pom changes for rebranding
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
  Something did not apply cleanly to HyperFall-Proxy.
  Please review above details and finish the apply then
  save the changes with rebuildPatches.sh```
lean gobletBOT
#

why are you editing the waterfall repo directly but don't even fork it normally? would be a lot easier if you just wrote your own patcheson top of it, lol

sly crown
#

we went over that

lean gobletBOT
#

Β―_(ツ)_/Β―

wind tapir
#

I changed it to a patch-based fork and got the error.

#

Fixed it though, turned out I just needed to remove and redo the patches.

molten jackal
#

When running:

System.out.println("[DEBUG] rawJson: " + rawJson);
BaseComponent[] components = ComponentSerializer.parse(rawJson);

I get the following output:
https://hasteb.in/hafudule.txt

This does not happen for other json deserialization (from what I have seen).

#

If it wasn't clear, JSONMessagePMReceiver.java:21 maps to the second line in the code snippet I posted.

trail plume
#

component.setText( object.get( "text" ).getAsString() );

#

you're missing text somewhere

molten jackal
#

I used ComponentBuilder to build it on the spigot server

#

So it should be right? Right?

random comet
#

is travertine gonna get a upstream

trail plume
#

you're probably calling it too early

lean gobletBOT
#

ServerSwitchEvent iirc

#

or ServerConnectedEvent if you want it before the player actually has control over the connection

low dagger
#

Wild question, but is there a way to switch someone between 2 different waterfall proxies?

lean gobletBOT
#

no

#

or well, not unless you put another proxy in front

low dagger
#

Oh?

#

wdym how would that work?

lean gobletBOT
#

the same as putting a proxy in front of your minecraft servers, just that you have one in front of your other proxies

#

you'd still have a single point of failure though

#

and I don't know of any public solution for that

#

I guess the use cases for such a thing are pretty limited

bleak current
#

just add another layer of proxies

#

smh my head

scarlet sandal
#

and then another layer of proxies on top of that!

bleak current
#

What is the getKeys(true) alternative for Bungeecord/Waterfall ?

#

none

#

😒

#

I tryied this

#

but this code don't work :/

#

besides that it looks pretty horrible

#

I want to loop all properties in the yaml and check if key end with "." + Config.lang ( like "foo.bar.en" )

#

i'm pretty sure you can achieve the same thing without getting all the keys recursively

#

what do you want to do?

#

I want to loop the yaml language file in my jar and create a new file like fr.yml and put all key end with .fr in the main language file

#

( my english is verry funny )

outer cosmos
bleak current
#

that

#

this is a example in bukkit

trail plume
#

in the main language file

#

But, like, why?

bleak current
#

just split the language file up into separate files

trail plume
#

That would just get gross to manage, resource bundles are also petty much a defacto standard for this type of thing

bleak current
#

no no

#

the main language file contain all languages

#

but why

#

that's gross

#

it's most easy for me

#

alright, but then resource bundle aka .properties file is a lot better choice for you

trail plume
#

if your intent is to provide that to the public and want people to contribute changes, etc; that's going to go to hell fast

bleak current
#

this file is in jar plugin

outer cosmos
#

When someone will not follow business standards...

bleak current
#

yes but are you going to publish that plugin somewhere?

#

e.g spigotmc or so?

#

yes

#

already

#

fucking hell

spring bloom
#

monkaW that config

trail plume
#

So, I'd suggest using a sane setup which is literally already supported by the java community as a whole

bleak current
#

( oops unicode :/ I changed IDE )

lean gobletBOT
#

why would you take a good system and make it worse?!?

bleak current
#

if you split up language files per locale then it's a lot more readable

trail plume
#

I mean, it's a lot more readable and extendable

bleak current
#

it saves me from switching files every time

trail plume
#

Heck, if you use message bundles, you can use programs for managing that type of stuff

#

i ended up setting up weblate for a plugin, going to wait until release of the new version to get it up and running properly, but, it's gonna be such a blessing

outer cosmos
cyan garnet
#

use separate files pepeGun

fervent geyser
#

Use crowdin, I use it for every project and it's the best @bleak current

#

Hey @trail plume, sorry for interrupting, just wanted to ask before I dive into the code itself, is there any way to connect proxy to proxy, or do I need to write my own "super proxy" for this? Thank you

civic valve
fervent geyser
#

Yeah I know, it's crazy omegalul

trail plume
#
  1. don't ping
fervent geyser
#

Sorry, thanks

civic valve
#

Mineplex does that with their "BungeeRotator"

#

and their source code leaked so i mean

#

it's not that hard to find the code πŸ‘€

sly crown
#

i mean, it's also just about a one line code change to allow a proxy to connect to itself

#

it's just that it adds a lot of complexity, configuration requirements, plugin support, etc to work "fully"

trail plume
#

i mean, i fail to see the reason why you'd wanna do that

#

Only reasons I've ever seen people give would be better solved elsewhere

zenith socket
#

any plans to add a permission node for the /bungee command? would be appreciated.

grizzled thistle
#

Any recommended java arguments for waterfall?

weary grove
#

Normal heap sizing flags should be mostly sufficient

#

Aikar did post a set of flags for BungeeCord somewhere a few years ago, not sure where they are now

trail plume
#

current recommendation is to follow the standard gc flags for paper, same memory pattern applies, just, somewhat less harsh

grizzled thistle
#

So should I use the exact flags aikar recommends for paper?

remote condor
#

current recommendation is to follow the standard gc flags for paper, same memory pattern applies, just, somewhat less harsh

#

So yes. lol

grizzled thistle
#

I said exact, I'm just trying to confirm

rich dock
#

Hello guys, Im debugging my plugins using breakpoints but the server automatically shuts down after no tick happend after X amount of time. I believe this is the paper watchdog. How can I disable that?

stone fiber
#

-Ddisable.watchdog=true

rich dock
#

Thanks!

thorny holly
#

oh that's handy

#

Isn't there also a way to extend player-timeout so it takes longer for you to get kicked off the server?

#

Which setting is that?

stone fiber
#

no

#

even if you fucked with the server, the client still has its own check

thorny holly
#

ah

stone fiber
#

easier to just change your breakpoints to only stop the active thread

#

(usually main)

#

and then the network threads running async will usually be fine

thorny holly
#

ooOoo

stone fiber
#

and the client will stick around

thorny holly
#

god i love IJ

stone fiber
#

that's not going to work super well if you want to debug stuff moving around between threads

thorny holly
stone fiber
#

but that's probably not super common for most plugin devs

thorny holly
#

make default button πŸ’―

#

interesting way of testing thread lagspikes too

zenith raptor
#

how can i get a players name from uuid

#

i have the uuid stored in a database

#

and im pulling it out of that database

#

and trying to convert it to the players name

remote condor
#

You'd have to query mojangs API, waterfall does not have a user cache

#

Unless you intended this for paper, then use #paper-dev

zenith raptor
#

nah

#

im on waterfall

#

ill make a method to do it with mojangapi

#

i just didnt wanna do that

remote condor
#

Just making sure. lol
Then ya you'll need to query mojang, there's no other way that I'm aware of.

zenith raptor
#

alrighty

#

thx

remote condor
#

You can look up a UUID every minute for every unique player

#

but that ratelimit isn't concrete, mojang will throttle if you're way too spammy, about 1k requests in a second

zenith raptor
#

shouldn't ever hit that i dont htink

#

just doing a /getreports thing

#

where it gets the reports of a player out of a database

#

based on their uuid

remote condor
#

You shouldn't have a problem then.

zenith raptor
#

cool

#

thx

#

oh wait

#

can I use getName(UUID)

#

by any chance

remote condor
#

Lemme open source and check, I didn't know about that method

zenith raptor
#

i just stumbled upon it while being lazy and not wanting to do the mojang api lol

#

idk if it will do what i need but it might

remote condor
#

Which class did you find that?

zenith raptor
#

holy crap im dumber than stupid

#
    public static String getName(String uuid) {
        String trimuuid = uuid.replace("-", "");
        String url = "https://sessionserver.mojang.com/session/minecraft/profile/" + trimuuid;

        return uuid;
    }```
#

i had this in my thing

remote condor
#

Gonna say, I can't find a reference to that anywhere in waterfall. lol

zenith raptor
#

lmao

remote condor
#

Hold up

#

I can find some potato code I have in prod

zenith raptor
#

that would be clutch lol

cyan garnet
#

Any way to check if a player has played on the server previously via the bungee/waterfall api? since there's a locations.yml then it should be possible I'd assume

trail plume
#

no

#

you could maybe abuse that to try to check, but, it's not a reliable indicator, especially as people can disable that stuff

cyan garnet
#

ah right

#
getProxy().getScheduler().schedule(this, () -> {

}, 300L, TimeUnit.SECONDS);

Is this a valid way to schedule a task in bungee to run every 300 sec?

ornate jasper
#

I think that runs only once

trail plume
#

you want the one which takes two ints

#

I mean, longs

#

brainderp

cyan garnet
#

thanks πŸ™‚

dusky niche
#

What event is activated when bonemeal is used from a dispenser?

sly crown
#

wrong channel

dusky niche
#

oh yeah sorry lol

tidal fog
trail plume
#

./waterfall up

#

saying that, if you're just tracking waterfall

#

add our repo as a remote, pull from that repo, and push

#

if your intent is to maintain patches over waterfall, use travertine

tidal fog
#

just trying to add 1.16 support to waterfall

trail plume
#

already a PR for it against travertine

#

No idea if it works, or anything like that, but πŸ€·β€β™‚οΈ

tidal fog
#

How do I know which values have to be put in there?

            TO_CLIENT.registerPacket(
                    TabCompleteResponse.class,
                    map( ProtocolConstants.MINECRAFT_1_8, 0x3A ),
                    map( ProtocolConstants.MINECRAFT_1_9, 0x0E ),
                    map( ProtocolConstants.MINECRAFT_1_13, 0x10 ),
                    map( ProtocolConstants.MINECRAFT_1_15, 0x11 )
``` (the 0x3A) and stuff like that
trail plume
#

you look at the protocol spec

spring bloom
#

or you just pull the pr that already apparently does it

bleak current
#

but why

#

let's reinvent the wheel

outer cosmos
#

πŸ˜ƒ

tidal fog
tidal fog
#

do you all know what could cause this error (I know this isnt waterfall, but I dont think there is a spigot/bungeecord discord)
https://github.com/DrexHD/BungeeCord

civic valve
#

Why do you maintain old snapshots

#

Also, you're asking for support on customly modified software

#

I suggest you re-read your work and pay close attention to protocol spec

#

Or look at that PR on travertine, it looks pretty weirdchamp and I haven't personally tested it but may be worth a look

tidal fog
#

I get this error when I try running the Travertine jar from Xernium
no main manifest attribute, in Travertine.jar

civic valve
#

@tidal fog how did you build it...

#

Read the readme

tidal fog
#

using the travertine file

#

k

unkempt mason
#

Did you build it as executable jar file?

molten jackal
#

What is the difference between ProxiedPlayer#sendData and ServerInfo#sendData?

#

I've heard that server info queues it up until someone joins, right?

trail plume
#

basically, yes

lean gobletBOT
#

ProxiedPlayer#sendData should send to the client, ServInfo#sendData sends to the minecraft server

trail plume
#

that too, actually

#

phoenix smert sometimes

lean gobletBOT
warped loom
#

I have a question, should "common" stuff between the Paper and Waterfall code be in a common folder?
like in the photo

bleak current
#

well isn't that the point of "common"

bleak current
#

how do i setup a dev environment with the proxy and a server

bleak current
#

define "with the proxy and a server"

#

or rather "dev environment"

#

heck, that question is very ambiguous.

#

what do you want to do?

civic valve
#

.xy pepega

lean gobletBOT
warped loom
#

.yx

coarse monolith
#
(in unnamed module @0x2915c2b5) cannot access class jdk.internal.joptsimple.internal.Strings (in module jdk.internal.opt) because module jdk.internal.opt does not export jdk.internal.joptsimple.internal to unnamed module @0x2915c2b5
``` what exactly does this mean?
trail plume
#

something is tryna access a class which is not exposed by something

coarse monolith
#

well how would i expose classes like Strings

trail plume
#

you don't

#

Not sure if there is an evil jvm flag to bypass that

coarse monolith
#

hmm never had an issue like that with bukkit (i mean their different but I thought they would be similar)

trail plume
#

But, god knows wtf is accessing that

#

Wouldn't be surprised if it wasn't some plugin

#

And that's a java thing, basically

coarse monolith
#

well im trying to make a plugin with a command but it needs to join the string array

dark perch
#

String.join

#

Or something like that

trail plume
#

^^

coarse monolith
#

yea Strings.join at least thats what i put in

trail plume
#

Strings is an internal class

coarse monolith
#

OH

#

itellij u silly

civic epoch
#

I have a String: te\_st
When I press tab the preview is: te\_st

And when I confirm that I want the string it places it as this: te\\_st

Here a Photo:

#

Is this my wrongdoing or is it from waterfall

bleak current
#

not enough information

civic epoch
#

What do you mean by that ?

#

I catch the onTabComplete

bleak current
#

wait what

#

post the code

civic epoch
bleak current
#

huh

warped loom
#

ehm

civic epoch
#

Its just an example the Error only occurs in the console

#

In Minecraft it works perfectly fine so it must be a issue from waterfall

civic epoch
#

another question how can i see what .jar the server is running I want to ask if its the normal BungeeCord or if its Waterfall becouse I want to support both

bleak current
#

check if waterfall specific classes exist

#

or events

#

if they don't, chances are that you're running bungee

warped loom
#

cant you execute the /bungee command

#

and get the result?

trail plume
#

should be API for getting the version, but, really boils down to "why"

nocturne widget
#
 ByteArrayDataOutput sendPlayer = ByteStreams.newDataOutput();
        sendPlayer.writeUTF("Connect");
        sendPlayer.writeUTF(server);

        //Fragment responsible for sending info to destination server about random TP of player
        final String finalServer = server;
        ByteArrayDataOutput out = ByteStreams.newDataOutput();

        out.writeUTF("Forward");
        out.writeUTF(finalServer);
        out.writeUTF("RandomTeleport");
        System.out.println("FinalServer: " + finalServer);
        ByteArrayOutputStream msgbytes = new ByteArrayOutputStream();
        DataOutputStream msgout = new DataOutputStream(msgbytes);
        try {
            msgout.writeUTF(event.getPlayer().getName());
            msgout.writeShort(msgbytes.toByteArray().length);
            msgout.write(msgbytes.toByteArray());
        } catch (IOException exception) {
            exception.printStackTrace();
        }
        out.write(msgbytes.toByteArray().length);
        out.write(msgbytes.toByteArray());
        event.getPlayer().sendPluginMessage(this, "BungeeCord", sendPlayer.toByteArray());
        event.getPlayer().sendPluginMessage(this, "BungeeCord", out.toByteArray());```
#
    @Override
    public void onPluginMessageReceived(String channel, Player player, byte[] message) {
        if (!channel.equals("BungeeCord")) {
            return;
        }
        ByteArrayDataInput in = ByteStreams.newDataInput(message);
        String subchannel = in.readUTF();
        switch (subchannel) {
            case "PlayerCount": {
                String serverName = in.readUTF();
                int playercount = in.readInt();
                playersAmount.put(serverName, playercount);
                break;
            }
            case "RandomTeleport": {
                System.out.println("RTP received");
                short len = in.readShort();
                byte[] msg = new byte[len];
                in.readFully(msg);
                try {
                    DataInputStream msgin = new DataInputStream(new ByteArrayInputStream(msg));
                    String somedata = msgin.readUTF();
                    System.out.println("Somedata: " + somedata);
                    Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "rtp player " + somedata);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                break;
            }
        }
    }```
#

it seems to disconnect player after he clicks button (which triggers sending messages in 1st code fragment)

#

what could go wrong

#

[19:32:48 WARN]: [/91.219.115.3:56826|CDFN] <-> DownstreamBridge <-> [auth] - EOFException: null
[19:32:48 INFO]: [CDFN] disconnected with: The server you were previously on went down, you have been connected to a fallback server

bleak current
#

if you're getting EOF then you're reading more data than given

civic epoch
#

check if waterfall specific classes exist
@bleak current and how do I do that can you Help me ?

#

Or someone lese can give me an example

bleak current
#

those are for example waterfall specific classes

#
public final class MyDumUtility {
    public final static boolean IS_WATERFALL;

    static {
        boolean isWaterfall = false;
        try {
            Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole");
            isWaterfall = true;
        } catch (ClassNotFoundException ignored) {}
        IS_WATERFALL = isWaterfall;
    }
}
#

or something like that

civic epoch
#

Okey thanx bud

civic epoch
civic valve
#

It's the class loader

civic epoch
civic valve
#

You either need to not use those classes

#

Or move then to a another class

#

Which only gets invoked when it's used

civic epoch
#

It's the class loader
@civic valve is there no other way ?

civic valve
#

I just said how to fix it

civic epoch
#

yeah but is there no other way

civic valve
#

There is no other way

civic epoch
#

how do bigger plugins which support bungee or Waterfall solve this?

civic valve
#

By not using whatever you're using

civic epoch
#

πŸ’©

civic valve
#

Ive never seen jline be used

#

You're probably misusing it

#

Sounds like

#

.xy

lean gobletBOT
civic epoch
#

okey so can someone show me a InputStreamReader which works for both?

bleak current
#

use java's BufferedReader + java's InputStreamReader

#

you don't need to use Jline's

civic epoch
#

thanx it fixxed it sry for the wrong question @bleak current and thx for the misusing help @civic valve

bleak current
#

you're welcome and also please stop pinging

civic epoch
#

ok

noble grove
#

Hello, I'm trying to fork Travertine
That's what I've done
Installed Maven and Git Bash correctly

Went to "Documents" directory
Clone the repository using
"git clone https://github.com/PaperMC/Travertine.git"
Went to "Travertine" created directory
Run "./travertine b" command

I got this error

civic valve
#

You need to configure git

#

Do the commands after where it said "please tell me who you are"

noble grove
#

Okay

bleak current
#

if you can't do it yourself then you should really think if you need a fork

lean gobletBOT
#

wifth maven

arctic jacinth
#

I'm currently using a custom build of bungee (same happens when patched with waterfall)
The client kicks me out of the server when attempting to load the command suggestions
Does anyone know where the issue might be?

bleak current
#

snapshots huh?

stark bone
#

Bit of a weird one here,

When doing this ```java
@EventHandler
public void onPreJoinEvent(PreLoginEvent event) {
//Get connecting clients protocol version
int getProtocolVersion = getClientValidVersion(event.getConnection().getVersion());

//Kicks player if version not correct Before they even get to PostLogin
if(event.getConnection().getVersion() != getProtocolVersion) {
ProxyServer.getInstance().getConsole().sendMessage(new ComponentBuilder(event.getConnection().getName()).color(ChatColor.YELLOW).append(" Kicked due to version mismatch").create());
event.getConnection().disconnect(new ComponentBuilder(Main.PREFIX).append("Please join using version ").reset().append(getVersionMsg).create());
event.setCancelled(true);
}
}


https://pastebin.com/mS7YqbbH
#

It seems the null pointer is on this line.

event.getConnection().disconnect(new ComponentBuilder(Main.PREFIX).append("Please join using version ").reset().append(getVersionMsg).create());```
trail plume
#

something in your component is null

stark bone
#

Please dont tell me its stupidly that simple

#

im so sorry

stark bone
#

Ok... so never mind.

#
event.getConnection().disconnect(new ComponentBuilder("This is a test").create());

This still causes a nullpointer

bleak current
#

connection might be null then

#

if that gives exception as well, post its stack trace as well

stark bone
#

The stack trace is the exact same as the previous one

sly crown
#

split event.getcon into its own var

stark bone
#

Ok..

#

So the issue was

#

event.setCancelled(true);

#

if I add that line, i see the null pointer in the pastebin above?

bleak current
#

simply set a cancel reason

#

event.setCancelReason(...)

#

and cancel event

#

that'll do exactly what you need

stark bone
#

Ah!

#

Perfect thank you

rich dock
#

Hello, I was wondering what this is:
getI18NDisplayName Gets the Display name as seen in the Client. Is there a way to translate items using paper or what is this?

bleak current
#

please pay attention to channel topics

#

it's not that hard to read

rich dock
#

Damn it thats the second time. Im dumb. Sorry 😦

dark perch
bleak current
#

discord succc

rich dock
#

Swipe left

shell lagoon
#

If you hold the channel name at the top I think you get the description.

#

Well, or not apparently

bleak current
#

yeah only there...

#

holding did nothing

shell lagoon
#

Ah, yes, the perfect place for the channel description: the members list.

bleak current
#

the irc "killer" has a lot to learn

nocturne widget
#

this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", this);
is it correct registering incoming messages on this channel?

    @Override
    public void onPluginMessageReceived(String channel, Player player, byte[] message) {
        this.getLogger().log(Level.INFO, channel + " got message");
        if (!channel.equals("BungeeCord")) {
            return;
        }
        ByteArrayDataInput in = ByteStreams.newDataInput(message);
        String subchannel = in.readUTF();
        if (subchannel.equals("EquipmentRequest")) {
            short len = in.readShort();
            byte[] msgbytes = new byte[len];
            in.readFully(msgbytes);
            DataInputStream msgin = new DataInputStream(new ByteArrayInputStream(msgbytes));
            try {
                String somedata = msgin.readUTF();
                this.getRedisUtility().savePlayer(Objects.requireNonNull(Bukkit.getPlayer(UUID.fromString(somedata))));
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }```
i have this code in the same class
but it doesnt execute, even first log
bleak current
#

why don't you use your own channels?

#

relying on BungeeCord channel is... dangerously brittle

nocturne widget
#

I got it... hmm.. i thought there is no need to invent wheel second time

bleak current
#

what do you mean invent wheel second time

nocturne widget
#

but wait, Im not using it to send responses

bleak current
#

you'll just use different channel name than "BungeeCord"

nocturne widget
#

yeah

#

i know πŸ˜„

bleak current
#

"yourplugin:identifier"

nocturne widget
#

but look, im just sending request here

#

nothing more

#

my "client" server processes it and thats it

#

nothing more happens

#

still shall I implement my own channel?

bleak current
#

yes

nocturne widget
#

Ok i figured out that I was sending message to player, not the server

weak estuary
#

Hey, would anyone happen to know what the different states in ServerKickEvent mean? They're not documented unforuntely

#

Like, does CONNECTED mean that the player was connected to a server and was kicked, while CONNECTING means it was trying to connect to a server and was kicked? That would make sense, but you never know with BungeeCord 😐

bleak current
#

peek into impl

signal mica
#

Hello, is it possible to start a waterfall proxy without any servers configured and add them programmatically later on? (Well yes, that works)
But what not works is me connecting to the proxy. I have added a server but the Proxy complains that I have no default or fallback server.

lean gobletBOT
#

might not be possible to set that one just with api

weak estuary
#

We do it like that. But I set a fake server as the servers only configured server and gave it the highest priority

#

And then we select one using a plugin

#

Basically I couldn’t get it to work without the fake entry for some reason, but it also means that if we fail to connect them using the plugin, nothing funky happens

signal mica
#

Okay thanks. Looks like I will use some kind of workaround then.

warped loom
trail plume
#

read the javadocs?

warped loom
#

and how does one get the address from the SocketAddress class?

sly crown
#

did you try reading the docs

warped loom
#

yeah i've done it )=

trail plume
#

The actual javadocs for SocketAddress?

warped loom
#

yeah, i think i'll give up.

trail plume
#

this is basic java

#

if you have an interface, and need to reference a more concrete impl of a class, what do you do?

shell lagoon
#

raises hand

warped loom
#

but SocketAddress is not an interface

trail plume
#

irrelevant

#

am tryna make a point

warped loom
#

i just dont know "protocol dependentent implementations" that could subclass that. I'll search further

trail plume
#

oracles javadocs literally tells you what the known subclasses are

warped loom
#

im killing myself rn

#

im stupid lol

brazen warren
#

What is the best way to report bugs ?

#

Or speak to a developer ?

#

When offhand is enabled on the server, a sword's reach is 5 blocks ? Is that correct, because this is defined as hacked clients.

trail plume
#
  1. Wrong channel
#
  1. That sounds about right
brazen warren
#

wich channel ?

trail plume
#

Generally one of the paper ones

brazen warren
#

fork

#

this is waterfall

#

my bad πŸ™‚

#

Thanks for your help electroniccat

warped loom
#

Hi, I have a question regarding an async method, basically my method retrieves a ServerInfo from the name of the server:

public static ServerInfo getServerInfo(final String serverName){
  //getServerInfoMap returns Map<String, ServerInfo> from the proxy.
  return getServerInfoMap(proxyServer).get(serverName);
}```
If it's possible to make it Async using the proxy scheduler, what would be the way to achieve it?
sly crown
#

async doesn't make sense

#

there is no main thread

#

.xy

lean gobletBOT
warped loom
#

oh so it's just fine as is

#

thank you

lean gobletBOT
#

is there something like byof for waterfall, for lazy poopl like me?

sly crown
#

travertine

#

:^)

lean gobletBOT
#

good enough πŸ˜‚

sly crown
#

i mean it is. literally all set up too. just gotta rip out the 2 patches it has and add your own

lean gobletBOT
#

patching is great, we just used to just plainly throw stuff into Bungee and ugly-ly merge upstream

fluid stump
#

Will changing the displayname still send the original name to the server?

#

Nvm just read the docs, but is there any way to change unique name?

frigid brook
#

.g waterfall maven repo

lean gobletBOT
#

(DiscordBot) https://stackoverflow.com/questions/49025008/cant-load-snapshot-dependency-in-maven-repository -- Can't load snapshot dependency in maven repository - Stack...: "... gradle-dependencies. Dependency: group: io.github.waterfallmc, name: waterfall-api, version: 1.12-SNAPSHOT. Repository:Β ..."

frigid brook
#

Should I add paper repo too?

civic epoch
#

How can I remove this: [14:14:44 INFO]: [/134.249.106.20:51168] <-> InitialHandler has pinged

trail plume
#

in the config files

civic epoch
#

thanx

civic epoch
sly crown
#

yikes

warped loom
#

You should always use the override annotations

#

It helps compiler if I'm correct

civic epoch
#

so where should I put an @Overide?

warped loom
#

Before the methods (I can only see onEnable in the photo)

sly crown
#

override and static doesn't mix

bleak current
#

what the fuck did i just witness

civic epoch
#

hahaha

#

it worked until now

warped loom
#

Did I say anything wrong?

#

I hope not

#

I like helping people

civic epoch
#

so the static is the problem i think becouse it creates an individual think ?

warped loom
#

The problem is that you were instantianting the Plugin twice

#

you can't do that

bleak current
#

hard to tell without actually seeing the code

warped loom
#

he was instantiating a class extending BSS , which already extends Plugin. That's illegal yee_fuckin_haw

bleak current
#

oh

#

yeah you can't have multiple instances of plugin main class now

#

bungeecord started enforcing that

warped loom
#

Yeah I think it's a good thing

civic epoch
#

so then I get why it worked until now

bleak current
#

fix your code and case closed

civic epoch
#

did it its working

#

thankx mikroskeem and TheViperShow

warped loom
#

ok no problem

#

I'm new to BungeeCord dev as well

sharp onyx
#

does anyone know how i can make all players share the same inventory

frigid brook
#

You need to handle every event

#

every inventory event...

sly crown
#

re: empty packets, this has apparently been an issue when setting the tab complete suggestions to an empty list

#

dunno if you want to include that in "bad plugins" but i assume the server should handle that properly somehow

#

though i'm not 100% sure how to reproduce, it might be in conjunction with other bad plugins possible?

trail plume
#

there was a plugin a good while back that was breaking servers tab complete

#

might have been premiumvanish iirc

sly crown
#

Β―_(ツ)_/Β―

#

all i know is some people were getting empty packet errors with bungee + worldedit suggestions and switching to waterfall fixed it for them

lean gobletBOT
#

god I hate that the bridge doesn't keep nick colors after nick changes like my irc client does -.-

bleak current
#

kek

jaunty kindle
#

There's this 1000+ member minecraft discord server that popped out of the ground from EDM articles about an in game music festival

#

At the moment the plan is to have a multi server network to spread players around

#

and the goal player cap right now is 330

#

Something we want to accomplish is having a single player be mirrored across all of the servers under the proxy

#

(the artist)

#

The only interaction on all servers they'd have to do is press a button

#

My question is,

#

how feasible would it be to mirror a single player's packets across multiple servers using a proxy level plugin or fork

#

Auth would be handled once, and the joining artist would receive packets from a central single server

#

The servers are all identical with the same world