Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.map.MapCursorCollection Class Reference

Public Member Functions

int size ()
 
MapCursor getCursor (int index)
 
boolean removeCursor (MapCursor cursor)
 
MapCursor addCursor (MapCursor cursor)
 
MapCursor addCursor (int x, int y, byte direction)
 
MapCursor addCursor (int x, int y, byte direction, byte type)
 
MapCursor addCursor (int x, int y, byte direction, byte type, boolean visible)
 

Detailed Description

Represents all the map cursors on a MapCanvas. Like MapCanvas, a MapCursorCollection is linked to a specific MapRenderer.

Definition at line 10 of file MapCursorCollection.java.

Member Function Documentation

MapCursor org.bukkit.map.MapCursorCollection.addCursor ( MapCursor  cursor)

Add a cursor to the collection.

Parameters
cursorThe MapCursor to add.
Returns
The MapCursor that was passed.

Definition at line 48 of file MapCursorCollection.java.

Referenced by org.bukkit.map.MapCursorCollection.addCursor().

48  {
49  cursors.add(cursor);
50  return cursor;
51  }
MapCursor org.bukkit.map.MapCursorCollection.addCursor ( int  x,
int  y,
byte  direction 
)

Add a cursor to the collection.

Parameters
xThe x coordinate, from -128 to 127.
yThe y coordinate, from -128 to 127.
directionThe facing of the cursor, from 0 to 15.
Returns
The newly added MapCursor.

Definition at line 61 of file MapCursorCollection.java.

References org.bukkit.map.MapCursorCollection.addCursor().

61  {
62  return addCursor(x, y, direction, (byte) 0, true);
63  }
MapCursor addCursor(MapCursor cursor)
MapCursor org.bukkit.map.MapCursorCollection.addCursor ( int  x,
int  y,
byte  direction,
byte  type 
)

Add a cursor to the collection.

Parameters
xThe x coordinate, from -128 to 127.
yThe y coordinate, from -128 to 127.
directionThe facing of the cursor, from 0 to 15.
typeThe type (color/style) of the map cursor.
Returns
The newly added MapCursor.
Deprecated:
Magic value

Definition at line 76 of file MapCursorCollection.java.

References org.bukkit.map.MapCursorCollection.addCursor().

76  {
77  return addCursor(x, y, direction, type, true);
78  }
MapCursor addCursor(MapCursor cursor)
MapCursor org.bukkit.map.MapCursorCollection.addCursor ( int  x,
int  y,
byte  direction,
byte  type,
boolean  visible 
)

Add a cursor to the collection.

Parameters
xThe x coordinate, from -128 to 127.
yThe y coordinate, from -128 to 127.
directionThe facing of the cursor, from 0 to 15.
typeThe type (color/style) of the map cursor.
visibleWhether the cursor is visible.
Returns
The newly added MapCursor.
Deprecated:
Magic value

Definition at line 92 of file MapCursorCollection.java.

References org.bukkit.map.MapCursorCollection.addCursor().

92  {
93  return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible));
94  }
MapCursor addCursor(MapCursor cursor)
MapCursor org.bukkit.map.MapCursorCollection.getCursor ( int  index)

Get a cursor from this collection.

Parameters
indexThe index of the cursor.
Returns
The MapCursor.

Definition at line 28 of file MapCursorCollection.java.

28  {
29  return cursors.get(index);
30  }
boolean org.bukkit.map.MapCursorCollection.removeCursor ( MapCursor  cursor)

Remove a cursor from the collection.

Parameters
cursorThe MapCursor to remove.
Returns
Whether the cursor was removed successfully.

Definition at line 38 of file MapCursorCollection.java.

38  {
39  return cursors.remove(cursor);
40  }
int org.bukkit.map.MapCursorCollection.size ( )

Get the amount of cursors in this collection.

Returns
The size of this collection.

Definition at line 18 of file MapCursorCollection.java.

18  {
19  return cursors.size();
20  }

The documentation for this class was generated from the following file: