Commits
Roy Curtis authored and md_5 committed cee5bbf00cf
192 192 | } |
193 193 | |
194 194 | public String getAuthor() { |
195 195 | return this.author; |
196 196 | } |
197 197 | |
198 198 | public void setAuthor(final String author) { |
199 199 | this.author = author; |
200 200 | } |
201 201 | |
202 + | |
203 + | public Generation getGeneration() { |
204 + | return (generation == null) ? null : Generation.values()[generation]; |
205 + | } |
206 + | |
207 + | |
208 + | public void setGeneration(Generation generation) { |
209 + | this.generation = (generation == null) ? null : generation.ordinal(); |
210 + | } |
211 + | |
202 212 | public String getPage(final int page) { |
203 213 | Validate.isTrue(isValidPage(page), "Invalid page number"); |
204 214 | return CraftChatMessage.fromComponent(pages.get(page - 1)); |
205 215 | } |
206 216 | |
207 217 | public void setPage(final int page, final String text) { |
208 218 | if (!isValidPage(page)) { |
209 219 | throw new IllegalArgumentException("Invalid page number " + page + "/" + pages.size()); |
210 220 | } |
211 221 | |