From b52aaee6285722280ef6a94631539751e497bf14 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Thu, 23 Dec 2021 22:51:12 +0100 Subject: [PATCH] Remove entity from world on delete --- .../com/alttd/commands/subcommands/CommandRemoveVillager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/alttd/commands/subcommands/CommandRemoveVillager.java b/src/main/java/com/alttd/commands/subcommands/CommandRemoveVillager.java index 99837a5..85a2a2f 100644 --- a/src/main/java/com/alttd/commands/subcommands/CommandRemoveVillager.java +++ b/src/main/java/com/alttd/commands/subcommands/CommandRemoveVillager.java @@ -4,6 +4,7 @@ import com.alttd.commands.SubCommand; import com.alttd.config.Config; import com.alttd.config.VillagerConfig; import com.alttd.objects.LoadedVillagers; +import net.kyori.adventure.text.minimessage.Template; import org.bukkit.command.CommandSender; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; @@ -30,6 +31,8 @@ public class CommandRemoveVillager extends SubCommand { continue; LoadedVillagers.removeLoadedVillager(uuid); VillagerConfig.removeVillager(uuid); + entity.remove(); + player.sendMessage(getMiniMessage().parse(Config.REMOVED_VILLAGER, Template.of("uuid", uuid.toString()))); } return true; }