SettingsAPI

open class SettingsAPI

Constructors

Link copied to clipboard
constructor(plugin: String)
Creates a SettingsAPI for the specified plugin

Functions

Link copied to clipboard
fun <T> SettingsAPI.delegate(defaultValue: T): SettingsDelegate<T>
Link copied to clipboard
open fun exists(key: String): Boolean
Check if Key exists in settings
Link copied to clipboard
open fun getAllKeys(): List<String>
Gets All Keys from settings
Link copied to clipboard
open fun getBool(key: String, defValue: Boolean): Boolean
Reads a from the settings.
Link copied to clipboard
open fun getFloat(key: String, defValue: Float): Float
Gets a stored in the settings.
Link copied to clipboard
open fun getInt(key: String, defValue: Int): Int
Gets an stored in the settings.
Link copied to clipboard
open fun getLong(key: String, defValue: Long): Long
Gets a stored in the settings.
Link copied to clipboard
open fun <T> getObject(key: String, defValue: T): T
open fun <T> getObject(key: String, defValue: T, type: Type): T
Gets an Object stored in the settings.
Link copied to clipboard
open fun getString(key: String, defValue: String): String
Gets a String stored in the settings.
Link copied to clipboard
open fun getUnknown(key: String, defValue: Any): Any
Get a value of an unknown type
Link copied to clipboard
open fun remove(key: String): Boolean
Removes Item from settings
Link copied to clipboard
Resets All Settings
Link copied to clipboard
open fun setBool(key: String, val: Boolean)
Writes a to the settings.
Link copied to clipboard
open fun setFloat(key: String, val: Float)
Writes a to the settings.
Link copied to clipboard
open fun setInt(key: String, val: Int)
Writes an to the settings.
Link copied to clipboard
open fun setLong(key: String, val: Long)
Writes a to the settings.
Link copied to clipboard
open fun setObject(key: String, val: Any)
Writes an Object to the settings.
Link copied to clipboard
open fun setString(key: String, val: String)
Writes a String to the settings.
Link copied to clipboard
open fun setUnknown(key: String, value: Any)
Set a value of an unknown type
Link copied to clipboard
open fun toggleBool(key: String, defValue: Boolean): Boolean
Toggles Boolean and returns it