summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-01-07 14:52:28 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-01-07 14:52:28 +0000
commit8563454327d96a9758f731f9db87561b40bb401f (patch)
tree8b15808d26501002abe9d77c4235c3f48bd446da /src
parentf71b57174ea8a5133c69ca7923ff760c7935c3c5 (diff)
downloadbukkit-8563454327d96a9758f731f9db87561b40bb401f.tar
bukkit-8563454327d96a9758f731f9db87561b40bb401f.tar.gz
bukkit-8563454327d96a9758f731f9db87561b40bb401f.tar.lz
bukkit-8563454327d96a9758f731f9db87561b40bb401f.tar.xz
bukkit-8563454327d96a9758f731f9db87561b40bb401f.zip
Added Sign interface
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/block/Sign.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java
new file mode 100644
index 00000000..595c7836
--- /dev/null
+++ b/src/main/java/org/bukkit/block/Sign.java
@@ -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;
+}