Skip to content

Commit

Permalink
refactor: remove some useless output
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Aug 4, 2024
1 parent 57b6d81 commit cd5191d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
16 changes: 3 additions & 13 deletions src/Plugin.cpp → src/LegacyParticleAPI.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "Plugin.h"
#include "LegacyParticleAPI.h"
#include "ll/api/memory/Hook.h"
#include "mc/resources/ResourcePackRepository.h"

Expand All @@ -22,23 +22,13 @@ static std::unique_ptr<LegacyParticleAPI> instance;
LegacyParticleAPI& LegacyParticleAPI::getInstance() { return *instance; }

bool LegacyParticleAPI::load() {
getSelf().getLogger().info("Loading...");
// Code for loading the plugin goes here.
ResourceInitHook::hook();
return true;
}

bool LegacyParticleAPI::enable() {
getSelf().getLogger().info("Enabling...");
// Code for enabling the plugin goes here.
return true;
}
bool LegacyParticleAPI::enable() { return true; }

bool LegacyParticleAPI::disable() {
getSelf().getLogger().info("Disabling...");
// Code for disabling the plugin goes here.
return true;
}
bool LegacyParticleAPI::disable() { return true; }

} // namespace legacy_particleapi

Expand Down
5 changes: 0 additions & 5 deletions src/Plugin.h → src/LegacyParticleAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,12 @@ class LegacyParticleAPI {

[[nodiscard]] ll::mod::NativeMod& getSelf() const { return mSelf; }

/// @return True if the plugin is loaded successfully.
bool load();

/// @return True if the plugin is enabled successfully.
bool enable();

/// @return True if the plugin is disabled successfully.
bool disable();

// TODO: Implement this method if you need to unload the plugin.
// /// @return True if the plugin is unloaded successfully.
// bool unload();

private:
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if not has_config("vs_runtime") then
set_runtimes("MD")
end

add_requires("levilamina 0.13.4")
add_requires("levilamina 0.13.5")

target("LegacyParticleAPI")
add_cxflags(
Expand Down

0 comments on commit cd5191d

Please sign in to comment.