()
| 575 | } |
| 576 | |
| 577 | private static void writeCustomSpells() |
| 578 | { |
| 579 | |
| 580 | try (BufferedWriter bw = getWriter(customSpellFilePath(true))) |
| 581 | { |
| 582 | |
| 583 | if (bw == null) |
| 584 | { |
| 585 | return; |
| 586 | } |
| 587 | |
| 588 | writeCustomHeader(bw); |
| 589 | |
| 590 | for (Spell spell : Globals.getContext().getReferenceContext().getConstructedCDOMObjects(Spell.class)) |
| 591 | { |
| 592 | if (spell.isType(Constants.TYPE_CUSTOM)) |
| 593 | { |
| 594 | bw.write(spell.getPCCText()); |
| 595 | bw.newLine(); |
| 596 | } |
| 597 | } |
| 598 | } catch (IOException e) |
| 599 | { |
| 600 | Logging.errorPrint("Error in writeCustomSpells", e); |
| 601 | } |
| 602 | } |
| 603 | |
| 604 | private static void writeCustomTemplates() |
| 605 | { |
no test coverage detected