summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/map/MapCursorCollection.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/bukkit/map/MapCursorCollection.java')
-rw-r--r--src/main/java/org/bukkit/map/MapCursorCollection.java25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/main/java/org/bukkit/map/MapCursorCollection.java b/src/main/java/org/bukkit/map/MapCursorCollection.java
index ac5d3e30..1e234a14 100644
--- a/src/main/java/org/bukkit/map/MapCursorCollection.java
+++ b/src/main/java/org/bukkit/map/MapCursorCollection.java
@@ -8,37 +8,41 @@ import java.util.List;
* MapCursorCollection is linked to a specific {@link MapRenderer}.
*/
public final class MapCursorCollection {
-
+
private List<MapCursor> cursors = new ArrayList<MapCursor>();
-
+
/**
* Get the amount of cursors in this collection.
+ *
* @return The size of this collection.
*/
public int size() {
return cursors.size();
}
-
+
/**
* Get a cursor from this collection.
+ *
* @param index The index of the cursor.
* @return The MapCursor.
*/
public MapCursor getCursor(int index) {
return cursors.get(index);
}
-
+
/**
* Remove a cursor from the collection.
+ *
* @param cursor The MapCursor to remove.
* @return Whether the cursor was removed successfully.
*/
public boolean removeCursor(MapCursor cursor) {
return cursors.remove(cursor);
}
-
+
/**
* Add a cursor to the collection.
+ *
* @param cursor The MapCursor to add.
* @return The MapCursor that was passed.
*/
@@ -46,9 +50,10 @@ public final class MapCursorCollection {
cursors.add(cursor);
return cursor;
}
-
+
/**
* Add a cursor to the collection.
+ *
* @param x The x coordinate, from -128 to 127.
* @param y The y coordinate, from -128 to 127.
* @param direction The facing of the cursor, from 0 to 15.
@@ -57,9 +62,10 @@ public final class MapCursorCollection {
public MapCursor addCursor(int x, int y, byte direction) {
return addCursor(x, y, direction, (byte) 0, true);
}
-
+
/**
* Add a cursor to the collection.
+ *
* @param x The x coordinate, from -128 to 127.
* @param y The y coordinate, from -128 to 127.
* @param direction The facing of the cursor, from 0 to 15.
@@ -69,9 +75,10 @@ public final class MapCursorCollection {
public MapCursor addCursor(int x, int y, byte direction, byte type) {
return addCursor(x, y, direction, type, true);
}
-
+
/**
* Add a cursor to the collection.
+ *
* @param x The x coordinate, from -128 to 127.
* @param y The y coordinate, from -128 to 127.
* @param direction The facing of the cursor, from 0 to 15.
@@ -82,5 +89,5 @@ public final class MapCursorCollection {
public MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible) {
return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible));
}
-
+
}