add console command headers
This commit is contained in:
parent
b5c0ea3efe
commit
5f1f727878
22
mcpe/DedicatedServerCommandOrigin.h
Normal file
22
mcpe/DedicatedServerCommandOrigin.h
Normal file
@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "string.h"
|
||||
|
||||
class Minecraft;
|
||||
|
||||
class CommandOrigin {
|
||||
};
|
||||
|
||||
class DedicatedServerCommandOrigin : public CommandOrigin {
|
||||
|
||||
public:
|
||||
|
||||
static void (*DedicatedServerCommandOrigin_construct)(DedicatedServerCommandOrigin*, mcpe::string const&, Minecraft&);
|
||||
|
||||
char filler[0x1C];
|
||||
|
||||
DedicatedServerCommandOrigin(mcpe::string const& s, Minecraft& m) {
|
||||
DedicatedServerCommandOrigin_construct(this, s, m);
|
||||
}
|
||||
|
||||
};
|
||||
15
mcpe/Minecraft.h
Normal file
15
mcpe/Minecraft.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
class MinecraftCommands;
|
||||
|
||||
class Minecraft {
|
||||
|
||||
public:
|
||||
|
||||
static MinecraftCommands* (*Minecraft_getCommands)(Minecraft*);
|
||||
|
||||
MinecraftCommands* getCommands() {
|
||||
return Minecraft_getCommands(this);
|
||||
}
|
||||
|
||||
};
|
||||
28
mcpe/MinecraftCommands.h
Normal file
28
mcpe/MinecraftCommands.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "string.h"
|
||||
|
||||
class CommandOrigin;
|
||||
|
||||
enum class MCCATEGORY {
|
||||
//
|
||||
};
|
||||
|
||||
struct MCRESULT {
|
||||
bool success;
|
||||
MCCATEGORY category;
|
||||
unsigned short code;
|
||||
};
|
||||
|
||||
class MinecraftCommands {
|
||||
|
||||
public:
|
||||
|
||||
static MCRESULT (*MinecraftCommands_requestCommandExecution)(MinecraftCommands*, std::unique_ptr<CommandOrigin>, mcpe::string const&, mcpe::string&);
|
||||
|
||||
MCRESULT requestCommandExecution(std::unique_ptr<CommandOrigin> o, mcpe::string const& s, mcpe::string& s2) {
|
||||
return MinecraftCommands_requestCommandExecution(this, std::move(o), s, s2);
|
||||
}
|
||||
|
||||
};
|
||||
@ -24,7 +24,9 @@ class ResourcePackManager;
|
||||
class ServerInstance {
|
||||
|
||||
public:
|
||||
char filler[0x300];
|
||||
char filler[0xC];
|
||||
Minecraft* minecraft;
|
||||
char filler2[0x300];
|
||||
|
||||
static void (*ServerInstance_construct)(
|
||||
ServerInstance*,
|
||||
|
||||
@ -137,3 +137,15 @@ void** ResourcePackStack::vtable_sym;
|
||||
|
||||
Scheduler* (*Scheduler::singleton)();
|
||||
void (*Scheduler::Scheduler_processCoroutines)(Scheduler*, std::chrono::duration<long long>);
|
||||
|
||||
#include "Minecraft.h"
|
||||
|
||||
MinecraftCommands* (*Minecraft::Minecraft_getCommands)(Minecraft*);
|
||||
|
||||
#include "MinecraftCommands.h"
|
||||
|
||||
MCRESULT (*MinecraftCommands::MinecraftCommands_requestCommandExecution)(MinecraftCommands*, std::unique_ptr<CommandOrigin>, mcpe::string const&, mcpe::string&);
|
||||
|
||||
#include "DedicatedServerCommandOrigin.h"
|
||||
|
||||
void (*DedicatedServerCommandOrigin::DedicatedServerCommandOrigin_construct)(DedicatedServerCommandOrigin*, mcpe::string const&, Minecraft&);
|
||||
Loading…
x
Reference in New Issue
Block a user