Commit f080f81
authored
fix(commands): propagate Essentials and module to tree nodes (#6445)
### What does this PR do?
Fixes an issue where `EssentialsTreeNode` instances did not receive
updated
`Essentials` and `IEssentialsModule` references after registration.
This could lead to null references during command execution,
especially in test environments.
### Changes made
- Override `setEssentials` in `EssentialsTreeCommand`
- Override `setEssentialsModule` in `EssentialsTreeCommand`
- Propagate updated references to all registered nodes
### Why is this needed?
Nodes only received references during registration.
If the parent command updated its references later,
the nodes would retain outdated (null) values.
### Does this PR break compatibility?
No.1 parent 18549a7 commit f080f81
File tree
1 file changed
+19
-0
lines changed- Essentials/src/main/java/com/earth2me/essentials/commands
1 file changed
+19
-0
lines changedLines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
35 | 54 | | |
36 | 55 | | |
37 | 56 | | |
| |||
0 commit comments