001 package org.bukkit.block; 002 003 /** 004 * Represents either a SignPost or a WallSign 005 */ 006 public interface Sign extends BlockState { 007 008 /** 009 * Gets all the lines of text currently on this sign. 010 * 011 * @return Array of Strings containing each line of text 012 */ 013 public String[] getLines(); 014 015 /** 016 * Gets the line of text at the specified index. 017 * <p> 018 * For example, getLine(0) will return the first line of text. 019 * 020 * @param index Line number to get the text from, starting at 0 021 * @throws IndexOutOfBoundsException Thrown when the line does not exist 022 * @return Text on the given line 023 */ 024 public String getLine(int index) throws IndexOutOfBoundsException; 025 026 /** 027 * Sets the line of text at the specified index. 028 * <p> 029 * For example, setLine(0, "Line One") will set the first line of text to 030 * "Line One". 031 * 032 * @param index Line number to set the text at, starting from 0 033 * @param line New text to set at the specified index 034 * @throws IndexOutOfBoundsException If the index is out of the range 0..3 035 */ 036 public void setLine(int index, String line) throws IndexOutOfBoundsException; 037 }