generated from LiteLDev/liteloaderbds-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
128 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "command/Commands.h" | ||
#include "worldedit/WorldEdit.h" | ||
|
||
namespace we { | ||
|
||
std::vector<std::pair<std::string, std::function<void()>>> setupCommandFunctions; | ||
|
||
void setupCommands() { | ||
for (auto& [name, fn] : setupCommandFunctions) { | ||
WEDEBUG("setup command {}", name); | ||
try { | ||
fn(); | ||
} catch (...) { | ||
logger().error("threw from setup command {}", name); | ||
ll::error_utils::printCurrentException(logger()); | ||
} | ||
WEDEBUG("setup command {} done", name); | ||
} | ||
} | ||
|
||
bool addSetup(std::string name, std::function<void()> fn) noexcept { | ||
setupCommandFunctions.emplace_back(std::move(name), std::move(fn)); | ||
return true; | ||
} | ||
|
||
} // namespace we |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
#pragma once | ||
|
||
#include "command/region/RegionCommands.h" | ||
#include "worldedit/Global.h" | ||
|
||
namespace we { | ||
// void setupTick(); | ||
// void setupbrush(); | ||
void setupCommands() { | ||
setupRegionCommands(); | ||
// setupTick(); | ||
// setupbrush(); | ||
} | ||
|
||
void setupCommands(); | ||
|
||
bool addSetup(std::string name, std::function<void()>) noexcept; | ||
|
||
} // namespace we |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.