// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.builtin.path.commands;

import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import com.hypixel.hytale.component.Store;
import com.hypixel.hytale.server.core.universe.world.World;
import com.hypixel.hytale.server.core.command.system.CommandContext;
import javax.annotation.Nonnull;
import com.hypixel.hytale.server.core.Message;
import com.hypixel.hytale.server.core.command.system.basecommands.AbstractWorldCommand;

public class WorldPathSaveCommand extends AbstractWorldCommand
{
    @Nonnull
    private static final Message MESSAGE_UNIVERSE_WORLD_PATH_CONFIG_SAVED;
    
    public WorldPathSaveCommand() {
        super("save", "server.commands.worldpath.save.desc");
    }
    
    @Override
    protected void execute(@Nonnull final CommandContext context, @Nonnull final World world, @Nonnull final Store<EntityStore> store) {
        world.getWorldPathConfig().save(world);
        context.sendMessage(WorldPathSaveCommand.MESSAGE_UNIVERSE_WORLD_PATH_CONFIG_SAVED);
    }
    
    static {
        MESSAGE_UNIVERSE_WORLD_PATH_CONFIG_SAVED = Message.translation("server.universe.worldpath.configSaved");
    }
}
