Prevent a ClassCastException thrown from WorldHandler.handleUpdateEvent when Purpur 1.19.4 StructureGrowEvent (and similar) returns captured BlockState objects instead of Block instances.
Description
Add BlockState support in src/main/java/no/jckf/dhsupport/bukkit/handler/WorldHandler.java and detect when reflective event methods return a BlockState value.
Make list handling robust by iterating List<?> and processing each item as either Block or BlockState before calling the existing touchLod logic.
Testing
Ran ./gradlew compileJava which failed in this environment due to a Gradle/Kotlin JVM version parsing error (IllegalArgumentException: 25.0.1) that occurs before project compilation, so an automated build could not be completed here.
Ran ./gradlew compileJava --stacktrace to confirm the failure source, which reproduced the same toolchain parsing error.
### Motivation
- Prevent a `ClassCastException` thrown from `WorldHandler.handleUpdateEvent` when Purpur 1.19.4 `StructureGrowEvent` (and similar) returns captured `BlockState` objects instead of `Block` instances.
### Description
- Add `BlockState` support in `src/main/java/no/jckf/dhsupport/bukkit/handler/WorldHandler.java` and detect when reflective event methods return a `BlockState` value.
- Make list handling robust by iterating `List<?>` and processing each item as either `Block` or `BlockState` before calling the existing `touchLod` logic.
### Testing
- Ran `./gradlew compileJava` which failed in this environment due to a Gradle/Kotlin JVM version parsing error (`IllegalArgumentException: 25.0.1`) that occurs before project compilation, so an automated build could not be completed here.
- Ran `./gradlew compileJava --stacktrace` to confirm the failure source, which reproduced the same toolchain parsing error.
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_69b7da1fc410832fa30e28fd066b2f89)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Motivation
ClassCastExceptionthrown fromWorldHandler.handleUpdateEventwhen Purpur 1.19.4StructureGrowEvent(and similar) returns capturedBlockStateobjects instead ofBlockinstances.Description
BlockStatesupport insrc/main/java/no/jckf/dhsupport/bukkit/handler/WorldHandler.javaand detect when reflective event methods return aBlockStatevalue.List<?>and processing each item as eitherBlockorBlockStatebefore calling the existingtouchLodlogic.Testing
./gradlew compileJavawhich failed in this environment due to a Gradle/Kotlin JVM version parsing error (IllegalArgumentException: 25.0.1) that occurs before project compilation, so an automated build could not be completed here../gradlew compileJava --stacktraceto confirm the failure source, which reproduced the same toolchain parsing error.Codex Task