Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust plugin loading logic, fix #98 #110

Merged
merged 3 commits into from
Dec 18, 2024
Merged

Conversation

engsr6982
Copy link
Contributor

This Pr modifies the plugin loading logic.

  1. change EndstonePluginManager::loadPlugins(std::string directory) to subscript traversal (for loop changed to while to avoid iterator failure)

  2. fix [feature] Issue with Loading Custom Plugins in Endstone due to Plugin Loading Mechanism  #98

@wu-vincent wu-vincent self-requested a review December 18, 2024 22:01
@wu-vincent
Copy link
Member

Thank you for the PR! I'm thrilled to see someone working on a plugin loader for Endstone in languages other than Python!

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 7.98%. Comparing base (b6a7847) to head (309f50e).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/endstone_core/plugin/plugin_manager.cpp 0.00% 8 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #110   +/-   ##
=====================================
  Coverage   7.98%   7.98%           
=====================================
  Files         62      62           
  Lines       4373    4384   +11     
  Branches    1894    1895    +1     
=====================================
+ Hits         349     350    +1     
- Misses      3765    3776   +11     
+ Partials     259     258    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wu-vincent wu-vincent merged commit bb56db7 into EndstoneMC:main Dec 18, 2024
9 checks passed
wu-vincent added a commit that referenced this pull request Dec 18, 2024
* Update server_list_ping_event.h and make fields public

* use proper setters

* add set guid method for ServerListPingEvent

* docs: update README.md

* chore: update symbols.toml for BDS v1.21.50 Windows (not supported yet)

* fix: add missing virtual functions in IResourcePackRepository

* fix: ScriptingGameplayEvent variants

* fix: Dimension class members

* fix: PlayerGameplayEvent variants

* fix: update enums

* fix: Block and BlockLegacy

* fix: Item and ItemRegistry

* fix: Actor class

* fix: BlockSource and BinaryStream

* fix: correct size assertion for Block class

* fix: prevent server crash when comments are present in `world_resource_packs.json`

Fix #100

* feat: improve error logging to include exception details when JSON loading fails

* chore: update symbols.toml for BDS v1.21.50 Linux

* fix: make Level::_cerealContext() a pure virtual function.

* docs: update CHANGELOG.md

* deps: switch to FetchContent for funchook

* fix(event): ensure ScriptMessageEvent is invoked correctly

* fix: remove funchook in conanfile.py

* fix: add missing dependencies in CMakeLists.txt

* fix: compilation error in ScriptingEventCoordinator

* fix: remove funchook from conanfile.py

* feat: add `Block::canContainLiquid` (#107)

* refactor(devtools): remove deprecated material (#109)

* fix: fix material.h and material_type.h

* refactor: rename canDropWithAnyTool to requiresCorrectToolForDrops

* refactor: remove material related things since these things are unused

* docs: add a FIXME notice to biome.h

* fix: update Biome class members

* ci: fix static_assert macros for class size checks

* fix: player inventory not being updated after calling `clear`

close #108

* refactor: correct headers

* feat: add an overload for `/ban` command for player name auto-completion

* refactor: update members in CommandRegistry

* chore(deps): bump scikit-build-core-conan version in pyproject.toml

* fix: ensure the correct plugin loader is selected when loading from file (#110)

* fix: fix EndstonePluginManager::loadPlugin #98

* refactor: improve plugin loading logic in EndstonePluginManager

* refactor: revert back to range-based loop for plugin loading

---------

Co-authored-by: Vincent <[email protected]>

* Update server_list_ping_event.h and make fields public

* use proper setters

* add set guid method for ServerListPingEvent

* docs: fix documentation for the setters

* feat: add python bindings for the setters in `ServerListPingEvent`

* docs: update documentation to improve consistency

---------

Co-authored-by: Vincent <[email protected]>
Co-authored-by: daoge <[email protected]>
Co-authored-by: engsr6982 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Issue with Loading Custom Plugins in Endstone due to Plugin Loading Mechanism
2 participants