001/* 002 * Trident - A Multithreaded Server Alternative 003 * Copyright 2014 The TridentSDK Team 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package net.tridentsdk.server.data.item; 018 019import java.util.List; 020 021import net.tridentsdk.meta.item.BookMeta; 022import net.tridentsdk.meta.nbt.NBTField; 023import net.tridentsdk.meta.nbt.TagType; 024 025public class BookMetaImpl extends ItemMetaImpl implements BookMeta { 026 @NBTField(name = "generation", type = TagType.INT) 027 protected int copyTier; 028 029 @NBTField(name = "author", type = TagType.STRING) 030 protected String author; 031 032 @NBTField(name = "title", type = TagType.STRING) 033 protected String title; 034 035 @NBTField(name = "pages", type = TagType.LIST) 036 protected List<String> pages; 037 038 @Override 039 public int copyTier() { 040 return copyTier; 041 } 042 043 @Override 044 public void setCopyTier(int copyTier) { 045 this.copyTier = copyTier; 046 } 047 048 @Override 049 public String author() { 050 return author; 051 } 052 053 @Override 054 public void setAuthor(String name) { 055 this.author = name; 056 } 057 058 @Override 059 public String title() { 060 return title; 061 } 062 063 @Override 064 public void setTitle(String title) { 065 this.title = title; 066 } 067 068 @Override 069 public List<String> pages() { 070 return pages; 071 } 072 073 @Override 074 public void setPages(List<String> pages) { 075 this.pages = pages; 076 } 077}