    001    package net.minecraft.command;
    002
    003    import net.minecraft.server.MinecraftServer;
    004    import net.minecraft.world.EnumGameType;
    005
    006    public class CommandServerPublishLocal extends CommandBase
    007    {
    008        public String getCommandName()
    009        {
    010            return "publish";
    011        }
    012
    013        /**
    014         * Return the required permission level for this command.
    015         */
    016        public int getRequiredPermissionLevel()
    017        {
    018            return 4;
    019        }
    020
    021        public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
    022        {
    023            String var3 = MinecraftServer.getServer().shareToLAN(EnumGameType.SURVIVAL, false);
    024
    025            if (var3 != null)
    026            {
    027                notifyAdmins(par1ICommandSender, "commands.publish.started", new Object[] {var3});
    028            }
    029            else
    030            {
    031                notifyAdmins(par1ICommandSender, "commands.publish.failed", new Object[0]);
    032            }
    033        }
    034    }