Comments (15)
@md-5 Is there a reason we don't call the event at this point?
I also noticed that the event is not always called (if the server is closed for example). And that's why fallback plugins don't always work properly on BungeeCord
from bungeecord.
If there's actually a kick it should be called
from bungeecord.
Yes there is no kick i have read your old comments on old prs, but what do we do? how can we handle it so the player does not get disconnected from the proxy
from bungeecord.
I am also a bit confused if i kill the backend server, the first event called is the PlayerDisconnectEvent and the handlerboss first closes the players connection and after that the connection to the server.And than the ServerDisconnectEvent is called
Shoulnt it be the other way around?
https://outfluencer.dev/data/bungeelog.txt
for contect bungee is on 25577 backend on 25565
from bungeecord.
If there's no kick then a different event should be used and this bug is invalid.
Wouldn't the event be ServerDisconnectEvent?
from bungeecord.
yes but you cant cancel the disconnection of the player
from bungeecord.
look into my log please the PlayerDisconnectEvent is called before the ServerDisconnectEvent
and the handlerboss has instantly marked the connection from the player as closed
Edit:
I printed the executed events in the logs
also i printed channelInactive of HandlerBoss
Edit of edit:
ignore that it was bullshit
from bungeecord.
If there's actually a kick it should be called
In fact, it's not a kick by the code, but a kick by the force connection closed with the backend server.
It's not a basic move or basic disconnect, so it more apply to kick, and that would be helpful for more compatibility with waterfall users and less dev for you to use the ServerKickEvent
from bungeecord.
If there's actually a kick it should be called
In fact, it's not a kick by the code, but a kick by the force connection closed with the backend server.
It's not a basic move or basic disconnect, so it more apply to kick, and that would be helpful for more compatibility with waterfall users and less dev for you to use the ServerKickEvent
nvm i think i was just stupid and dont understand what actually happend
You need to put the priorities inyou bungeecord config.
If en exception is thrown it will send the player to one of the specified server. if we get a kick the ServerKickEvent is called
from bungeecord.
@md-5 i made a test spigot plugin to show the exact problem
This is the bukkit code. I close the connection without kicking the player
@EventHandler
public void onChat(AsyncPlayerChatEvent event) {
CraftPlayer player = (CraftPlayer) event.getPlayer();
player.getHandle().playerConnection.networkManager.channel.close();
}
this will only call the disconnected(ChannelWrapper channel) method in the DownstreamBridge of BungeeCord
THE PROBLEM IS THAT:
server.isObsolete() returns false and BungeeCord handels it like this
if ( !server.isObsolete() )
{
con.disconnect( bungee.getTranslation( "lost_connection" ) );
}
ServerDisconnectEvent serverDisconnectEvent = new ServerDisconnectEvent( con, server.getInfo() );
bungee.getPluginManager().callEvent( serverDisconnectEvent );
It closes the connection of the player without calling any events before it (i printed all events) here:
11:48:28 [INFORMATION] ChatEvent(super=TargetedEvent(sender=Outfluencer, receiver=net.md_5.bungee.ServerConnection@5ec7547f), cancelled=false, message=gf)
11:48:28 [INFORMATION] localhost/127.0.0.1:25565 [frame-decoder, decompress, packet-decoder, timeout, frame-prepender, compress, packet-encoder, inbound-boss, DefaultChannelPipeline$TailContext#0]
11:48:28 [INFORMATION] MinecraftDecoder channelInactive GAME false
11:48:28 [INFORMATION] inactive localhost/127.0.0.1:25565 -> ChannelHandlerContext(inbound-boss, [id: 0x99867119, L:/127.0.0.1:57169 ! R:localhost/127.0.0.1:25565])
11:48:28 [INFORMATION] disconnect !server.isObsolete()
11:48:28 [INFORMATION] [Outfluencer] disconnected with: Proxy lost connection to server.
so you cant cancel the disconnection of the player by any chance
We would need to call the ServerDisconnectEvent before
we execute this code
if ( !server.isObsolete() )
{
con.disconnect( bungee.getTranslation( "lost_connection" ) );
}
and add a way to cancel the disconnection
from bungeecord.
@Elikill58 i hope #3696 will help you out
from bungeecord.
@Elikill58 i hope #3696 will help you out
So, with that, I should simply set the reconnect server ?
Also, why doesn't simply call the kick event as waterfall did ?
from bungeecord.
because we do not receive a Kick packet from the backend and we already have a fallback functionality with priorities in bungeecord that we can use. (what i did in my pr)
from bungeecord.
@Elikill58 i hope #3696 will help you out
So, with that, I should simply set the reconnect server ?
Also, why doesn't simply call the kick event as waterfall did ?
Also waterfall is a fork of bungeecord
It is not our responsibility to adapt to them.
from bungeecord.
@Elikill58 i hope #3696 will help you out
So, with that, I should simply set the reconnect server ?
Also, why doesn't simply call the kick event as waterfall did ?
and yes not it searches for the next server to fallback like it should, i looked it ub btw watefall does the same but also calling a server kick event. But you dont need that you can use the ServerDisconnectEvent with this PR
from bungeecord.
Related Issues (20)
- Chat Validation Error Issue HOT 4
- Disable responses to InitialHandler handshake pings? HOT 2
- Hacker can log in with player uuid HOT 1
- Connecting Forge servers HOT 3
- When sending a ping to an offline server, a response occurs after 2 seconds. HOT 1
- Bungeecode source not delomboked HOT 10
- Cannot get ID for packet class net.md_5.bungee.protocol.packet.PlayerListItemRemove in phase CONFIGURATION with direction TO_CLIENT HOT 11
- Could not connect to a default or fallback server. Incorrectly configured address/port/firewall HOT 4
- "Your not registerd" How do i fix this? HOT 1
- Bungeecord error for last version HOT 1
- Invalid signature for profile public key HOT 5
- Can't connect to servers - invalid signature key HOT 16
- InitialHandler - could not decode packet!
- Player locale can be null when queried in the PostLoginEvent HOT 4
- Cannot get ID for packet class net.md_5.bungee.protocol.packet.StartConfiguration in phase CONFIGURATION with direction TO_CLIENT @ io.netty.handler.codec.MessageToByteEncoder:125 HOT 2
- Sending components of an item in HoverEvent is not possible HOT 4
- HAProxy layer 7 health-check not possible anymore HOT 11
- Support in ChatComponent API for fetching translation strings on server side HOT 8
- bungeecord player limit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bungeecord.