[SPIGOT-6837] Entity.remove() does not release POI's Created: 08/Dec/21  Updated: 08/Dec/21  Resolved: 08/Dec/21

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

Type: Bug Priority: Major
Reporter: JugH3ad Assignee: Unassigned
Resolution: Done Votes: 0
Labels: API, bug
Environment:

windows 10 OS, OpenJDK 64-Bit Server VM Zulu17.30+15-CA, localhost


Attachments: PNG File image-2021-12-07-18-28-22-988.png     PNG File image-2021-12-07-18-29-24-100.png     PNG File image-2021-12-07-18-32-36-887.png    
Version: 3284-Spigot-3892929-0ebef35
Plugin: Code attached in description
Guidelines Read: Yes

 Description   

running entity.remove() on a villager who has claimed a bed, or jobsite, does not reset the poi - free_tickets claimed by the villager.

Potential other POI effects may be Bells, Bee Hives, etc. where free_tickets can be reduced to 0.

 

Reproduction:

Create and load a simple plugin

package my.test.runs;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.plugin.java.JavaPlugin;
public final class Main extends JavaPlugin implements Listener {
    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this,this);
    }
    @EventHandler
    public void onPlayerInteractEntity(PlayerInteractEntityEvent event){
        event.getRightClicked().remove();
    }
} 

Create a "Point of Interest" such as a bed(Image shows 4 beds with free_ticket of 1)

Spawn/or lead a villager to claim said bed(Image shows 4 villagers have claimed 4 beds, free_ticket = 0)

run Entity.remove() on any said villager.( Image shows removed villagers but does not set the free_ticket for poi back to 1)



 Comments   
Comment by JugH3ad [ 08/Dec/21 ]

So it is in the 1.18 version. Thanks for correcting this and sorry the bug report was late after our discord discussion.
Reproduction issue revolved around running buildtools with no switches that is producing an "out of date server" by 40 versions.

Comment by md_5 [ 08/Dec/21 ]

This was already fixed

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