Getting disconnect reason [NOT BUYING]

Status
This thread has been locked.

M4T14SG4M3R

PapuHost Game Hosting CEO
Premium
Feedback score
0
Posts
278
Reactions
77
Resources
0
I was trying to add a simple feature to my plugin, and i was searching on forums if is possible to get the disconnect reason but i only found the kick reasons and not the disconnect one, i need to check the "Timed out" reason so i can send it to staff to inform that a player lagged out and didn't disconnected himself like "[Alert] %player% has timed out", so if he goes to ts3 to inform that he died because of lag it will more easily to check if he really lagged out or just disconnected
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Rj

PhD Candidate, Control Theorist
Supreme
Feedback score
7
Posts
730
Reactions
221
Resources
0
this is where you buy plugins not a support forum. go on spigot or something.
 

M4T14SG4M3R

PapuHost Game Hosting CEO
Premium
Feedback score
0
Posts
278
Reactions
77
Resources
0
this is where you buy plugins not a support forum. go on spigot or something.
If you are here to trash just leave. There are a lot of people requesting help and everyone answer with no problem because they doesn't care only on money, just an example this one. This section is called Plugins, not Plugin Shop or Plugin Market.
 
Last edited:

M4T14SG4M3R

PapuHost Game Hosting CEO
Premium
Feedback score
0
Posts
278
Reactions
77
Resources
0
If you are the one coding it, detect the kick reason and specify it by that.
As i said before, it doesn't work, since the Timed out isn't a PlayerKickEvent, i tried with this two codes

Code:
    public void onFlyKick(PlayerKickEvent event) {
        if (event.getReason().equals("Flying is not enabled on this server")) {
            // code;
        }
    }

Code:
    public void onLagOut(PlayerKickEvent event) {
        if (event.getReason().contains("Timed out")) {
            // code;
        }
    }

But only the first one has worked
 

M4T14SG4M3R

PapuHost Game Hosting CEO
Premium
Feedback score
0
Posts
278
Reactions
77
Resources
0
It's just not Timed Out, there are many different timed out messages. Just looked them up
Can you tell me what are those more messages to check if it works with the other timed out reasons?
 

Rj

PhD Candidate, Control Theorist
Supreme
Feedback score
7
Posts
730
Reactions
221
Resources
0
If you are here to trash just leave. There are a lot of people requesting help and everyone answer with no problem because they doesn't care only on money, just an example this one. This section is called Plugins, not Plugin Shop or Plugin Market.
But It’s a market. Do you know what a market is no? Here’s the definition from google
.
an area or arena in which commercial dealings are conducted

The area is the forums which is holding commercial deals. Where does it say anything about support. And spigot has a dedicated section for plugin support.
 

Missionary

Premium
Feedback score
2
Posts
313
Reactions
245
Resources
0
I'm not sure why you would want to check this since player's can just pull their router to simulate the effect of a timeout. In multiplayer Minecraft (and most other games) the server and the client use keep alive packets to make sure that the connection going both ways (server -> client, client -> server) is good. So if the server doesn't receive the response to the keep alive packet within ~30 seconds (depends on the server version, since paper lengthens it from the default 25 seconds) the server will kick the client and vice versa.
 
Last edited:
Status
This thread has been locked.
Top