use of com.magmaguy.elitemobs.config.custombosses.CustomBossesConfigFields in project EliteMobs by MagmaGuy.
the class SpawnCommand method spawnCustomBossCommand.
public static void spawnCustomBossCommand(CommandSender commandSender, String fileName, String world, Vector coords, int level) {
try {
Location location = new Location(Bukkit.getWorld(world), coords.getX(), coords.getY(), coords.getZ());
CustomBossesConfigFields customBossesConfigFields = CustomBossesConfig.getCustomBoss(fileName);
if (customBossesConfigFields == null) {
commandSender.sendMessage("Filename " + fileName + " is not valid! Make sure you are writing the name of a configuration file in the custombosses folder!");
return;
}
CustomBossEntity customBossEntity = new CustomBossEntity(customBossesConfigFields);
customBossEntity.setSpawnLocation(location);
customBossEntity.setLevel(level);
customBossEntity.spawn(false);
} catch (Exception e) {
commandSender.sendMessage("[EliteMobs] World argument was not valid!");
}
}
Aggregations