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

package com.hypixel.hytale.server.core.command.commands.debug;

import com.hypixel.hytale.server.core.Message;
import com.hypixel.hytale.common.util.java.ManifestUtil;
import javax.annotation.Nonnull;
import com.hypixel.hytale.server.core.command.system.CommandContext;
import com.hypixel.hytale.server.core.command.system.basecommands.CommandBase;

public class VersionCommand extends CommandBase
{
    public VersionCommand() {
        super("version", "Displays version information about the currently running server");
    }
    
    @Override
    protected void executeSync(@Nonnull final CommandContext context) {
        final String version = ManifestUtil.getImplementationVersion();
        final String patchline = ManifestUtil.getPatchline();
        if ("release".equals(patchline)) {
            context.sendMessage(Message.translation("server.commands.version.response").param("version", version).param("patchline", patchline));
        }
        else {
            context.sendMessage(Message.translation("server.commands.version.response.withEnvironment").param("version", version).param("patchline", patchline).param("environment", "release"));
        }
    }
}
