Speedgot
JsonConfigAPI
-----
A simple API for the creation of Json configs
Download Now
Via external site
Overview
Updates (
--
)
Reviews (
---
)
Version History
Discussion
IMPORTANT:
This isn't a plugin!
This is a simple API for the creation of Json configs.
Example of how to use the API:
Code (Java):
package
net.skillcode.jsonconfig.example
;
import
net.skillcode.jsonconfig.JsonConfig
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
public
class
ExampleJsonConfig
implements
JsonConfig
{
private
String
exampleString
=
"This is an example String"
;
private
int
exampleInt
=
0
;
private
List
<
String
>
exampleList
=
new
ArrayList
<>
(
Arrays
.
asList
(
"example1"
,
"example2"
,
"example3"
)
)
;
public
String
getExampleString
(
)
{
return
exampleString
;
}
public
int
getExampleInt
(
)
{
return
exampleInt
;
}
public
List
<
String
>
getExampleList
(
)
{
return
exampleList
;
}
}
Code (Java):
package
net.skillcode.jsonconfig.example
;
import
net.skillcode.jsonconfig.JsonConfigAPI
;
import
org.jetbrains.annotations.NotNull
;
public
class
Example
{
@NotNull
private
final
static
String
PATH
=
"C:/Users/example/"
;
@NotNull
private
final
static
String
FILE_NAME
=
"example.json"
;
public
static
void
main
(
String
[
]
args
)
{
final
JsonConfigAPI jsonConfigAPI
=
new
JsonConfigAPI
(
true
)
;
jsonConfigAPI.
registerConfig
(
new
ExampleJsonConfig
(
)
, PATH, FILE_NAME
)
;
final
ExampleJsonConfig exampleJsonConfig
=
jsonConfigAPI.
getConfig
(
ExampleJsonConfig.
class
)
;
System
.
out
.
println
(
exampleJsonConfig.
getExampleString
(
)
)
;
System
.
out
.
println
(
exampleJsonConfig.
getExampleInt
(
)
)
;
exampleJsonConfig.
getExampleList
(
)
.
forEach
(
System
.
out
::
println
)
;
}
}
View on SpigotMC
Resource Information
Author:
----------
Total Downloads:
83
First Release:
Jan 6, 2021
Last Update:
Jan 6, 2021
Category:
---------------
All-Time Rating:
0 ratings
Version
-----
Released:
--------------------
Downloads:
------
Version Rating:
----------------------
--
ratings