Open-source multiplayer game server compatible with the RuneScape client https://www.openrs2.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
611 B

package org.openrs2.deob.bytecode
import com.fasterxml.jackson.databind.ObjectMapper
import jakarta.inject.Inject
import jakarta.inject.Provider
import org.openrs2.yaml.Yaml
import java.nio.file.Files
import java.nio.file.Path
public class ProfileProvider @Inject constructor(@Yaml private val mapper: ObjectMapper) : Provider<Profile> {
override fun get(): Profile {
return Files.newBufferedReader(PATH).use { reader ->
mapper.readValue(reader, Profile::class.java)
}
}
private companion object {
private val PATH = Path.of("share/deob/profile.yaml")
}
}