[SPIGOT-7589] First join after ban expiration results in an internal server error. Created: 19/Feb/24  Updated: 25/Dec/24  Resolved: 22/Feb/24

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Matthew Lester Assignee: Doc
Resolution: Fixed Votes: 0
Labels: bans, nullpointerexception, player, server
Environment:

Running with JRE 17.

One plugin enabled as described below.


Attachments: PNG File stacktrace.png    
Version: CraftBukkit version 4049-Spigot-c198da2-5bf12cb (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT)
Plugin: (custom)
Guidelines Read: Yes

 Description   

Steps to recreate:

  1. Create a new Spigot plugin (API version 1.20)
  2. Create a new command in said plugin.
  3. In the command, ban the player that ran the command using Player#ban.
    I have tested with both Duration and Date variants of the method.
  4. After the ban expires, join the server.
  5. See that an internal server error has occurred and that the player did not successfully join the server.
  6. See that on the next join attempt, the player can join as normal.

Stack trace attached.



 Comments   
Comment by Matthew Lester [ 21/Feb/24 ]

Brilliant, thanks for the information!

Comment by Doc [ 20/Feb/24 ]

I make tests and this is caused by a vanilla behaviour when check the bans i make a PR for handle that in: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/1359/overview

Generated at Sat Dec 13 13:39:07 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.