Remove entity from world on delete
This commit is contained in:
parent
f0c9edfdac
commit
b52aaee628
|
|
@ -4,6 +4,7 @@ import com.alttd.commands.SubCommand;
|
||||||
import com.alttd.config.Config;
|
import com.alttd.config.Config;
|
||||||
import com.alttd.config.VillagerConfig;
|
import com.alttd.config.VillagerConfig;
|
||||||
import com.alttd.objects.LoadedVillagers;
|
import com.alttd.objects.LoadedVillagers;
|
||||||
|
import net.kyori.adventure.text.minimessage.Template;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
|
@ -30,6 +31,8 @@ public class CommandRemoveVillager extends SubCommand {
|
||||||
continue;
|
continue;
|
||||||
LoadedVillagers.removeLoadedVillager(uuid);
|
LoadedVillagers.removeLoadedVillager(uuid);
|
||||||
VillagerConfig.removeVillager(uuid);
|
VillagerConfig.removeVillager(uuid);
|
||||||
|
entity.remove();
|
||||||
|
player.sendMessage(getMiniMessage().parse(Config.REMOVED_VILLAGER, Template.of("uuid", uuid.toString())));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user