use of simplepets.brainsynder.utils.ISpawner in project SimplePets by brainsynder-Dev.
the class PetSpawner method spawnPet.
public static IEntityPet spawnPet(Pet pet, Class<? extends IEntityPet> clazz) {
ISpawner spawner = PetCore.get().getSpawner();
String entity = clazz.getSimpleName().replaceFirst("I", "");
if (spawner == null) {
throw new SimplePetsException("An error occurred when trying to retrieve the PetSpawner Class");
}
return spawner.spawnEntityPet(pet, entity);
}
use of simplepets.brainsynder.utils.ISpawner in project SimplePets by brainsynder-Dev.
the class PetSpawner method spawnPet.
public static IEntityPet spawnPet(Location location, Pet pet, Class<? extends IEntityPet> clazz) {
ISpawner spawner = PetCore.get().getSpawner();
String entity = clazz.getSimpleName().replaceFirst("I", "");
if (spawner == null) {
throw new SimplePetsException("An error occurred when trying to retrieve the PetSpawner Class");
}
return spawner.spawnEntityPet(location, pet, entity);
}
Aggregations