Skip to content

Bindings

SpokenWig620933 edited this page Aug 15, 2026 · 8 revisions

Used to expose Utils to use during Events.

Bindings can be used in any Events!

Available Bindings:

Bindings:

KeyBind:

A Utility Class for Events.

Available Methods:

Examples:

boolean isOptionsSaved();

KeyBindExtendedEvents.modification(event => {
    // Determines if the Options.txt file already exists!
    if(KeyBind.isOptionsSaved()) {
        // Overrides the KeyBind on First Launch to Not Bound!
        event.setKey('key.socialInteractions', 'KEY_UNKNOWN')
    }
});

List<KeyMapping> getKeyMappings();

KeyBindExtendedEvents.modification(event => {
    // Returns a List<KeyMapping> of all KeyMappings!
    KeyBind.getKeyMappings().forEach(keyMapping => {
        // Logs the KeyMapping's name!
        console.log('KeyMapping: ' + keyMapping.getName());
    });
});

List<KeyMapping> getAvailableKeyMappings();

KeyBindExtendedEvents.modification(event => {
    // Returns a List<KeyMapping> of all Available KeyMappings in Controls!
    KeyBind.getAvailableKeyMappings().forEach(keyMapping => {
        // Logs the KeyMapping's name!
        console.log('KeyMapping: ' + keyMapping.getName());
    });
});

KeyMapping getKeyMapping(String name);

KeyBindExtendedEvents.categories(event => {
    // Sets the Order for the Category of the Attack/Destroy KeyBind to the Top!
    event.setDisplayIndex(KeyBind.getKeyMapping('key.attack').getCategory(), 0);
});

List<String> getKeyMappingNames();

KeyBindExtendedEvents.modification(event => {
    // Returns a List<String> of all KeyMapping Names!
    KeyBind.getKeyMappingNames().forEach(key => {
        // Logs the Key Name!
        console.log('KeyMapping: ' + key);
    });
});

List<String> getKeyMappingCategories();

KeyBindExtendedEvents.modification(event => {
    // Returns a List<String> of all KeyMapping categories!
    KeyBind.getKeyMappingCategories().forEach(category => {
        // Logs the Category!
        console.log('Category: ' + category);
    });
});

Map<String, Integer> getKeys();

KeyBindExtendedEvents.modification(event => {
    // Returns a Map of Key Names to KeyCodes!
    KeyBind.getKeys().forEach((key, keyCode) => {
        // Logs the Key Name with it's KeyCode!
        console.log('Key: ' + key + '; KeyCode: ' + keyCode);
    });
});

List<String> getKeyNames();

KeyBindExtendedEvents.modification(event => {
    // Returns a List<String> of all Key Names!
    KeyBind.getKeyNames().forEach(key => {
        // Logs the Key Name!
        console.log('Key: ' + key);
    });
});

List<String> getKeyModifiers();

KeyBindExtendedEvents.modification(event => {
    // Returns a List<String> of all Key Modifiers!
    KeyBind.getKeyModifiers().forEach(modifier => {
        // Logs the Key Modifier!
        console.log('Modifier: ' + modifier);
    });
});

Clone this wiki locally