Commit 6dc1f06
Move subcommand setup() into PlayerTargetCommand base (#149)
The remaining SonarCloud duplication was the structurally identical
constructor + setup() shared by GeneratorWhyCommand and ResetCommand
(Sonar normalizes the differing string literals).
Implement setup() once in the PlayerTargetCommand base, deriving the
permission and locale keys from the subcommand label, and remove the
per-command setup() overrides. The subcommands now only provide a
constructor and their own executeForTarget.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01D7NWPeGXmsUJnnX42X24Rd1 parent ed109d0 commit 6dc1f06
1 file changed
Lines changed: 12 additions & 22 deletions
File tree
- src/main/java/world/bentobox/magiccobblestonegenerator/commands/admin
Lines changed: 12 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
114 | 126 | | |
115 | 127 | | |
116 | 128 | | |
| |||
243 | 255 | | |
244 | 256 | | |
245 | 257 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
| |||
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | 333 | | |
344 | 334 | | |
345 | 335 | | |
| |||
0 commit comments