Skip to content

Add script event handler safety checks to prevent invalid usage#909

Merged
GregHib merged 1 commit intomainfrom
script-safety
Mar 7, 2026
Merged

Add script event handler safety checks to prevent invalid usage#909
GregHib merged 1 commit intomainfrom
script-safety

Conversation

@GregHib
Copy link
Owner

@GregHib GregHib commented Mar 7, 2026

Prevents nesting handlers e.g.

playerSpawn {
    playerDespawn {
    }
}

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@codecov
Copy link

codecov bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 90.83969% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.61%. Comparing base (f72767b) to head (de7523a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...s/engine/entity/character/mode/combat/CombatApi.kt 83.33% 3 Missing ⚠️
...tlin/world/gregs/voidps/engine/inv/InventoryApi.kt 57.14% 3 Missing ⚠️
...rc/main/kotlin/world/gregs/voidps/engine/Script.kt 33.33% 1 Missing and 1 partial ⚠️
...orld/gregs/voidps/engine/client/ui/InterfaceApi.kt 91.66% 1 Missing ⚠️
...n/world/gregs/voidps/engine/entity/Approachable.kt 93.75% 1 Missing ⚠️
...kotlin/world/gregs/voidps/engine/entity/Despawn.kt 83.33% 1 Missing ⚠️
...tlin/world/gregs/voidps/engine/entity/Operation.kt 93.75% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...regs/voidps/engine/client/ui/dialogue/Dialogues.kt 47.61% <100.00%> (+5.51%) ⬆️
...gregs/voidps/engine/client/variable/VariableApi.kt 91.89% <100.00%> (+0.98%) ⬆️
...n/world/gregs/voidps/engine/data/SettingsReload.kt 85.71% <100.00%> (+2.38%) ⬆️
...n/kotlin/world/gregs/voidps/engine/entity/Spawn.kt 81.81% <100.00%> (+2.33%) ⬆️
...orld/gregs/voidps/engine/entity/character/Death.kt 90.90% <100.00%> (+0.90%) ⬆️
.../voidps/engine/entity/character/mode/move/Moved.kt 88.57% <100.00%> (+1.47%) ⬆️
...gs/voidps/engine/entity/character/npc/hunt/Hunt.kt 85.18% <100.00%> (+2.57%) ⬆️
.../voidps/engine/entity/character/player/Teleport.kt 48.07% <100.00%> (+4.32%) ⬆️
...dps/engine/entity/character/player/skill/Skills.kt 92.50% <100.00%> (+1.07%) ⬆️
...main/kotlin/world/gregs/voidps/engine/inv/Items.kt 84.52% <100.00%> (+2.33%) ⬆️
... and 9 more
@@             Coverage Diff              @@
##               main     #909      +/-   ##
============================================
+ Coverage     38.50%   38.61%   +0.11%     
  Complexity     7679     7679              
============================================
  Files          1560     1560              
  Lines         61808    61939     +131     
  Branches      15688    15691       +3     
============================================
+ Hits          23798    23917     +119     
- Misses        32703    32714      +11     
- Partials       5307     5308       +1     
Components Coverage Δ
Content 36.27% <100.00%> (+<0.01%) ⬆️
Engine 45.39% <90.69%> (+0.55%) ⬆️
Network 60.85% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GregHib GregHib merged commit d87c624 into main Mar 7, 2026
5 checks passed
@GregHib GregHib deleted the script-safety branch March 7, 2026 20:52
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.

1 participant