Skip to content

Commit 8a5bb03

Browse files
committed
refactor(core): remove legacy plugin helper traits
1 parent ce9b115 commit 8a5bb03

8 files changed

Lines changed: 35 additions & 343 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ elprobe run <package>
341341
- Removed the unused legacy `imperazim\components\config\Config`,
342342
`imperazim\components\plugin\ConfigManager` and
343343
`imperazim\components\plugin\ExceptionHandler` helpers from the core.
344+
- Removed unused plugin helper traits for language files and resource-pack
345+
registration:
346+
`PluginLanguageTrait`, `PluginResourcePacksTrait`,
347+
`PluginCdnResourcePackTrait` and `components\utils\ResourcePacks`.
344348
- `imperazim\components\filesystem\File` no longer depends on the removed
345349
Config wrapper; pass a directory string or use PocketMine `Config` directly.
346350
- Component enable/disable notices now use PocketMine `TextFormat` constants

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ The old `imperazim\components\config\Config`,
213213
the active core. Use PocketMine's `Config` directly, plugin-owned registries or
214214
domain-specific exception handling until a focused config/commons package exists.
215215

216+
The old plugin helper traits for language files and resource-pack registration
217+
were removed as well:
218+
`PluginLanguageTrait`, `PluginResourcePacksTrait`,
219+
`PluginCdnResourcePackTrait` and `components\utils\ResourcePacks`. Keep
220+
localization/resource-pack bootstrapping inside the owning plugin for now, or
221+
move it to a dedicated package if the ecosystem needs one later.
222+
216223
Use each standalone repository for complete API documentation and examples.
217224

218225
## Package and standalone modes

changelogs/3.0.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,10 @@ Reload rereads config files for future EasyLibrary operations. It does not:
15341534
`imperazim\components\plugin\ConfigManager` and
15351535
`imperazim\components\plugin\ExceptionHandler` were removed from the active
15361536
core.
1537+
- The unused plugin helper traits for language files and resource-pack
1538+
registration were removed from the active core:
1539+
`PluginLanguageTrait`, `PluginResourcePacksTrait`,
1540+
`PluginCdnResourcePackTrait` and `components\utils\ResourcePacks`.
15371541
- `imperazim\components\filesystem\File` no longer depends on the removed
15381542
Config wrapper. New code should pass a directory string and file metadata, or
15391543
use PocketMine `Config` directly for normal config files.
@@ -1564,6 +1568,13 @@ now be either plugin-owned, normal PocketMine `Config` usage, EasyLibrary
15641568
Config Split services for EasyLibrary internals, or a future focused config
15651569
package if that becomes useful.
15661570

1571+
The removed language/resource-pack traits had the same problem in a more
1572+
PocketMine-specific shape: they were convenience helpers, not package-manager
1573+
infrastructure. The resource-pack path also relied on PocketMine internals and
1574+
reflection, which should not be presented as a stable EasyLibrary core API. In
1575+
3.x, localization and resource-pack bootstrapping should stay inside the plugin
1576+
that owns those assets until a focused library is deliberately designed.
1577+
15671578
The component logging polish is intentionally small but useful for the 3.x
15681579
cleanup: active core output should be generated through PocketMine formatting
15691580
APIs instead of embedded formatting bytes. This keeps console output and future
@@ -1583,6 +1594,10 @@ If a plugin imported one of the other removed helper namespaces, move that code
15831594
into the plugin itself for now. When a focused official lib exists, prefer that
15841595
package instead of depending on EasyLibrary core for gameplay or utility APIs.
15851596

1597+
If a plugin used the removed language or resource-pack traits, copy that
1598+
bootstrapping into the owning plugin for now. Do not rely on EasyLibrary core to
1599+
register resource packs through reflection in 3.x.
1600+
15861601
If old code used the removed Config wrapper with `File`, migrate it to explicit
15871602
file metadata:
15881603

docs/migration.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,21 @@ Removed 2.x-era helpers:
8888
| `imperazim\components\config\Config` | PocketMine `Config` directly or EasyLibrary Config Split services |
8989
| `imperazim\components\plugin\ConfigManager` | Plugin-owned config registry or future dedicated config lib |
9090
| `imperazim\components\plugin\ExceptionHandler` | Native try/catch, domain-specific exceptions or future diagnostics/result helpers |
91+
| `imperazim\components\plugin\traits\PluginLanguageTrait` | Plugin-owned localization or future dedicated text/config lib |
92+
| `imperazim\components\plugin\traits\PluginResourcePacksTrait` | Plugin-owned resource-pack bootstrapping |
93+
| `imperazim\components\plugin\traits\PluginCdnResourcePackTrait` | Plugin-owned CDN/resource-pack integration |
94+
| `imperazim\components\utils\ResourcePacks` | Plugin-owned resource-pack registration or future dedicated resource-pack lib |
9195

9296
The old `File` constructor no longer accepts the removed
9397
`imperazim\components\config\Config` wrapper. Pass a directory string and file
9498
metadata explicitly, or use PocketMine `Config` directly when you need a normal
9599
configuration file.
96100

101+
The removed resource-pack helpers used PocketMine internals and reflection.
102+
Do not depend on EasyLibrary core for that behavior in 3.x; keep resource-pack
103+
registration explicit in the plugin that owns the pack until a focused API is
104+
designed.
105+
97106
For plugin code, prefer normal PMMP dependency declarations instead of assuming
98107
EasyLibrary always ships a class:
99108

src/imperazim/components/plugin/traits/PluginCdnResourcePackTrait.php

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/imperazim/components/plugin/traits/PluginLanguageTrait.php

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/imperazim/components/plugin/traits/PluginResourcePacksTrait.php

Lines changed: 0 additions & 107 deletions
This file was deleted.

0 commit comments

Comments
 (0)