rename tag methods
This commit is contained in:
parent
c527989ada
commit
753b4b8b5d
57 changed files with 276 additions and 276 deletions
|
@ -183,8 +183,8 @@ public final class Server implements IThreadListener {
|
|||
if(!value.noDef || !value.def.equals(value.getValue()))
|
||||
cfg.setString(cvar, value.getValue());
|
||||
}
|
||||
data.setTag("Config", cfg);
|
||||
data.setTag("Universe", UniverseRegistry.saveNbt());
|
||||
data.setObject("Config", cfg);
|
||||
data.setObject("Universe", UniverseRegistry.saveNbt());
|
||||
File nfile = new File("server.nbt.tmp");
|
||||
File lfile = new File("server.nbt");
|
||||
try {
|
||||
|
@ -207,11 +207,11 @@ public final class Server implements IThreadListener {
|
|||
if(file.exists()) {
|
||||
try {
|
||||
TagObject tag = TagLoader.readGZip(file);
|
||||
TagObject cfg = tag.getTag("Config");
|
||||
TagObject cfg = tag.getObject("Config");
|
||||
for(String key : cfg.getKeySet()) {
|
||||
Config.set(key, cfg.getString(key), false);
|
||||
}
|
||||
UniverseRegistry.loadNbt(tag.getTag("Universe"));
|
||||
UniverseRegistry.loadNbt(tag.getObject("Universe"));
|
||||
long lastPlayed = tag.getLong("LastAccess");
|
||||
String version = tag.hasString("Version") ? tag.getString("Version") : null;
|
||||
version = version != null && version.isEmpty() ? "<unbekannt>" : version;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue