Added ServerConfiguration#toHashMap
This commit is contained in:
parent
15b2b4177e
commit
743066f959
@ -7,6 +7,7 @@ import de.gnmyt.mcdash.api.Logger;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class ServerConfiguration {
|
||||
|
||||
@ -185,6 +186,21 @@ public class ServerConfiguration {
|
||||
save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new server configuration
|
||||
* @return The created server configuration
|
||||
*/
|
||||
public HashMap<String, Object> toHashMap() {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("name", name);
|
||||
map.put("type", type);
|
||||
map.put("version", version);
|
||||
map.put("description", description);
|
||||
map.put("memory", memory);
|
||||
map.put("autoStart", autoStart);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ServerConfiguration{" +
|
||||
|
Reference in New Issue
Block a user