4jcraft/targets/minecraft/commands/CommandDispatcher.h
JuiceyDev b3017f5948
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Revert "yuri: second yuri batch"
This reverts commit 1acb679804.
2026-04-07 13:06:37 +02:00

25 lines
559 B
C++

#pragma once
#include <stdint.h>
#include <format>
#include <memory>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "minecraft/commands/CommandsEnum.h"
class Command;
class CommandSender;
class CommandDispatcher {
private:
std::unordered_map<EGameCommand, Command*> commandsById;
std::unordered_set<Command*> commands;
public:
int performCommand(std::shared_ptr<CommandSender> sender,
EGameCommand command, std::vector<uint8_t>& commandData);
Command* addCommand(Command* command);
};