Aliucord
2.0.1
androidJvm
Aliucord
/
com.aliucord.api
/
SettingsAPI
Settings
API
open
class
SettingsAPI
Members
Members & Extensions
Constructors
Settings
API
Link copied to clipboard
constructor
(
plugin
:
String
)
Creates a SettingsAPI for the specified plugin
Functions
delegate
Link copied to clipboard
fun
<
T
>
SettingsAPI
.
delegate
(
defaultValue
:
T
)
:
SettingsDelegate
<
T
>
exists
Link copied to clipboard
open
fun
exists
(
key
:
String
)
:
Boolean
Check if Key exists in settings
get
All
Keys
Link copied to clipboard
open
fun
getAllKeys
(
)
:
List
<
String
>
Gets All Keys from settings
get
Bool
Link copied to clipboard
open
fun
getBool
(
key
:
String
,
defValue
:
Boolean
)
:
Boolean
Reads a from the settings.
get
Float
Link copied to clipboard
open
fun
getFloat
(
key
:
String
,
defValue
:
Float
)
:
Float
Gets a stored in the settings.
get
Int
Link copied to clipboard
open
fun
getInt
(
key
:
String
,
defValue
:
Int
)
:
Int
Gets an stored in the settings.
get
Long
Link copied to clipboard
open
fun
getLong
(
key
:
String
,
defValue
:
Long
)
:
Long
Gets a stored in the settings.
get
Object
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.
get
String
Link copied to clipboard
open
fun
getString
(
key
:
String
,
defValue
:
String
)
:
String
Gets a
String
stored in the settings.
get
Unknown
Link copied to clipboard
open
fun
getUnknown
(
key
:
String
,
defValue
:
Any
)
:
Any
Get a value of an unknown type
remove
Link copied to clipboard
open
fun
remove
(
key
:
String
)
:
Boolean
Removes Item from settings
reset
Settings
Link copied to clipboard
open
fun
resetSettings
(
)
:
Boolean
Resets All Settings
set
Bool
Link copied to clipboard
open
fun
setBool
(
key
:
String
,
val
:
Boolean
)
Writes a to the settings.
set
Float
Link copied to clipboard
open
fun
setFloat
(
key
:
String
,
val
:
Float
)
Writes a to the settings.
set
Int
Link copied to clipboard
open
fun
setInt
(
key
:
String
,
val
:
Int
)
Writes an to the settings.
set
Long
Link copied to clipboard
open
fun
setLong
(
key
:
String
,
val
:
Long
)
Writes a to the settings.
set
Object
Link copied to clipboard
open
fun
setObject
(
key
:
String
,
val
:
Any
)
Writes an
Object
to the settings.
set
String
Link copied to clipboard
open
fun
setString
(
key
:
String
,
val
:
String
)
Writes a
String
to the settings.
set
Unknown
Link copied to clipboard
open
fun
setUnknown
(
key
:
String
,
value
:
Any
)
Set a value of an unknown type
toggle
Bool
Link copied to clipboard
open
fun
toggleBool
(
key
:
String
,
defValue
:
Boolean
)
:
Boolean
Toggles Boolean and returns it