12#ifndef MINESERVER_UUID_H
13#define MINESERVER_UUID_H
29 std::array<std::byte, 16> bytes;
30 MinecraftUUID(
const std::array<std::byte, 16> &bytes) : bytes(bytes) {}
MinecraftUUID compliant data holder.
Definition uuid.h:27
static MinecraftUUID newRandom()
Constructs a new random MinecraftUUID.
Definition uuid.cpp:74
static MinecraftUUID fromUsername(const std::string &name)
Constructs an MinecraftUUID from an username.
Definition uuid.cpp:80
bool operator==(const MinecraftUUID &other)
Equality operator.
Definition uuid.cpp:25
std::string getTrimmed() const
Get the hex of the MinecraftUUID without hyphens.
Definition uuid.cpp:62
static MinecraftUUID fromHex(const std::string &hexString)
Contructs an MinecraftUUID from an hex string.
Definition uuid.cpp:131
std::string getFull() const
Get the hex of the MinecraftUUID with hyphens.
Definition uuid.cpp:30
static void loadLua(lua_State *state, const char *namespaceName)
Loads MinecraftUUID to the lua state.
Definition uuid.cpp:173
const std::byte * getBytes() const
Get the raw bytes of the MinecraftUUID.
Definition uuid.cpp:69
static MinecraftUUID fromBytes(const std::byte *buff)
Constructs an MinecraftUUID from the raw bytes.
Definition uuid.cpp:166
MinecraftUUID()
Construct a new MinecraftUUID object.
Definition uuid.cpp:19
constexpr std::string_view type_name()
Gets the name of the type paramater.
Definition event.h:56