Class VariableMap

java.lang.Object
io.github.syst3ms.skriptparser.variables.VariableMap

public class VariableMap extends Object
  • Constructor Details

    • VariableMap

      public VariableMap()
  • Method Details

    • getVariable

      public Optional<Object> getVariable(String name)
      Returns the internal value of the requested variable.

      Do not modify the returned value!

      Parameters:
      name - name of the variable
      Returns:
      an Object for a normal Variable or a Mapinvalid input: '<'String, Object> for a list variable, or null if the variable is not set.
    • setVariable

      public void setVariable(String name, @Nullable @Nullable Object value)
      Sets a variable.
      Parameters:
      name - The variable's name. Can be a "list variable::*" (value must be null in this case)
      value - The variable's value. Use null to delete the variable.
    • clearVariables

      public void clearVariables()
      Clears all variables