|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoapi.ModOption<java.lang.Integer>
moapi.ModKeyOption
public class ModKeyOption
An option for keybindings Enforces the concept of only one key per binding type.
Field Summary | |
---|---|
static java.lang.Integer |
defaultVal
The default Integer |
Fields inherited from class moapi.ModOption |
---|
callback, global, localValue, name, value |
Constructor Summary | |
---|---|
ModKeyOption(java.lang.String name)
Constructor for key binding option |
|
ModKeyOption(java.lang.String id,
java.lang.String name)
Constructor with ID for key binding option |
Method Summary | |
---|---|
static java.lang.String |
getKeyName(java.lang.Integer key)
Get a name of a key. |
static boolean |
isKeyBound(java.lang.Integer c)
Check if a key is already bound |
void |
setValue(int value)
Set the current used value of this option selector |
void |
setValue(int value,
boolean scope)
Set the current used value of this option selector for a given scope |
void |
setValue(java.lang.Integer value)
Set the current used value of this option selector fr a given scope |
void |
setValue(java.lang.Integer value,
boolean scope)
Set the current used value of this option selector |
Methods inherited from class moapi.ModOption |
---|
getCallback, getGlobalValue, getID, getLocalValue, getName, getValue, getValue, hasCallback, setCallback, setGlobal, setGlobalValue, setLocalValue, setName, useGlobalValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Integer defaultVal
Constructor Detail |
---|
public ModKeyOption(java.lang.String name)
name
- Name of optionpublic ModKeyOption(java.lang.String id, java.lang.String name)
id
- ID of optionname
- Name of optionMethod Detail |
---|
public void setValue(int value)
value
- New valuepublic void setValue(java.lang.Integer value)
setValue
in class ModOption<java.lang.Integer>
value
- New value
KeyAlreadyBoundException
- When attempting to remind a keypublic void setValue(int value, boolean scope)
value
- New value
KeyAlreadyBoundException
- When attempting to remind a keypublic void setValue(java.lang.Integer value, boolean scope)
setValue
in class ModOption<java.lang.Integer>
value
- New valuescope
- Scope value. True for global
KeyAlreadyBoundException
- When attempting to remind a keypublic static boolean isKeyBound(java.lang.Integer c)
c
- Integer to check
public static java.lang.String getKeyName(java.lang.Integer key)
key
- Key to get value for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |