Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlayerLoginEvent.Result.KICK_OTHER not handled correctly. #4605

Open
InstantlyMoist opened this issue Apr 25, 2024 · 3 comments
Open

PlayerLoginEvent.Result.KICK_OTHER not handled correctly. #4605

InstantlyMoist opened this issue Apr 25, 2024 · 3 comments

Comments

@InstantlyMoist
Copy link

InstantlyMoist commented Apr 25, 2024

Describe the bug

When you use a Spigot plugin, that for some reason disallows the PlayerLoginEvent as follows (simple example)

@EventHandler(priority = EventPriority.MONITOR)
    public void onPlayerLogin(PlayerLoginEvent event) {
       event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Bye!");
     }

The mesage 'bye' will not appear and the Bedrock client gets stuck on 'locating server'. Also any further (non denied) joins will not work anymore until rebooted. Your client will appear ingame though.

Changing the reason to KICK_WHITELIST, does allow the message to appear and join back fine.

To Reproduce

Kind of described in the issue itself, let me know if you want a small custom plugin that does this.

Expected behaviour

Message would be shown, and future (allowed) joins would go ok.

Screenshots / Videos

No response

Server Version and Plugins

[16:07:19 INFO]: This server is running Paper version git-Paper-1620 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)
[16:07:19 INFO]: Previous version: git-Paper-e3bf31e5f (MC: 1.12.2)
[16:07:19 INFO]: Checking version, please wait...
[16:07:23 WARN]: java.lang.NumberFormatException: For input string: ""
[16:07:23 WARN]: at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
[16:07:23 WARN]: at java.base/java.lang.Integer.parseInt(Integer.java:658)
[16:07:23 WARN]: at java.base/java.lang.Integer.valueOf(Integer.java:963)
[16:07:23 WARN]: at java.base/java.lang.Integer.decode(Integer.java:1448)
[16:07:23 WARN]: at org.bukkit.command.defaults.VersionCommand.getFromJenkins(VersionCommand.java:295)
[16:07:23 WARN]: at org.bukkit.command.defaults.VersionCommand.getDistance(VersionCommand.java:266)
[16:07:23 WARN]: at org.bukkit.command.defaults.VersionCommand.obtainVersion(VersionCommand.java:214)
[16:07:23 WARN]: at org.bukkit.command.defaults.VersionCommand.access$000(VersionCommand.java:37)
[16:07:23 WARN]: at org.bukkit.command.defaults.VersionCommand$1.run(VersionCommand.java:199)
[16:07:23 WARN]: at java.base/java.lang.Thread.run(Thread.java:835)
[16:07:23 INFO]: Unknown version

Geyser Dump

https://dump.geysermc.org/0s0aEMPz0FtUGFNai6zT00tOo4frjP1Y

Geyser Version

This server is running Geyser version 2.2.3-SNAPSHOT (git-master-2471de1) (Java: 1.20.4, Bedrock: 1.20.40/1.20.41 - 1.20.80)

Minecraft: Bedrock Edition Device/Version

latest downloaded from the launcher (pc)

Additional Context

No response

@Camotoy
Copy link
Member

Camotoy commented Apr 25, 2024

A small plugin to test this would really help us out. :)

@InstantlyMoist
Copy link
Author

A small plugin to test this would really help us out. :)

On it! :D

@InstantlyMoist
Copy link
Author

Actually, it's not reproducable on my local machine at all (same plugins, everything as i took a backup and copied it)... Could it be something firewall-ish related together with a higher ping than a local machine?

Either way, here is a plugin with the same logic:
https://drive.google.com/file/d/1zqZSBN5g20PQC-uM2xJRV2rWel6OD0RO/view?usp=sharing

It has a 'togglegeyserkick' command, kicking logic is enabled by default. It will also show a little debug line when joining so u can see if they get kicked or not.

If you want I could DM u the server IP where it does happen on, just a weird occurrence I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants