Class: Lapis::Minecraft::Versioning::LauncherProperties

Inherits:
Object
  • Object
show all
Defined in:
lib/lapis/minecraft/versioning/launcher_properties.rb

Overview

Information about how the client should be started.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(main_class, arguments, minimum_version) ⇒ LauncherProperties

Creates properties for launching the client.

Parameters:

  • main_class (String)

    Main Java class that is the entry point for the client.

  • arguments (Array<String>)

    List of arguments to pass to the client jar. These can be parametrized by using ${var_name}.

  • minimum_version (Fixnum)

    Minimum launcher version required to run the client. This can be ignored if a custom launcher is used.



28
29
30
31
32
# File 'lib/lapis/minecraft/versioning/launcher_properties.rb', line 28

def initialize(main_class, arguments, minimum_version)
  @main_class      = main_class.dup.freeze
  @arguments       = arguments.map(&:freeze).freeze
  @minimum_version = minimum_version
end

Instance Attribute Details

#argumentsArray<String> (readonly)

Note:

Some arguments may be parametrized with ${var_name}.

List of arguments to pass to the client jar.

Returns:

  • (Array<String>)


15
16
17
# File 'lib/lapis/minecraft/versioning/launcher_properties.rb', line 15

def arguments
  @arguments
end

#main_classString (readonly)

Main Java class that is the entry point for the client.

Returns:

  • (String)


10
11
12
# File 'lib/lapis/minecraft/versioning/launcher_properties.rb', line 10

def main_class
  @main_class
end

#minimum_versionFixnum (readonly)

Note:

This can be ignored if a custom launcher is used.

Minimum launcher version required to run the client.

Returns:

  • (Fixnum)


20
21
22
# File 'lib/lapis/minecraft/versioning/launcher_properties.rb', line 20

def minimum_version
  @minimum_version
end

Instance Method Details

#==(other) ⇒ true, false

Compares one set of properties to another.

Parameters:

Returns:

  • (true)

    The properties are the same.

  • (false)

    The properties are different.



38
39
40
41
42
# File 'lib/lapis/minecraft/versioning/launcher_properties.rb', line 38

def ==(other)
  other.main_class == @main_class &&
      other.arguments == @arguments &&
      other.minimum_version == @minimum_version
end