Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 37 lines 1.1 kB view raw
1package org.bukkit.block; 2 3/** 4 * Represents either a SignPost or a WallSign 5 */ 6public interface Sign extends BlockState { 7 8 /** 9 * Gets all the lines of text currently on this sign. 10 * 11 * @return Array of Strings containing each line of text 12 */ 13 public String[] getLines(); 14 15 /** 16 * Gets the line of text at the specified index. 17 * <p> 18 * For example, getLine(0) will return the first line of text. 19 * 20 * @param index Line number to get the text from, starting at 0 21 * @return Text on the given line 22 * @throws IndexOutOfBoundsException Thrown when the line does not exist 23 */ 24 public String getLine(int index) throws IndexOutOfBoundsException; 25 26 /** 27 * Sets the line of text at the specified index. 28 * <p> 29 * For example, setLine(0, "Line One") will set the first line of text to 30 * "Line One". 31 * 32 * @param index Line number to set the text at, starting from 0 33 * @param line New text to set at the specified index 34 * @throws IndexOutOfBoundsException 35 */ 36 public void setLine(int index, String line) throws IndexOutOfBoundsException; 37}