Class ConstantResolver

java.lang.Object
com.winterhavenmc.library.messagebuilder.ConstantResolver

public class ConstantResolver extends Object
A class that allows clients of the library to access values in the constants section of the language file
  • Method Details

    • getString

      public Optional<String> getString(String key)
      Retrieves an Optional String from the constants section of the language file
      Parameters:
      key - a string to be used as the key for the String to be retrieved
      Returns:
      an Optional String, or an empty Optional if no String record could be retrieved
    • getInteger

      public Optional<Integer> getInteger(String key)
      Retrieves an Optional Integer from the constants section of the language file
      Parameters:
      key - a string to be used as the key for the Integer to be retrieved
      Returns:
      an Optional Integer, or an empty Optional if no Integer record could be retrieved
    • getBoolean

      public Optional<Boolean> getBoolean(String key)
      Retrieves an Optional Boolean from the constants section of the language file
      Parameters:
      key - a string to be used as the key for the Boolean to be retrieved
      Returns:
      an Optional Boolean, or an empty Optional if no Boolean record could be retrieved