mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
fix: commands repository not reset before world open
This commit is contained in:
parent
9ed80ec835
commit
1a00a91b60
3 changed files with 11 additions and 1 deletions
|
|
@ -125,6 +125,10 @@ namespace cmd {
|
|||
const std::unordered_map<std::string, Command>& getCommands() const {
|
||||
return commands;
|
||||
}
|
||||
|
||||
void clear() {
|
||||
commands.clear();
|
||||
}
|
||||
};
|
||||
|
||||
class CommandsInterpreter {
|
||||
|
|
@ -158,5 +162,10 @@ namespace cmd {
|
|||
CommandsRepository* getRepository() const {
|
||||
return repository.get();
|
||||
}
|
||||
|
||||
void reset() {
|
||||
repository->clear();
|
||||
variables.clear();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue