mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 11:58:06 +01:00
SPIGOT-7326: Add ClickType#isMouseClick()
By: TheRealRyGuy <git@ryguy.me>
This commit is contained in:
parent
50d16687d4
commit
6b90c83282
@ -75,7 +75,17 @@ public enum ClickType {
|
||||
* @return true if this ClickType represents the pressing of a key
|
||||
*/
|
||||
public boolean isKeyboardClick() {
|
||||
return (this == ClickType.NUMBER_KEY) || (this == ClickType.DROP) || (this == ClickType.CONTROL_DROP);
|
||||
return (this == ClickType.NUMBER_KEY) || (this == ClickType.DROP) || (this == ClickType.CONTROL_DROP) || (this == ClickType.SWAP_OFFHAND);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether this ClickType represents the pressing of a mouse button
|
||||
*
|
||||
* @return true if this ClickType represents the pressing of a mouse button
|
||||
*/
|
||||
public boolean isMouseClick() {
|
||||
return (this == ClickType.DOUBLE_CLICK) || (this == ClickType.LEFT) || (this == ClickType.RIGHT) || (this == ClickType.MIDDLE)
|
||||
|| (this == ClickType.WINDOW_BORDER_LEFT) || (this == ClickType.SHIFT_LEFT) || (this == ClickType.SHIFT_RIGHT) || (this == ClickType.WINDOW_BORDER_RIGHT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user