Add spawn/setspawn commands
This commit is contained in:
parent
0cb0352062
commit
1c63a59566
8 changed files with 101 additions and 24 deletions
|
@ -7,6 +7,7 @@ import com.zontreck.configs.server.sections.Drops;
|
|||
import com.zontreck.configs.server.sections.Messages;
|
||||
import com.zontreck.configs.server.sections.Teleportation;
|
||||
import com.zontreck.libzontreck.util.SNbtIo;
|
||||
import com.zontreck.libzontreck.vectors.WorldPosition;
|
||||
import com.zontreck.util.EssentialsDatastore;
|
||||
import net.minecraft.nbt.*;
|
||||
|
||||
|
@ -22,6 +23,7 @@ public class AEServerConfig
|
|||
public Messages messages;
|
||||
public Drops drops;
|
||||
public boolean enable_debug = false;
|
||||
public WorldPosition worldSpawn;
|
||||
|
||||
|
||||
|
||||
|
@ -56,6 +58,12 @@ public class AEServerConfig
|
|||
config.resetDrops();
|
||||
}
|
||||
|
||||
if(tag.contains("spawn")) {
|
||||
config.worldSpawn = new WorldPosition(tag.getCompound("spawn"), true);
|
||||
}else {
|
||||
config.worldSpawn = null;
|
||||
}
|
||||
|
||||
AriasEssentials.LOGGER.info("Aria's Essentials Server Configuration Loaded");
|
||||
} catch(Exception e){
|
||||
e.printStackTrace();
|
||||
|
@ -135,6 +143,7 @@ public class AEServerConfig
|
|||
tag.put(Messages.TAG_NAME, messages.serialize());
|
||||
tag.putBoolean("use_debug", enable_debug);
|
||||
tag.put(Drops.TAG_NAME, drops.save());
|
||||
if(worldSpawn != null) tag.put("spawn", worldSpawn.serializePretty());
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue