LeviLamina
Loading...
Searching...
No Matches
FormBase.h
1#pragma once
2
3#include "mc/network/packet/ModalFormCancelReason.h"
4#include "mc/world/actor/player/Player.h"
5
6namespace ll::form {
7
8enum class FormType { None = -1, SimpleForm, ModalForm, CustomForm };
9
10using FormCancelReason = std::optional<ModalFormCancelReason>;
11
12class Form {
13protected:
14 virtual ~Form() = default;
15
16public:
17 using RawFormCallback = std::function<void(Player&, std::optional<std::string>, FormCancelReason)>;
18
19 LLAPI static bool sendRawTo(Player& player, std::string const& formData, RawFormCallback callback = {});
20
21 LLAPI static bool sendRawUpdate(Player& player, std::string const& formData, RawFormCallback callback = {});
22};
23
24} // namespace ll::form
Definition Player.h:123
Definition FormBase.h:12