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

Classes

enum  Type
 

Public Member Functions

 MapCursor (byte x, byte y, byte direction, byte type, boolean visible)
 
byte getX ()
 
byte getY ()
 
byte getDirection ()
 
Type getType ()
 
byte getRawType ()
 
boolean isVisible ()
 
void setX (byte x)
 
void setY (byte y)
 
void setDirection (byte direction)
 
void setType (Type type)
 
void setRawType (byte type)
 
void setVisible (boolean visible)
 

Detailed Description

Represents a cursor on a map.

Definition at line 6 of file MapCursor.java.

Constructor & Destructor Documentation

org.bukkit.map.MapCursor.MapCursor ( byte  x,
byte  y,
byte  direction,
byte  type,
boolean  visible 
)

Initialize the map cursor.

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 by default.
Deprecated:
Magic value

Definition at line 22 of file MapCursor.java.

References org.bukkit.map.MapCursor.setDirection(), and org.bukkit.map.MapCursor.setRawType().

22  {
23  this.x = x;
24  this.y = y;
25  setDirection(direction);
26  setRawType(type);
27  this.visible = visible;
28  }
void setDirection(byte direction)
Definition: MapCursor.java:109
void setRawType(byte type)
Definition: MapCursor.java:132

Member Function Documentation

byte org.bukkit.map.MapCursor.getDirection ( )

Get the direction of this cursor.

Returns
The facing of the cursor, from 0 to 15.

Definition at line 53 of file MapCursor.java.

53  {
54  return direction;
55  }
byte org.bukkit.map.MapCursor.getRawType ( )

Get the type of this cursor.

Returns
The type (color/style) of the map cursor.
Deprecated:
Magic value

Definition at line 73 of file MapCursor.java.

73  {
74  return type;
75  }
Type org.bukkit.map.MapCursor.getType ( )

Get the type of this cursor.

Returns
The type (color/style) of the map cursor.

Definition at line 62 of file MapCursor.java.

References org.bukkit.map.MapCursor.Type.byValue().

62  {
63  return Type.byValue(type);
64  }
byte org.bukkit.map.MapCursor.getX ( )

Get the X position of this cursor.

Returns
The X coordinate.

Definition at line 35 of file MapCursor.java.

35  {
36  return x;
37  }
byte org.bukkit.map.MapCursor.getY ( )

Get the Y position of this cursor.

Returns
The Y coordinate.

Definition at line 44 of file MapCursor.java.

44  {
45  return y;
46  }
boolean org.bukkit.map.MapCursor.isVisible ( )

Get the visibility status of this cursor.

Returns
True if visible, false otherwise.

Definition at line 82 of file MapCursor.java.

82  {
83  return visible;
84  }
void org.bukkit.map.MapCursor.setDirection ( byte  direction)

Set the direction of this cursor.

Parameters
directionThe facing of the cursor, from 0 to 15.

Definition at line 109 of file MapCursor.java.

Referenced by org.bukkit.map.MapCursor.MapCursor().

109  {
110  if (direction < 0 || direction > 15) {
111  throw new IllegalArgumentException("Direction must be in the range 0-15");
112  }
113  this.direction = direction;
114  }
void org.bukkit.map.MapCursor.setRawType ( byte  type)

Set the type of this cursor.

Parameters
typeThe type (color/style) of the map cursor.
Deprecated:
Magic value

Definition at line 132 of file MapCursor.java.

Referenced by org.bukkit.map.MapCursor.MapCursor(), and org.bukkit.map.MapCursor.setType().

132  {
133  if (type < 0 || type > 15) {
134  throw new IllegalArgumentException("Type must be in the range 0-15");
135  }
136  this.type = type;
137  }
void org.bukkit.map.MapCursor.setType ( Type  type)

Set the type of this cursor.

Parameters
typeThe type (color/style) of the map cursor.

Definition at line 121 of file MapCursor.java.

References org.bukkit.map.MapCursor.setRawType().

121  {
122  setRawType(type.value);
123  }
void setRawType(byte type)
Definition: MapCursor.java:132
void org.bukkit.map.MapCursor.setVisible ( boolean  visible)

Set the visibility status of this cursor.

Parameters
visibleTrue if visible.

Definition at line 144 of file MapCursor.java.

144  {
145  this.visible = visible;
146  }
void org.bukkit.map.MapCursor.setX ( byte  x)

Set the X position of this cursor.

Parameters
xThe X coordinate.

Definition at line 91 of file MapCursor.java.

91  {
92  this.x = x;
93  }
void org.bukkit.map.MapCursor.setY ( byte  y)

Set the Y position of this cursor.

Parameters
yThe Y coordinate.

Definition at line 100 of file MapCursor.java.

100  {
101  this.y = y;
102  }

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