Mythic-Projects / Titanium

Titanium is Paper fork which aims to improve performance, fix exploits and bugs, improve API and provide better configuration for server administrators.
GNU General Public License v3.0
4 stars 1 forks source link

Banning players not working #139

Closed c0dingnoobi closed 1 year ago

c0dingnoobi commented 1 year ago

I made sure this issue is not caused by my server environment. Tested on a new environment and ran titanium with default config and without plugins. Banning a player using /ban only kicks the player with the ban message. The player can rejoin immediatly. When banning a player he gets added to banned-players.json.

[
  {
    "uuid": "bd2beaf8-1eaa-43b0-8014-3934595738aa",
    "name": "IFlimingos",
    "created": "2023-04-02 02:19:20 +0200",
    "source": "Server",
    "expires": "forever",
    "reason": "Banned by an operator."
  },
  {
    "uuid": "bd2beaf8-1eaa-43b0-8014-3934595738aa",
    "name": "IFlimingos",
    "created": "2023-04-02 02:16:48 +0200",
    "source": "Server",
    "expires": "forever",
    "reason": "Banned by an operator."
  }
]

Player has no operator permission (or any permissions at all). Reproduceable regardless if command is issued from console or as player command. Using 0e28735d8ee52f3133f1795919612d17e8a5ddf6 (123th devbuild)

necomadev commented 1 year ago

Is your server connected to a proxy?

necomadev commented 1 year ago

Is your server connected to a proxy?

Forget it. It doesn't make any difference, I thought that proxies might manipulate uuids, but that's not the case. I compared the standard method of Spigot and Titanium to check if a player is banned, and it seems to be the same. You can check it yourself, just check the attemptLogin method in PlayerList, you'll find everything I checked there.

P3ridot commented 1 year ago

Sorry for late response, but on standard spigot/paper everything works fine?

GeorgeV220 commented 1 year ago

More info:

    @EventHandler
    public void onLogin(PlayerLoginEvent playerLoginEvent) {
        getLogger().info(playerLoginEvent.getResult().name());
        getLogger().info(String.valueOf(playerLoginEvent.getPlayer().isBanned()));
    }

when I join after I ban myself returns: [21:45:35 INFO]: [Test] ALLOWED -- Result [21:45:35 INFO]: [Test] true -- If the player is banned

if I remove the ban using essentials unban or minecraft pardon command the user will not be removed from the banned-players.json but then if I join the message will be: [21:45:53 INFO]: [Test] ALLOWED [21:45:53 INFO]: [Test] false

I believe an issue like this existed in paper 1.9 and fixed in 1.10? I'm not sure tho