[SPIGOT-7532] Entity#isValid() returns false after server restart Created: 06/Dec/23  Updated: 25/Dec/24  Resolved: 06/Dec/23

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

Type: Bug Priority: Major
Reporter: 56738 Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: API

Attachments: Java Source File Main.java     Java Archive File TestPlugin-1.0-SNAPSHOT.jar    
Version: This server is running CraftBukkit version 3956-Spigot-9d72885-5a7080b (MC: 1.20.3) (Implementing API version 1.20.3-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

Entity#isValid() returns false for all entities after restarting the server.

Steps to reproduce:

  1. Summon an entity: /summon minecraft:pig
  2. Call isValid() on the entity, it will return true
  3. Stop and restart the server
  4. Call isValid() on the entity, it will return false

The attached test plugin prints the value of isValid() when you right-click an entity.

Entity#isInWorld() also returns false. Most likely caused by https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/915/overview.


Generated at Sat Dec 13 15:25:10 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.