That's what I did. Followed these docs https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/#connect
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
1 messages ยท Page 5 of 1
That's what I did. Followed these docs https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/#connect
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
What's your end code?
player.sendPluginMessage(MRPG.inst(), "BungeeCord", out.toByteArray());
That's not all of it. ๐
What do you mean by "end code" ?
The code after you finished the tutorial.
Not sure if that is still relevant
The channel is being registered explicitly, like so:
getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", new IncomingBungeeHandler());
Okay, turns out I should've just used a different stream than what they say in the tutorial
ยฏ_(ใ)_/ยฏ
is there any public maven repo for waterfall?
the paper repo has it iirc (i generally use whatever ever the minecraft dev plugin for intellij provides me)
paper's repo has waterfall api artifacts, correct
Can someone help me with this
It's scoreboard teams
With waterfall, I'd be somewhat tempted to ensure that you have the string deduplication flag set for the JVM
How I do that?
-XX:+UseG1GC -XX:+UseStringDeduplication -XX:+PrintStringDeduplicationStatistics
?
Exist a way to check the plugin causing the issue?
Should be a spigot plugin, right?
Issue is with how scoreboard teams are handled and stored in memory, they use strings which ends up basically filling up the heap when you have a lot of teams, that could have technically been represented with an enum, but mojang opted to use a string \o/
And those flags should help, but string deduplication has it's own performance concerns, and yup, teams will be created by a plugin, either on the proxy or on the server itself
gotcha
(Well, pretty much generally always down to a plugin when you start having so many teams that it becomes an issue*)
oh, I see, thanks
You can try a velocity proxy, it does not store scoreboards and teams in memory.
I wonder if we'd break anything making that an enum
Yeaaa, probably going to have to delombok that if we wanna play with it
I'm thinking we shouldn't ever see a non-expected value in there, but we can deal with that by just having a fallback string I'd figure
Not clean and not ideal, but least breaking method I can see :/
i'll try to implement that into my fork
but then i need to figure out what plugins do use scoreboard teams
and test the shit out from them
should do the trick
btw @trail plume what about my packet construction patch? :D
Oh, sorry, I've not really found the time/motiviation to run through too much recently
i think it should be safe to pull, haven't blown up in my environment yet
oh man wat
this means that collision rule is initialized only when proto is >= 1.9
so in Team class, collision rule might be null as well
visible disgust
should be fine i think
@bleak current u did not get how tcp fast open works
wdym
you should only do that for SERVER_CHILD
not for client connections
ah ok
i didn't bother looking into it because there isn't much documentation for it apparently
TCP Fast Open (TFO) is an extension to speed up the opening of successive Transmission Control Protocol (TCP) connections between two endpoints
First line from a wiki article, but seems like it all falls in line with what they're saying
I asked to my developer and he already delete the Team and Scoreboard objetive when player leaves
Like
Set<Team> team = ((Player) sender).getScoreboard().getTeams(); for(Team team2 : team) { team2.unregister(); }
So, I do not know where is coming from the problem
@trail plume exist a way to know where is coming from the problem?
take a look at the dump and see what teams are holding onto those objects
okey
and exist a way to disable team saving for travertine?
As I know is useless (?)
The issue is not the fact that it's saving teams as much as bungee keeps them in memory for its own API
It's one of those fun annoyances with bungeecord
yes, pretty much xD
Because the GC kill my server
Sometimes spikes
And the Ping increase
What another thing uses Teams?
Plugins using scoreboards, anything using scoreboards, etc
Teams are a part of scoreboards
oh, okey
And is viable disable the Team on Travertine?
Or you can just remove scoreboard handling on proxy completely
at the risk of breaking plugin compatibility, because this is BungeeCord after all
Well, at least make an option that will responsible for processing scoreboard packets or no
Not viable without the disable entity metadata option working 100% afaik
(Are scoreboards reset by the client itself when you jump world or not?)
afaik, without that system being disabled, bungee has to remove them for the client
So, yea, for such an option to actually be viable, entity metadata rewriting needs to be disabled
@bleak current I was looking on your's fork and, what's the point of this
https://github.com/mikroskeem/MikroCord/blob/master/Waterfall-Proxy-Patches/0031-Restore-stdout-stderr-on-exit.patch
fixes cosmetical issue introduced by /grestart
that's all
as logger cannot be accessed in shutdown hook thread
and shows dumb useless warnings
well, stdout/err is redirected to logger normally
it has bunch of pointless shit very likely, but it's for my own use so /shrug
https://ci.md-5.net/job/BungeeCord/ws/api/target/apidocs/net/md_5/bungee/api/connection/package-summary.html
or embedded server
does this mean i can create a "void" dummy server with a bungeecord plugin?
i have not found any other documentation on such "embedded server"s
There is no embeded server
i get that, but can i add or create one?
If you went to the length of reimplementing enough of a server, yes
Bungee doesn't have support for that build in
cool! i might investigate some more in that case, it would be useful for wait-queue or login servers
...Waterfall doesn't control game rules, that's a server setting.
first time really screwing with java, are there any obvious code mistakes? https://github.com/vik1395/BungeeAuth-Minecraft/pull/27/files
(other than the weird whitespace diffs)
You use the command on the servers, achivements/whatever are 100% irrelevant to this channel
Worth noting that gamerules on the server are pre-world, so you'll need to set the gamerule in every world
There is a option on bukkit.yml to deactivate them isnt it?
Is there any way to assign op bungeecord.command.server without adding the permission to a group, just add it to /op?
Bungee doesn't have the concept of op
Yeah I'm trying to find a way around that without adding the permission to a group
can someone pretty please with a cherry on top update travertine ๐
does anyone happen to know an alternative way to git am --show-current-patch | patch -p1 --no-backup-if-mismatch if git am bitches about lacking sha1 btw?
I coulda sworn that I did?
Oh, I did, I just completly brain farted and forgot to push \o/
thanks cat! appreciate it!
Hello, has anybody else experienced the same issue ? https://github.com/PaperMC/Waterfall/issues/378
I'm running the latest Waterfall and it's a real problem :/
(I'm not the author of the issue on GitHub)
Known issue
Ok, i know I can't ask for an ETA but is it a bug planned to be fixed ?
No real ETA, I need a deeper dive into the issue and time is limited and the tooling available to help figure out what's missing easily is virtually inexistent
Could it be a problem in packets order ?
Yea, I was looking at that code a bit back, but wasn't 100% familiar with what was going on, and didn't have the time to get all the mess I needed up to test it all \o/
If it's working and you wanna submit a PR, go for it ๐
server 1 world -> server 2 world
server 1 world -> server 2 nether
server 1 nether -> server 2 nether
server 1 nether -> server 2 world
the fact is that the dimension is already specified by the Login packet, so when the client receive the Respawn packet it just ignore it because he thinks he's in the right dimension
so the fix is to send the respawn packet before login when the target dimension is different
(i was explaining what caused the bug to happen ๐ )
Yea, had a feeling it was going to be something fun like that, just didn't wanna start throwing packets all around blindly \o/
oh yeah that might be it
We are not so familiar with patch mecanism ๐
easiest option is to cd into the waterfall-proxy repo and git log and find the patch which adds that change and grab the commit hash
then git commit --fixup=##### and git rebase -i --autosquash upstream/upstream
Is it ok if multiple patch are edited ? https://i.antbig.fr/Y0oGRi.png
Better if that didn't happen, but such is how the patch system works
It's git, but... kinda abused
e.g. the commands I told you, if you did that on a real repo you'd probably be shot by somebody
well I 've made my first PR ๐
Your branch is outta sync
I may have missed a step
Already in a waterfall block
You can do the fix yourself if you want, I don't understand why my branch is not sync
while antbig is doing some magic for his PR, I would need help for an issue i have, which i can't figure it out but i can't talk about it in a public channel :/
@trail plume are you ok to PM ?
Depends on the nature of the issue
it's a paper related issue, so maybe i should go #paper-help ?
My Q is more around why it can't be discussed in a public channel
Also, I'll sort the patch out
(If that's any easier for you guys?)
it's a paper 1.12.2 related issue, i have 2 timings to show you. The first is "before update" and the second is with the latest paper 1.12.2. The only difference is the paper version between theses two timings.
i just want to send you the timings in PM
Generally better off to just link in #paper-help, more eyes on the issue
I've noticed that the NMS generateTree with Tall Birch seems to be creating trees with dirt inside them:
Wrong channel...
Hello, i had trouble using Per-Player View Distance API in 1.14.3, I'm getting this error :
org.apache.commons.lang.NotImplementedException: Per-Player View Distance APIs need further understanding to properly implement
at org.bukkit.craftbukkit.v1_14_R1.entity.CraftPlayer.setViewDistance(CraftPlayer.java:1994)
Sorry if i'm in the wrong channel.
Also, it works fine on 1.13.X
Does someone knows where it comes from ?
It comes from paper
Read what itโs telling you
API isnโt in 1.14.x and requires a deeper understanding of Mojangs rewrite of the chunk system to implement
And yes, this is the wrong channel
Okay, thanks. Are you planning to get this API compatible with 1.14 ?
@trail plume maybe merge this in?
https://github.com/PaperMC/Waterfall/pull/402
Will fix scoreboards issues for people who disabled entity metadata rewrites
Missing waterfall comments, and what scoreboard issues?
Missing Waterfall comments?
// waterfall, start/end
you add them in a handful of places and just leave them out everywhere else
they aren't optional
you modified 5 lines
but only commend one?
a whole lot of lines are just uncommented
etc
ok
It's all on the todo list, kinda burned out on two other projects and getting back into gear is just urgh, I should probably get to finishing my setup for testing servers, just going to use docker-compose and some automagic
IRC never forgets
Any way to send fake proxyplayers to bungee?
I see the UserConnection class but it's final so I can't extend it.
So they appear on /glist
can't you just replace the whole command
I guess, but if I hooked in-to it, It'd return when plugins use the plugin channel to get the totalOnlinePlayers.
i really don't understand why you need this
extend DownstreamBridge and override handle(PluginMessage)
then replace it for ServerConnection
@harsh harbor Where would I set the new DownstreamBridge?
Don't do much bungee development so idk where anything is xD
Waterfall *** before electronicc roasts me :9
((UserConnection)proxiedPlayer).getServer().getCh().getHandle().pipeline()
.get(HandlerBoss.class).setHandler(new InjectedDownstreamBridge(...));
Is your intent that those "players" actually connect to the proxy?
Yeh
@trail plume Just something I'm testing out with the Bungee API implemented with the Spigot API, nothing major aha
Anyway I can override the command?
super("glist", null, "testing", "the", "command", "omg");
The aliases work, how-ever the glist is still overpowered by the bungee one.
aliases won't replace bungee commands
It's probably first come first serve or something
You'd need to see if there is a method to force the change or unregister the command
unregisterCommand found it, now time to locate the glist command location
Ugh... found it, any way to disable these jenkin modules? https://prnt.sc/od9w7t
in the modules config
Aight, hope it works
Is there a difference between getting the Waterfall instance to get the players rather than just get the proxy from the main class of the plugin?
no
Okay thanks (:
Alright another question, is there a way to only cancel the ServerConnectEvent if it's not being fired due to a player logging into the proxy?
So for example, if I load into a hub, it won't do it, but if I leave to another server and then go back to /hub, it'll utilize it.
Waterfall and travertine have Maven repos?
same repo as paper in #404345080917262369
Aha got it
Travertine shares the api with waterfall?
Bless up for ServerConnectEvent.Reason (:
Oh ok, thank you
There is anyway of listen to every event?
Without manual registration?
nope
How often is ProxyDefineCommandsEvent called?
Does Waterfall allows to intercept packets server -> client?
I wanted to intercept the 1.13 Command packet, but isnt possible sadly
@sharp isle cc
That event is called whenever the server sends it
ProxyDefineCommandsEvent is not fired when i first join the proxy
But is fired when i switch server
Using Travertine
Main server: paper 1.13
Secondary server: paper 1.8 with ViaVersion
in fact, none tab event is fired until i switch servers
Is it possible to intercept/monitor sent packets in Waterfall? Haven't checked any docs yet. Just wondering if it's possible
Waterfall doesn't "understand" most of the packets
So, you can hook into the networking stuff and pull the data that you want, but overall you're kinda in for fun
hello all so i'm trying to figure bungeecord plugin dev and the tutorial says to use 'getProxy().getPluginManger().registerListener(this, new Events()); but 'getProxy' is unknown
post code
public class Main extends Plugin {
@Override
public void onEnable() {
getProxy().getPluginManager().registerListener(this, new Events());
}
}
post full code
err
I use eclipse there isn't a build log, it just gives you the errors before even attempting to compile
you shouldn't have any bukkit refs in proxy code
still gettin the error ๐
= S*
ah nevermind
still had a ref to bukkit's bukkit.plugin
you literally shouldn't even have a bukkit jar available
I see
completely new tot his bungee thing, Ialways stopped in the past as it was confusing to set it up... but now I have invested time and done it
now trying to convert my plugins to work with multi server setup
most of whcih is fine now...but i have certain things like 2 plugins trying to update the player list for all servers... so its not usually accurate....
I'm guessing since this no longer uses bukkit, it would mean the Scheduler is gone?
runTaskTimerAsync etc ?
what's a proxy 
throw everything you know about minecraft servers out the window
lol
alright
I read on the page it said it tried to mimic as much as possible from the bukkit api is why i ask really ^^
but anyway you've fixed a major issue i'm sure ill figure the rest out XD
๐ค think its worth submitting some extra native binaries for compression/encrypt? generated a set for arm64... will probably try to get that arm32 ones soon. im... not entirely sure why im doing this either lol
cause i can, i think ๐คท
I'm not really fond of the idea of pulling in binaries from others
Especially as they'll just sit there until they break or are forgotten about
fair enough lol. the build script is still pretty much the same, and just have to remove the centos ASM #ifdef if its an arm cpu
If you wanna PR support for the scripts to build it, go ahead
cool, ill open a PR once i can get back near my raspberry pi to check the arm32 builds
the aarch64 ones i built using UserLand on android (can run a user-space version of ubuntu there, no root needed for the device either. kinda fancy)
can probably just do cross-builds from linux too
Is there a from scratch dev env for waterfall?
๐ hi jake
๐
It's late for me and I'm tired, I'll sort out travertine in the morning unless somebody drops in a PR for it
dammit was just gonna ask for update
rootin' for ya @fringe aspen !
ooo its pr'd!
cat do you think you could merge before u go to bed?
lol
I think I dropped out like 20/30 minutes after I said that, lol
I didn't make it much past when I merged that either
.contains("outdated") 
good to know why lobby server behaves differently, compared to other game servers
I guess because first time updateAndGetNextServer is called, empty server join queue is initialized
so no default server returned
cat when are you going to look at my pr ;-;
Caused by: java.lang.NullPointerException
at net.md_5.bungee.protocol.packet.TabCompleteResponse.write(TabCompleteResponse.java:74) ~[server.jar:git:MikroCord-Proxy:1.14-SNAPSHOT:1051ee3:unknown]
at net.md_5.bungee.protocol.MinecraftEncoder.encode(MinecraftEncoder.java:24) ~[server.jar:git:MikroCord-Proxy:1.14-SNAPSHOT:1051ee3:unknown]
at net.md_5.bungee.protocol.MinecraftEncoder.encode(MinecraftEncoder.java:9) ~[server.jar:git:MikroCord-Proxy:1.14-SNAPSHOT:1051ee3:unknown]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.36.Final.jar:4.1.36.Final]
... 49 more
[05:17:29 INFO]: [mikroskeem] disconnected with: EncoderException : java.lang.NullPointerException @ io.netty.handler.codec.MessageToByteEncoder:125
interesting
(i haven't touched that part at all on my fork)
i wonder what goddamn thing managed to set suggestions empty
... witch hunt begins
@bleak current Checker Framework is a godsend
With it, the proxy wouldn't have compiled
I need to put it back on for Velocity... but right now there's tons of compile errors ๐ฆ
are suggestions not allowed to be empty?
i've had this discussion with people before
but no one gave me a conclusive answer
suggestions shouldn't be nullable
well, i said empty, not null :P
yeah bungee api/code generally needs a lot of nullability information
or better doc
idk
How much of pain would it be to add 1.6.4 to Travertine
or does such a thing already exist
Don't know of one, don't think it'd be particularly hard if you had the experience in general, but Paper team isn't going to maintain that.
You'd have to do it on your own and maintain it on your own
Since you just need to add proxying support and not that much more, it shouldn't be too difficult from the perspective of someone who has experience with adding protocol support.
You'd basically need to deal with entity metadata, you'll need to deal with the protocol itself too
The latter should be the easy one
why 1.6.4?
Because minecraft wasnt horrible back then
@bleak current tekkit along side my 1.14.4 server ๐
fair
Hello! @trail plume is it possible that the PostLoginEvent is called after the first ServerConnectedEvent one? :/
Potentially
Doesn't look like it should
ServCon is thrown from the join game packet
And PostLogin should be called just before that
hmm, so ServerConnectEvent is always called after the PostLoginEvent, right?
That should be the case
What about the ServerConnectEvent instead?
I guess it can be triggered before the post login, am i right?
It'll be fired as soon as the connection is opened
(to the server)
The process is weird because you've got the proxy and the server all tryna get together and have a party
so in this case it isn't sure that the Connect event is called after the PostLogin one, is that right?
connect should be called before
Ok, thank you! ๐
Honestly, go setup a few listeners and test it ๐
@EventHandler
public void onPluginMessage(final PluginMessageEvent event) {
if (event.isCancelled()) {
return;
}
// Check if the message is for a server (ignore client messages)
if (!event.getTag().equals("BungeeCord")) {
return;
}
// Check if a player is not trying to send us a fake message
if (!(event.getSender() instanceof Server)) {
return;
}
// Read the plugin message
final ByteArrayDataInput in = ByteStreams.newDataInput(event.getData());
// Accept only broadcasts
if(!in.readUTF().equals("Forward")) {
return;
}
in.readUTF(); // Skip ONLINE/ALL parameter
....
}
@trail plume i get a EOF exception at the 'if(!in.readUTF().equals("Forward")) {' line, how is that possible? :/
hello, there is way to detect "fallback_kick"?
tried all events and doesn't work
Could not connect to default or fallback server, please try again later: io.netty...
forgive me if i'm breaking any rules, but i'm trying to find a way to port my towny data to the civs plugin. i'm willing to slide some cash for the trouble. i really don't think it's anything too crazy
or event for "Exception Connecting", there is way to do this?
i need to handle all failure connections
I wanna say that there is a callback for that
ok, i will try
is 200% cpu usage normal for ~200 players?
I thought that I'd zapped that line from the commit message
is there an official dependency for the waterfal api?
ty
yo I just had a quick question so I thought Id pop in here
I need to edit something on Waterfall, how would I do that? Importing the source generated by ./waterfall p yields me nothing but pain and suffering because of countless java logic issues that seem to normall compile fine?
You need the lombok plugin
I tried it both in Eclipse and IntelliJ with that plugin
It's annoying and stupid but we're subject to the hells of upstream ๐ฆ
it should work fine if you have that plugin installed, make sure that it's actually fully enabled
do I need to do anything else? I am still having the same issues, I tried reinstalling it- I know I have installed it in my eclipse attempt correctly too as I had to patch the binary to allow arbitrary loads (stupid macOS)
got an example of an error it's showing?
sigh this is why it always pays to ask for help. It just stopped happening. Thanks
Ill go cry in a corner now
:D

I got another question, how do I run my changes without having to create a patch from it?
or is that not possible?
compile with maven as normal
just mvn package ?
yup
run that on the proxy or on waterfall-super?
in -super is fine
dangit had something that made it loop, well obviously that works now too. thanks again
I hate to ask again
but
If I wanted to register an intermediary between the server connector and player
where would I do it best?
In the Server connector or in the user connector
take a look at where the server sets up the handlerboss
bosshandler, I mean
No, right the first time
\o/
Hi, quick question: what is the purpose of the offline uuid?
I see a user seems to have a public uuid (assigned by mojang?) and and offline one, that seems to originate in the MC server waterfall connects you to
@opaque imp you need to enable ip forwarding: https://www.spigotmc.org/wiki/bungeecord-ip-forwarding/
Thanks for that, makes sense!
@civic valve I set ip_forward: true in config.yml and restarted both the MC server and the proxy, but I'm still seeing the offline mode uuid
Do I need to remove the playerdata ?
Also not seeing the "external" ip
did you enable offline mode on the spigot/paper side?
not on paper side, that is likely the reason
Enabled bungeecord in paper and that fixed it. Thanks @civic valve !
Is possible let BungeeCord send a empty chunk to player?
Just let player won't join any server but remove the Joining server screen
Want let player stuck in bungee but can see the chat(remove the loading screen)
yes i post it to spigotmc
Possible? Yes, but there is a bit more to it than that
There is software which basically acts as a minimal server to keep the client in a limbo state, no idea what they support in terms of actually presenting some form of world however
Oh yeh, what was that server called?
Nice, thanks
Got it, thanks!
Oh 2b2t is also using this
Ah that's really nice
Is there any easy way to teleport all players from the limbo back to their server once it's back up or do I have to code something?
Like a "temporaryFallback" option
No, as bungee would have no real way to know that it's back up
true, there's no permanent connection between the proxy and the server ๐ง
that's fine, it's probably not that hard to do
if i perform a non-async database operation when the join event is fired will it hang the logging in... process for just one player or the entire proxy?
It will hang the entire proxy
performing blocking operations (such as I/O, fetching remote URLs, querying a database, ...) will hurt proxy performance.
Always run blocking tasks asynchronously.
alright
thought so, thanks
typhoonlimbo is kinda broken
until someone finds time to fix it (i still haven't managed to find time for that), then it's better to run an empty server with void world for limbo
i made a server with gm3 & clojure script setting speed to 0 to disable movement
does typhoonlimbo just spawn the player in a empty end world?
pretty much
ah i was wondering how they got that sky effect
well it doesn't send any chunks though
afaik TL has following problems:
Hello, is there any way to get the Forge mod list / detect if the player uses Forge?
once the handshake has completed, there should be a method to get it
In which event?
There is no event for it
It occurs as part of the forge handshake process
Information is exposed on ProxiedPlayer
I tried this but not works (says every time that I not use Forge):
@EventHandler
public void onConnect(ServerConnectEvent e) {
ProxiedPlayer pp = e.getPlayer();
if (pp == null) {
return;
}
if (pp.isForgeUser()) {
Map<String, String> mods = pp.getModList();
System.out.println(pp.getName() + "'s Forge Mods (" + mods.size() + "):");
for (String key : mods.keySet()) {
String value = mods.get(key);
System.out.println("* " + key + ": " + value);
}
} else {
System.out.println(pp.getName() + " is not using Forge.");
}
}
Too early
There isn't even a connection to a server yet for a chance for the handshake to have occured
With also noting that this won't work unless they connect to a forge backend or you have something on the server that's going to simulate that handshake and trick the client into sending its side of the puzzle
it wouldn't
Waterfall isn't sharing state across servers
That's irrelevant to waterfall
That would be plugin territory, waterfall doesn't deal with syncronization across instances whatsoever
It wouldn't
For any gains it would literally require waterfall to actually implement some form of state syncronization across servers
We have no intent of providing features like state syncronization
People would want a level of customization that can easily already be provided by existing plugins
I've said that it's out of scope twice now
Because you didn't just ask a simple question, you started pushing something which doesn't make sense even after I said that it's irrelevant to waterfall
wut
You asked about shoving a framework into waterfall to improve performance
I said it would be irrelevant as waterfall doesn't do anything related to what that framework does
What it sounds like is you have a problem on your network that is unique to your network, that your trying to get waterfall devs to solve for you.
If I call ProxiedPlayer.connect while the specified server is down, the fallback_kick chat message is sent to the player
Could not connect to a default or fallback server, please try again later: io.netty...
can I disable this message?
doesn't seem so
is there some way I can send a message to a server when a player is switching to it, before the player joins?
ex, player goes from ServerA to ServerB and ServerB get's a message "SomePlayer is joining from ServerA"?
Use a proper pub/sub service
I'm using JedisPubSub atm but it's taking 80-200 ms for ServerB to get notified about it
so it's received after the player joins
is it just me or are world chunks not being unloaded. is this just a waterfall thing?
this is a 1.14 thing
do you know of any workaround?
there is none
O_O
Workaround: don't use 1.14
you need to consider why they wont unload
and the reason is because the system is set up to keep certain chunks loaded as long as they have a ticket for them
i.e players and spawn
I removed all the players from that map... hmmm
so, if you want to unload chunks
remove the players
set keep spawn in memory to false
that should hit most chunks
plugins can also keep chunks around via api if they want to
i haven't looked at that spawn stuff ill check it out ty
huh yeah im kinda at a loss, I did everything you mentioned. still no lock
Oohhhhhhhhhhhhhhhhhhhhhhhhhhhh updating to the latest paper.jar worked. LETS GO!!!!!!!!!!!!!!!!
Hey guys. Iโm developing a new mod pack that requires a massive amount of chunks be loaded per dimension, hence why waterfall is the only real solution for me. I have not even started testing or even any coding but I was wondering if anyone knew/has any advice on how I could transfer data between between my server networks. I have a sql db but iโm not entirely sure where to start to make it โseemโ like the different servers are normal โparallelโ dimensions. I would need to somehow simulate transfer of Items(AE2 networks) and energy (maybe simulate some kind of interconnected channel network?).
Not really waterfall-dev stuff, and honestly, going that deep would likely be a killer
cattew, review my pr pls ;-;
Basically, no
You put the proxy into offline mode, which intentionally tells it not to contact mojangs API
We have no interest in changing that behavior and breaking peoples setups, nor do I have interest in maintaining an option for such a feature
offline mode means there's no authentication with proxy
No, offline mode in waterfall.yml means "do not contact mojangs API"
I mean, the config.yml for bungee/waterfall
just install SkinsRestorer, how hard is that?
i added a thing in bungeecord to make it so that a proxy can intake ip and uuid forwarding information from another proxy, so as to allow a proxy in a proxy which i need for a thing i'm coding
what's the likelyhood of such a pull request being accepted?
why do you need proxy in a proxy O.o
it made so many things much much easier
nono different purpose
I think you've seen it elsewhere
but basically a thing to spread the load on a server
to link multiple servers together and teleport players from one place to another
I've considered allowing such things in the past
But it always comes back to the "somebody has to maintain it" type issues
take Skyblock, I coded a thing to conveniently arrange islands on more than one server
while still linking chat, messages etc
bungee was stopping me in two ways, 1) it was not allowing proxy to proxy at all (would say "can't connect to myself"), 2) it wasn't forwarding ips and authenticated uuids
so I fixed both issues
well I "duck taped" the first issue and actually implemented incoming ip forwarding for the second
not duck, duct
so you're basically doing what you can do fine with non-proxy-in-a-proxy solution
and proper plugins
whatever floats your boat, but proxy in proxy solution can spawn flame spitting dragons easily
tldr; "You're shooting yourself in the foot and I have no intents of being part of this" ๐
:p
I found it convenient
the plugin running on the subproxy knows by default all the players connected to the servers
the server component doesn't need to know of any extra servers that it never should connect players directly to
well just one for the moment
yea the subproxy connects to a spawn server and as many island servers as you need
we're releasing on the 11th and I started a few weeks ago, not one situation where I regretted not using the same proxy
oh and think of plugin updates, I would have to shut the whole network down
No?
lol
tell me about it then
Draining is a very basic concept in load balancing.
I suggest you learn about load balancing
What you're doing is a really cheap imitation of it, probably.
your solution gave me an idea for proper server grouping tbh
going to put something together today very likely...
I'm open to criticism, I just don't accept people shutting down the idea from the beginning
The thing is is that you really solve nothing that you couldn't solve in code
All you do is introduce another layer of a tool which is pretty much a hack into the line of the connection
Yep, wasn't intended to be used this way
short explanation:
You should be doing what you're doing with plugins.
I mean I'm coding a plugin for it haha do you think I'm literally only adding an extra bungee
(And bungee does explictly block those connections for a reason, part of that reason is because of a bad bungee release, but allowing it on our side is just kinda... It's not something I'd be happy to take the hit of dealing with any issues that arise
also cat you're awake can you please do something with my PR please :D
No
Pretty much "proxy in a proxy" gets shutdown because it's a non-starter.
:(
Never
It's never the right solution
I need to catch up on PRs, just eveerrrything is going to hell \o/
again, you're shutting the idea down without giving a valid point
It is not its intended use case and issues arising from it are unsupported
Like I said, it's a non-starter
I'm not asking for support lol
A plugin will cleanly accomplish these goals using the supported mechanisms
Then you do you
But be ready for criticism
It's bad, and so a PR likely won't be accepted, unless cat has other thoughts?
as I said, I was considering at one point, it's just the burden of support that arises from it which I just really don't wanna
yeah because it becomes one of the use cases you gotta support
I raised the point of being able to push updates without shutting the main bungee down, still no valid alternative was raised
That's pretty easy
you can always disclaim haha
And I've gone over this simple technique dozens of times on this discord and other places
You pull the outdated servers out of circulation
connection is going off and on if I stop replying for a while
oh right we do that already with the main proxy plugin, really not sure how that's less of a burden to you
having to switch DNSes and reroute connections twice just because one gamemode needs updating seems to add an issue rather than solve it
if you're being sane you automate this stuff
even then, DNS changes take a while for people to acknowledge them and it makes changes less instant
I perfectly agree with you for network updates tho
How fast DNS updates depends on how you configure it
and that's what we do already
of course, but you need to rely on computers to actually follow your instructions
Sure, you'll always have some level of caching involved with DNS, but low TTLs ain't revolutionary
I also don't see how that helps, as you still have your outer edge which needs rebooting to update
there's nothing going on on the main proxy
the proxy connects to a server which could be anything
And so, your solution to not being able to roll updates out, is to literally have a single point which you can't do that with?
Sounds like instead of addressing a fundimental issue, you opted to work around it, or you've literally already got the solution there but aren't applying it
for the record updates is only one of the advantages I've found
I mean, proxy in proxy will work
It's just one of those things where I can't really see a sane reason why you'd want to do it outside of not wanting to solve other issues
do you not acknowledge a single advantage to this solution? I understand how you wouldn't want to support the feature in the future, but I'm not sure if you're still 100% no on the topic
I can see advantages
But, those issues can be solved elsewhere in a manner which the software actually supports
or the other way around ๐
point is, and I give it to you, people would start using this setup as a round robin
which is obviously wrong
Personally, I think it's stupid and there are obviously better solutions out there than adding another layer of hack
In terms of the project, it's not something I have an interest in supporting
and from my perspective it's brought more good than it has taken away, but fair enough I respect your view
also any plans on actually adding implementations of Tablist?
I see there's some todos but I'm not sure if that's on you or on md5
todos are mostly on mds side
that's upstream (read: md5) side
There is some level of "if I touch stuff, I break bungee"
wdym haha
Forge 1.13+ is on my todo list
But honestly, for that, I kinda wanna see if it's viable to rip apart bungees existing implementation
Buuuuut I can't do that because then I break other stuff that depends on that
(and md has stated he has no intent of supporting forge going forward, so this is the joyous fun moments of maintaining waterfall...)
anyway if you want entirely custom stuff or just to experiment, make your own fork like i did
yea thats what I'll probably do, only burden on me is to keep pulling from upstream every now and then
see how travertine is built
Yea, literally just fork travertine
i copied scripts from travertine, renamed them and that's it
mikro cord
dab
no issues exist if you don't have reports
tada
better than leafcord, which is a burning pile of crap
my fork has bunch of questionable patches as well :D
like i said... just to experiment 
mfw bytecord talking trash
ok
I'll look, on the phone now, thanks tho!
Okay this is a bit of a tricky question- is there any sort of endorsed way to add protocol translation adapters to Waterfall? I am doing what ViaVersion is but it just isnโt gonna cut it

No
Basically, such behavior will never be endorsed
and honestly, doing it on the proxy is probably the worse way
Yes I understand that fully. The issue is that I am facing a ton of different server implementations
And working with each on that level is next to impossible
Basically
the way viaversion does it is probably the best way
No matter what you're going to have to hijack the networking stuff to inject into there
be that directly via a plugin or modifying the server itself
^ what I mean by that is that I am working with bedrock servers. I am a moderator and dev for Waterdog and the ton of different implementations for bedrock servers make this extra hard
The way viaversion itself does it is cleaner in some ways, but you do hurt yourself in the long run from it
and bedrock is going to be a whole different beast
You ever heard of Waterdog? A waterfall fork that supports bedrock and servers and players

Are you actually wanting to do translation between versions or just support passing connections through?
and I've seen it
Basically, the way that viaversion does it is more maintainable in the long run
But also not the best in terms of compat/performance
Yes I know but for me that way is next to impossible to use because of the oddities raknet brings
like what?
if you know the two versions surely you can just rewrite stuff as needed
You are going to have to figure out how to handle data changes between the two versions, e.g. items, etc
Yes but translation between java and bedrock and back is a bit more on the taxing side of things
Oh yea also, what qualifies someone as No table here?

That's going to be shit no matter how you do it
Yea but I knew that before I started it, haha
Well back to making API for the protocol adapter
Thanks for the quick response I really appreciate it
Really shoulda forked travertine insteada waterfall
The difference with forking travertine woulda been that your patches woulda been solely over waterfall vs being a mangle of waterfall and your own set of patches
Yea I have to fix that in the near future

Even with all this Waterdog is now surprisingly stable. 104 pocket edition and 51 java edition players at once and still going strong
Sadly that makes Waterdog the only real bungee solution for bedrock that doesnโt depend on one server implementation (like synapse)

How do I run a task in the main thread from the proxy scheduler?
There is no main thread
Is there a way to get the current server a player is on it? I tried that with p.getServer().getInfo().getName() but somehow it returns null
When the player is nowhere, p.getServer() is null
A player is nowhere when he's connecting, or when the server he was on just shut off and no server where available.
I'm using PostLoginEvent and get the player with ProxiedPlayer p = e.getPlayer(); I'm connected to the lobby server so it should be working or not?
If u are getting a null value, it's that at this moment you are not connected yet to your lobby server
yeah postlogin is proxy login, not server login
i believe theres serverconnectedevent
or something along the lines
@spring bloom You don't need your packet limiter due to waterfall having it?
does waterfall limit packets
no
that solves that
#PRThePacketLimiterIntoWaterfall
@chilly coral Do you know how i can check if the player is connected and then show the current lobby?
if you could not ghost ping that would be greeat
@fossil gull what do you want to do exactly ?
When a player comes to the server, the current server should be displayed in the tablist. Example: Lobby-1 / Lobby-2
You are not using the good event
PostLogin is triggered after the mojang authentication
The good event is ServerConnectedEvent i think
Hey, if I send a player to another server that's down, how do I know that it's down? and how do I cancel sending the player?
As far as I know, Bungee doesn't know if a server is online, it just tries to forward the connection regardless (might be wrong)
So you may need to use a messaging system to determine that.
Messaging/caching
yeah, thinking about sending a message to bungee to cancel the join event for the player
so like after 10 ticks, send the uuid to bungee
with redis or something
Well, or really just dynamically add/remove servers to Bungee based on whether the server is online, determined by messages
Can't join a server if it's not added
Yea, bungee just tries to connect them, which is really the only reliable way to tell if you can connect
Real downfall is that it didn't look like it gave you much in the means of trying to control the outcome
Yeah, since you can't control the outcome, you have to control the process.
yeah, kinda hard when it's all on the paper nodes and not bungee
Servers I know that do this usually just use something like Redis along with preventing players from trying to connect to a server if their state is offline according to the Redis cache
You can also use Redis of course to send messages indicating that a server has gone offline or come online
Gonna try it out, thanks ๐
guys I'm new to Waterfall programming
do I have to add Waterfall as external library?
or do I have to use BungeeCord
Is there a way to get the dynmaps from two Waterfall-Servers onto one Page so its possible to switch between them on the sidebar?
FIX the food dupe u dumbfucks
Throwing attitude in the completely wrong channel, 10/10
What ? I though calling developers names in completely unrelated channel guarantees fixing of any issues
Already tried that, but cant download it as the external site does not exist anymore
https://github.com/Cube-Space/Dynmap-Multiserver Compile it?
Oh... didnt see that, thanks
Did you give up very quickly? ;p
I have to admit that waterfall is kind of low priority right now ๐
I know
Dynmap-MultiServ just merges several Dynmap maps from several Spigot/Paper/Bukkit servers.
into one solution for a website.
But I use waterfall to run/proxy these servers...
Yes?
Yes
Hello !
Any ideas when p.getViewDistance() will be back on paper 1.14 ?
whenever somebody gets to fixing it
There is a PR open on the tracker, beyond that, wrong channel
I've delayed fixing it until per-player mob spawning is approved & merged
contains the util I want to use (and will have to use) for it
LOL
I totally didn't forget to go do that
Any way to send a player from ServerA to ServerB from serverB?
Like have a plugin on ServerB tell bungee to send the player over?
Yes
You just need a way to speak to the proxy
Whiiiiiich if there are no players online on server B, you'd need to use a proper messaging service
@cyan garnet you could also use RMI if you're only interacting with JVMs c:
rmi?
The servers aren't on the same machine, and already set it up with redis.
I send the uuid and target server on a channel and send the player when bungee gets it ๐
you can do rmi accross separate machines iirc
but yea in that case just use redis and ignore me xd
How can I geht players which are nearby a Player?
Could this work? java List<Entity> nearbyPlayers = ((Player) sender).getNearbyEntities(<distance/2>).stream().filter(e -> e instanceof Player).collect(Collectors.toList());
That should work, yes.
and how to get Player objects from the Entity objects?
Since you know that the entities are players, you can cast them.
okay.
List<Player> nearbyPlayers = ((Player) sender).getNearbyEntities(32,256,32).stream().filter(e -> e instanceof Player).map(e -> (Player) e).collect(Collectors.toList());```
right?
Yes, that should work.
Thanks a lot!
i recall a conversation here about the performance difference between getNearbyEntities and manually comparing player distances
bottom line was that the former is more performant for smaller ranges
but for anything larger you want to look at the players' distances instead
Probably @dark perch
yes
Ty
or jdbc
uhhh
jdbc is part of java?
but yes, it does include MySQL
however bit old library
one day we'll get updated libraries
but muh backwards compat?
heh
I made the decision to not include any DB connectors in Velocity
Our network uses PostgreSQL ๐
is there a way to stop my plugin from starting in onenable?
setEnabled(false) and then return early
Should Plugin have a setEnabled() method?
Neither Bungee nor Waterfall provides that method though.
yeah i cant find it
As a temporal solution, you can return early and inform the console that the plugin is not going to work.
yeah i was thinking just doing that before registering anything
However, I don't think this is a good idea to implement this kind of system to Bungee as this may break a lot of plugins since they don't actually except plugins to be loaded but disabled.
Hello.
I would like to ask you what does "forge_support" do when I set it to "true"?
I can send messages with my Forge mod to the PaperMC server throught a channel?
Version: 1.14.4
that is entirely independent
the plugin channel system works regardless of whatever else
that's a mojang protocol, not a bukkit/bungee one
1.14 forge isn't supported at all at this point
hey, how to get the Protocol version from a server in my bungeecord network?
ah got it
e.getTarget().ping((arg0, arg1) -> {
if (e.getPlayer().getPendingConnection().getVersion() != arg0.getVersion().getProtocol()) {
e.setCancelled(true);
p.sendMessage(new TextComponent("ยงcDer Server, den du betreten mรถchtest, ist auf einer anderen Version."));
}
});
As Bungee supporting ProxiedPlayer#isForge, there is a method to retrieve client mod list'
?
i think ive tried for months to get something like that working
mostly trying spigot behind bungee
never could figure it out lol
@bleak current Saw your zlib-ng stuff in MikroCord (since at Mineteria we are looking to squeeze even more performance and reduce the time people have to spend for server switches). So zlib-ng has now landed for Velocity 1.1.0.
๐
I also made sure it actually did result in a perf boost by profiling it locally. I'm satisfied with the results of my testing.
i don't know proper ways how to profile it
how did you, and can i see the results?
i just threw it in, still have profiling task in my todo list but never managed to allocate time for that
my methodology was pretty unscientific
yourkit (async sampling woo!) + flying around
lmao
fair enough
though i'll try to port bungee api on top of velocity (as a plugin) this week
because why the fuck not
inb4 i'll succeed and velocity usage ramps up

Hey, does anyone know what repo/dependecy to use for plugin development using maven?
Lol didn't see that. This channel seemed like the right place for this haha
yea but it was literally just answered there
Yes, thanks! ๐
I'm having issues generating docs for waterfall
[[1;31mERROR[m] [1;31mExit code: 1 - /var/lib/jenkins/workspace/WaterLand/WaterLand-Proxy/api/target/generated-sources/delombok/net/md_5/bungee/api/connection/Connection.java:5: error: package net.md_5.bungee.protocol does not exist[m
[[1;31mERROR[m] [1;31mimport net.md_5.bungee.protocol.DefinedPacket;[m
[[1;31mERROR[m] [1;31m ^[m
[[1;31mERROR[m] [1;31m/var/lib/jenkins/workspace/WaterLand/WaterLand-Proxy/api/target/generated-sources/delombok/net/md_5/bungee/api/connection/Connection.java:76: error: cannot find symbol[m
[[1;31mERROR[m] [1;31m void sendPacket(DefinedPacket packet);[m
[[1;31mERROR[m] [1;31m ^[m
[[1;31mERROR[m] [1;31m symbol: class DefinedPacket[m
[[1;31mERROR[m] [1;31m location: interface Unsafe[m```
getting that
many times
mvn -B -s /var/lib/jenkins/ws-conf/nexus.xml source:jar javadoc:jar javadoc:aggregate deploy -Dbuild.number=$BUILD_NUMBER -P deployment thats the command i run
I want to create a TextComponent chat message. I tried several things but every time the line breaks are in the mid of a word. I tried ComponentBuilder and TextComponents but I'm unable to find a way that the line breaks are not in the middle of a word. What's the reason for that "let's split words". The ComponentBuilder works fine on spigot
Waterfall uses the same API as bungee which is also used in spigot
We don't get to control where the client splits text
okay, leading whitespace in a text component is evil. new ComponentBuilder(..).append(" this will break things").create(); vs new ComponentBuilder(..).append("this will work fine.").create();
Helllo,
I have write an custom an custom event system (for have same event on bungee and spigot). For this i have copy waterfall-event and methods for register listeners and call event on PluginManager.
This is perfectly work but on Intellij idea the event is not recognized as an even (so he says the method is not used) :(
I search how i can obtain the result of 2.
Thanks.
Difference :
@brazen anvil you could potentially alt+enter on the method name "onCooldownEnd" and see if there's an option that reads something along the lines of "disable inspection of methods annotated with @EventHandler"
If that doesn't show up, go to Settings > Editor > Inspections > Java > Declaration redundancy > Unused declaration > Annotations and then Add Annotation Class.
Oki, hanks but what is the reason have different behavior between my event system and bungee or bukkit event system
It might be that you only marked that method as an access point, or based on some other pattern that isn't there. IntelliJ also often does its own checks in the back to automatically help you, so IntelliJ may have decided at some point to mark those methods as access points, but not the other one.
oki, that is strange
Something sent a bad packet
It should disconnect them, there ain't too much we can do given that the app has a singular job which is to handle connections
Hm, we could avoid the exception
Not in all of the cases, only some specific ones
e.g. the one you linked there, we can't really do much about
Actually, the one you linked first, we can't do too much about
The issue is really down to how packets are sent, if a packet is truncated, we can't really determine that too well
(If they have some marvellous fix for that stuff, they should really PR them vs tryna keep them private, but you know, what does software licensing stand for... :L )
theoretically you can check if most packets are truncated or not
if you think then all packets must consist of minimum n bytes - gets trickier with packets which contain variable length data, but if you think how vanilla works then you kinda can enforce even stricter limits (e.g plugin message payload is never empty)
You can, but people will just start sending garbage above the minimum. The correct solution for this is to temporary ban the ip address that spams this, just like with any Ddos.
mnyeah in the end checking if packet is truncated wastes performance
only a little bit, if done correctly
so one should simply check how many bad packets said IP sends and then slams with 
How would you guys write a cross server homes plugin?
Store each players home on the bungee and have the bungee instance handle the commands and tab completions etc and have plugins on each server that handles teleportation.
Or have each server keep a record of the homes across all server and make them send the player and the coords over to the target server
I would have a temp cache for each server and whenever they leave, store their homes in a database from the cache and then clear their cache. Then when they join, cache their homes from the database.
or you could just store all the data on bungee with whatever, and use plugin channels or sockets to send/update the data which wouldn't require a plugin for every server
What context should I provide if I'm trying to serialize/deserialize a TextComponent?
nvm, discovered ComponentSerializer
In waterfall, should each command have its own class?
in waterfall (and bungee), that's the only way to do commands iirc
if I register a command for Waterfall/bungeeCord will it automatically work on every backend?
or only on the proxy server
as proxy processes commands before any other server, then it'll technically work anywhere
except that servers won't know about it, unless you set up some kind of a special communication
I'm probably doing this incorrectly. I'd like to get the ServerPing result out of the Callback some how and use it to make a queue system and monitor playercount. Am I going about this the wrong way using ServerInfo.ping() ?
Ideally I'd like Waterfall to monitor player count on a sub-server and when a slot is available send the queued player. However, the only way I see of getting playercount and maxplayers is using ServerInfo.ping()
ServerInfo#ping() is pretty the way you'd want to do it
I'm having some trouble with plugin messaging. BungeeCord doesn't seem to recieve said message. Here is some code:
//SpigotMain.java
getServer().getMessenger().registerOutgoingPluginChannel(this, "myserver:commands");
//Spigot Message sender thingy
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF(((Player) sender).getUniqueId().toString());
out.writeUTF("creative");
((Player) sender).sendPluginMessage(SpigotMain.INSTANCE, "myserver:commands", out.toByteArray());
//BungeeCord listener
@EventHandler
public void onPluginMessageReceived(PluginMessageEvent event) {
System.out.println(event.getTag());
if (!event.getTag().equalsIgnoreCase("myserver:commands")) {
return;
}
However, it seems myserver:commands is never outputted in waterfall when I run the commands, which seems it's not reaching bungee
Only thing is outputted is:
[01:38:03 INFO]: BungeeCord
[01:38:03 INFO]: BungeeCord
[01:38:03 INFO]: BungeeCord
and a few minecraft events when I join fir the first time
unless I have to do like "bungeecord:myserver"? Let me try that
no dice. :/ i'll keep testing
Ahah! Fixed it. I had to do:
getProxy().registerChannel("myserver:commands");
Which is called first? PlayerHandshakeEvent or PreLoginEvent?
handshake
is there any event / way for me to cancel a connection before that (for example by injecting into netty?)
why do you need to do that?
do you want to reject connection based on ip or something?
yeah
want to do a firewall against minecraft botting
if i do it on PreLoginEvent it's already going to be screwing up the bungee
if i do it when the connection actually starts i have the benefit of blocking the connection before it becomes a real issue
similar to ```java
getProxy().registerChannel("myserver:commands");
is anything like this needed on Paper/spigot to register custom incoming channels opposed to the default ones
getServer().getMessenger().registerIncomingPluginChannel(<your plugin instance>, "myserver:commands", <instance of PluginMessageListener>);
Yep I have that all set, however, it doesn't seem to be recieving anything
and you use a custom channel, like "myserver:commands" not just bungeecord?
ideally wanting to do a cross server TP. so, this is the main bit of code atm
player.connect(target.getServer().getInfo(), new Callback<Boolean>() {
@Override
public void done(Boolean isPlayerConnected, Throwable error) {
if(!isPlayerConnected) {
player.sendMessage(new ComponentBuilder(Main.PREFIX).append("Error connecting to server").reset().create());
return;
}
//Output teleport command
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("teleport");
out.writeUTF(player.getUniqueId().toString());
out.writeUTF(target.getUniqueId().toString());
player.sendData(Main.PLUGIN_COMMANDS, out.toByteArray());
}
});
So this teleports me to said server, but the datastream isn't being picked up by Paper which is along the lines of
Spigot Main
getServer().getMessenger().registerIncomingPluginChannel(this, Main.PLUGIN_COMMANDS, new CommandMessage());
CommandMessage
public class CommandMessage implements PluginMessageListener {
@Override
public void onPluginMessageReceived(String channel, Player player, byte[] message) {
System.out.println(player);
System.out.println(message);
//Make sure channel is correct
if (!channel.equalsIgnoreCase(Main.PLUGIN_COMMANDS)) {
return;
}
ByteArrayDataInput in = ByteStreams.newDataInput(message);
String commandToRun = in.readUTF();
System.out.println(commandToRun);
//Check if command in IF and send to correct handler
if(commandToRun.equalsIgnoreCase("teleport")) {
UUID sender = UUID.fromString(in.readUTF());
UUID target = UUID.fromString(in.readUTF());
BungeeTeleportCommand.teleport(sender, target);
}
}
}
make sure that you actually register the message listener
with registerIncomingPluginChannel?
yes
Yes that's in main
You can have an outgoing and incoming on the same channel name right?
yes
also plugin channel name checking is redundant, unless you want to listen to multiple channels using one listener
will adjust that
excuse the messy code as I haven't touched plugins in a while
especially channels
eh, i've seen worse
i've written worse
but alright - i'll head to sleep now. good luck
Thanks, I will post here with any updates
if anyone else knows, by using a callback in Player.connect, I assume it will wait until the connection is complete before sending said plugin message
so it's possible it sending the output to the old server
connection might not be that far to pass plugin messages to the server
docs state this ```yaml
/**
* Connects / transfers this user to the specified connection, gracefully
* closing the current one. Depending on the implementation, this method
* might return before the user has been connected.
*
* @param target the new server to connect to
* @param callback the method called when the connection is complete, or
* when an exception is encountered. The boolean parameter denotes success
* (true) or failure (false).
*/
so it makes sense to
i'd wait for ServerSwitchEvent
and then pass the data
that of course involves some advanced hackery
okay maybe not so much, but for beginners like you very likely
anyway, e.g in callback you put an entry to map which will be read on ServerSwitchEvent
there might be some pitfalls, due to the nature how bungeecord is built up. make sure that you synchronize such map accesses etc.
thanks for the point in the right direction
looking at some source code of other teleporter is a bit strange. They do theplayer.connect then run the plugin message using ProxyServer.getInstance.runAsync
how intensive is server messaging? is runAsync really necessary?
afaik is just a packet