geforkt von Mirrors/Paper
Added Sign interface
By: Dinnerbone <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
Ursprung
013df9273d
Commit
ef59e4c706
39
paper-api/src/main/java/org/bukkit/block/Sign.java
Normale Datei
39
paper-api/src/main/java/org/bukkit/block/Sign.java
Normale Datei
@ -0,0 +1,39 @@
|
||||
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Block;
|
||||
|
||||
/**
|
||||
* Represents either a SignPost or a WallSign
|
||||
*/
|
||||
public interface Sign extends Block {
|
||||
/**
|
||||
* Gets all the lines of text currently on this sign.
|
||||
*
|
||||
* @return Array of Strings containing each line of text
|
||||
*/
|
||||
public String[] getLines();
|
||||
|
||||
/**
|
||||
* Gets the line of text at the specified index.
|
||||
*
|
||||
* For example, getLine(0) will return the first line of text.
|
||||
*
|
||||
* @param index Line number to get the text from, starting at 0
|
||||
* @throws IndexOutOfBoundsException Thrown when the line does not exist
|
||||
* @return Text on the given line
|
||||
*/
|
||||
public String getLine(int index) throws IndexOutOfBoundsException;
|
||||
|
||||
/**
|
||||
* Sets the line of text at the specified index.
|
||||
*
|
||||
* For example, setLine(0, "Line One") will set the first line of text to
|
||||
* "Line One".
|
||||
*
|
||||
* @param index Line number to set the text at, starting from 0
|
||||
* @param line New text to set at the specified index
|
||||
* @throws IndexOutOfBoundsException
|
||||
*/
|
||||
public void setLine(int index, String line) throws IndexOutOfBoundsException;
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren