Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.inventory.ClickType Enum Reference

Public Member Functions

boolean isKeyboardClick ()
 
boolean isCreativeAction ()
 
boolean isRightClick ()
 
boolean isLeftClick ()
 
boolean isShiftClick ()
 

Public Attributes

 LEFT
 
 SHIFT_LEFT
 
 RIGHT
 
 SHIFT_RIGHT
 
 WINDOW_BORDER_LEFT
 
 WINDOW_BORDER_RIGHT
 
 MIDDLE
 
 NUMBER_KEY
 
 DOUBLE_CLICK
 
 DROP
 
 CONTROL_DROP
 
 CREATIVE
 
 UNKNOWN
 

Detailed Description

What the client did to trigger this action (not the result).

Definition at line 6 of file ClickType.java.

Member Function Documentation

boolean org.bukkit.event.inventory.ClickType.isCreativeAction ( )

Gets whether this ClickType represents an action that can only be performed by a Player in creative mode.

Returns
true if this action requires Creative mode

Definition at line 83 of file ClickType.java.

References org.bukkit.event.inventory.ClickType.CREATIVE, and org.bukkit.event.inventory.ClickType.MIDDLE.

83  {
84  // Why use middle click?
85  return (this == ClickType.MIDDLE) || (this == ClickType.CREATIVE);
86  }
boolean org.bukkit.event.inventory.ClickType.isKeyboardClick ( )

Gets whether this ClickType represents the pressing of a key on a keyboard.

Returns
true if this ClickType represents the pressing of a key

Definition at line 73 of file ClickType.java.

References org.bukkit.event.inventory.ClickType.CONTROL_DROP, org.bukkit.event.inventory.ClickType.DROP, and org.bukkit.event.inventory.ClickType.NUMBER_KEY.

73  {
74  return (this == ClickType.NUMBER_KEY) || (this == ClickType.DROP) || (this == ClickType.CONTROL_DROP);
75  }
boolean org.bukkit.event.inventory.ClickType.isLeftClick ( )

Gets whether this ClickType represents a left click.

Returns
true if this ClickType represents a left click

Definition at line 102 of file ClickType.java.

References org.bukkit.event.inventory.ClickType.CREATIVE, org.bukkit.event.inventory.ClickType.DOUBLE_CLICK, org.bukkit.event.inventory.ClickType.LEFT, and org.bukkit.event.inventory.ClickType.SHIFT_LEFT.

Referenced by org.bukkit.event.inventory.InventoryClickEvent.isLeftClick().

102  {
103  return (this == ClickType.LEFT) || (this == ClickType.SHIFT_LEFT) || (this == ClickType.DOUBLE_CLICK) || (this == ClickType.CREATIVE);
104  }
boolean org.bukkit.event.inventory.ClickType.isRightClick ( )

Gets whether this ClickType represents a right click.

Returns
true if this ClickType represents a right click

Definition at line 93 of file ClickType.java.

References org.bukkit.event.inventory.ClickType.RIGHT, and org.bukkit.event.inventory.ClickType.SHIFT_RIGHT.

Referenced by org.bukkit.event.inventory.InventoryClickEvent.isRightClick().

93  {
94  return (this == ClickType.RIGHT) || (this == ClickType.SHIFT_RIGHT);
95  }
boolean org.bukkit.event.inventory.ClickType.isShiftClick ( )

Gets whether this ClickType indicates that the shift key was pressed down when the click was made.

Returns
true if the action uses Shift.

Definition at line 112 of file ClickType.java.

References org.bukkit.event.inventory.ClickType.CONTROL_DROP, org.bukkit.event.inventory.ClickType.SHIFT_LEFT, and org.bukkit.event.inventory.ClickType.SHIFT_RIGHT.

Referenced by org.bukkit.event.inventory.InventoryClickEvent.isShiftClick().

112  {
113  return (this == ClickType.SHIFT_LEFT) || (this == ClickType.SHIFT_RIGHT) || (this == ClickType.CONTROL_DROP);
114  }

Member Data Documentation

org.bukkit.event.inventory.ClickType.CONTROL_DROP

Holding Ctrl while pressing the "Drop" key (defaults to Q).

Definition at line 51 of file ClickType.java.

Referenced by org.bukkit.event.inventory.ClickType.isKeyboardClick(), and org.bukkit.event.inventory.ClickType.isShiftClick().

org.bukkit.event.inventory.ClickType.CREATIVE

Any action done with the Creative inventory open.

Definition at line 55 of file ClickType.java.

Referenced by org.bukkit.event.inventory.ClickType.isCreativeAction(), and org.bukkit.event.inventory.ClickType.isLeftClick().

org.bukkit.event.inventory.ClickType.DOUBLE_CLICK

Pressing the left mouse button twice in quick succession.

Definition at line 43 of file ClickType.java.

Referenced by org.bukkit.event.inventory.ClickType.isLeftClick().

org.bukkit.event.inventory.ClickType.DROP

The "Drop" key (defaults to Q).

Definition at line 47 of file ClickType.java.

Referenced by org.bukkit.event.inventory.ClickType.isKeyboardClick().

org.bukkit.event.inventory.ClickType.LEFT

The left (or primary) mouse button.

Definition at line 11 of file ClickType.java.

Referenced by org.bukkit.event.inventory.ClickType.isLeftClick().

org.bukkit.event.inventory.ClickType.MIDDLE

The middle mouse button, or a "scrollwheel click".

Definition at line 35 of file ClickType.java.

Referenced by org.bukkit.event.inventory.ClickType.isCreativeAction().

org.bukkit.event.inventory.ClickType.NUMBER_KEY

One of the number keys 1-9, correspond to slots on the hotbar.

Definition at line 39 of file ClickType.java.

Referenced by org.bukkit.event.inventory.ClickType.isKeyboardClick().

org.bukkit.event.inventory.ClickType.RIGHT

The right mouse button.

Definition at line 19 of file ClickType.java.

Referenced by org.bukkit.event.inventory.ClickType.isRightClick().

org.bukkit.event.inventory.ClickType.SHIFT_LEFT

Holding shift while pressing the left mouse button.

Definition at line 15 of file ClickType.java.

Referenced by org.bukkit.event.inventory.ClickType.isLeftClick(), and org.bukkit.event.inventory.ClickType.isShiftClick().

org.bukkit.event.inventory.ClickType.SHIFT_RIGHT

Holding shift while pressing the right mouse button.

Definition at line 23 of file ClickType.java.

Referenced by org.bukkit.event.inventory.ClickType.isRightClick(), and org.bukkit.event.inventory.ClickType.isShiftClick().

org.bukkit.event.inventory.ClickType.UNKNOWN

A type of inventory manipulation not yet recognized by Bukkit.

This is only for transitional purposes on a new Minecraft update, and should never be relied upon.

Any ClickType.UNKNOWN is called on a best-effort basis.

Definition at line 64 of file ClickType.java.

org.bukkit.event.inventory.ClickType.WINDOW_BORDER_LEFT

Clicking the left mouse button on the grey area around the inventory.

Definition at line 27 of file ClickType.java.

org.bukkit.event.inventory.ClickType.WINDOW_BORDER_RIGHT

Clicking the right mouse button on the grey area around the inventory.

Definition at line 31 of file ClickType.java.


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