diff --git a/src/main/java/net/slqmy/template_paper_plugin/custom_entity/AbstractCustomEntity.java b/src/main/java/net/slqmy/template_paper_plugin/custom_entity/AbstractCustomEntity.java index f8030c36..2e6db4cc 100644 --- a/src/main/java/net/slqmy/template_paper_plugin/custom_entity/AbstractCustomEntity.java +++ b/src/main/java/net/slqmy/template_paper_plugin/custom_entity/AbstractCustomEntity.java @@ -29,7 +29,7 @@ protected AbstractCustomEntity(TemplatePaperPlugin plugin, CustomEntityManager c protected abstract E generateCustomEntity(E baseEntity); - public Entity getCustomEntity(Location spawnLocation) { + public E getCustomEntity(Location spawnLocation) { E entity = (E) spawnLocation.getWorld().spawnEntity(spawnLocation, entityType); entity.getPersistentDataContainer().set(plugin.getCustomEntityIdKey(), PersistentDataType.STRING, entityId.name()); return generateCustomEntity(entity);