com.quartercode.quarterbukkit.api.select
Enum ClickType

java.lang.Object
  extended by java.lang.Enum<ClickType>
      extended by com.quartercode.quarterbukkit.api.select.ClickType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ClickType>

public enum ClickType
extends java.lang.Enum<ClickType>

This enum defines four different click types. Currently, there're four values: LEFT, RIGHT, LEFT_SHIFT, RIGHT_SHIFT. Every type has three methods which can output the concrete boolean values: public boolean isLeft() public boolean isRight() public boolean isShift()


Enum Constant Summary
LEFT
          A default left click.
LEFT_SHIFT
          A left click while holding shift.
RIGHT
          A default right click.
RIGHT_SHIFT
          A right click while holding shift.
 
Method Summary
static ClickType getClickType(boolean left, boolean right, boolean shift)
           
 boolean isLeft()
          If the left mouse button was clicked.
 boolean isRight()
          If the right mouse button was clicked.
 boolean isShift()
          If shift was holded while clicking.
static ClickType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ClickType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LEFT

public static final ClickType LEFT
A default left click.


RIGHT

public static final ClickType RIGHT
A default right click.


LEFT_SHIFT

public static final ClickType LEFT_SHIFT
A left click while holding shift.


RIGHT_SHIFT

public static final ClickType RIGHT_SHIFT
A right click while holding shift.

Method Detail

values

public static ClickType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ClickType c : ClickType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ClickType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getClickType

public static ClickType getClickType(boolean left,
                                     boolean right,
                                     boolean shift)

isLeft

public boolean isLeft()
If the left mouse button was clicked.

Returns:
If the left mouse button was clicked.

isRight

public boolean isRight()
If the right mouse button was clicked.

Returns:
If the right mouse button was clicked.

isShift

public boolean isShift()
If shift was holded while clicking.

Returns:
If shift was holded while clicking.