ShatteredPrism/launcher/minecraft/Agent.h
Reider745 60234a550b
Some checks failed
CodeQL Code Scanning / CodeQL (push) Has been cancelled
Build Application / Build Debug (push) Has been cancelled
Nix / Build (${{ matrix.system }}) (macos-13, x86_64-darwin) (push) Has been cancelled
Nix / Build (${{ matrix.system }}) (macos-14, aarch64-darwin) (push) Has been cancelled
Nix / Build (${{ matrix.system }}) (ubuntu-22.04, x86_64-linux) (push) Has been cancelled
Nix / Build (${{ matrix.system }}) (ubuntu-22.04-arm, aarch64-linux) (push) Has been cancelled
Update Flake Lockfile / update-flake (push) Has been cancelled
feat: auto install modpack & choise nickname
2025-04-15 11:13:45 +03:00

35 lines
965 B
C++
Executable File

#pragma once
#include <QString>
#include <unordered_set>
#include "Library.h"
static const std::unordered_set<std::string> MANAGED_AGENTS = { "moe.yushi:authlibinjector" };
static const std::map<std::string, std::string> AGENT_CLASS_TO_MANAGED_AGENT = { { "moe.yushi.authlibinjector.Premain",
"moe.yushi:authlibinjector" } };
class Agent;
using AgentPtr = std::shared_ptr<Agent>;
class Agent {
public:
Agent(LibraryPtr library, const QString& argument)
{
m_library = library;
m_argument = argument;
}
public: /* methods */
LibraryPtr library() { return m_library; }
QString argument() { return m_argument; }
protected: /* data */
/// The library pointing to the jar this Java agent is contained within
LibraryPtr m_library;
/// The argument to the Java agent, passed after an = if present
QString m_argument;
};