spigot despawn entity

Java
entity.remove() // this will mark it for removing
Source

Also in Java: