Class KeyInfoParser

java.lang.Object
com.toxicrain.rainengine.core.BaseInstanceable<KeyInfoParser>
com.toxicrain.rainengine.core.json.key.KeyInfoParser

public class KeyInfoParser extends BaseInstanceable<KeyInfoParser>
KeyInfoParser parsers the keybinds.json file needed for game functionality
  • Constructor Details

    • KeyInfoParser

      public KeyInfoParser()
  • Method Details

    • getInstance

      public static KeyInfoParser getInstance()
    • loadKeyInfo

      public void loadKeyInfo()
      Loads the keybinds.json and parses it into the HashMap
    • updateKeyBinding

      public void updateKeyBinding(String key, String value)
      Updates a keybinding in memory and writes the change to keybinds.json
      Parameters:
      key - The keybinding to update
      value - The new value for the keybinding
    • getKeyBind

      public String getKeyBind(String key)
      Gets a keybinding from keybinds.json
      Parameters:
      key - The keybinding to get