Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: cancellable events, expanded API, and PlaceholderAPI support#3

Open
derrickmehaffy wants to merge 2 commits into
mainHyperSystems-Development/HyperEssentials:mainfrom
feat/api-events-placeholdersHyperSystems-Development/HyperEssentials:feat/api-events-placeholdersCopy head branch name to clipboard
Open

feat: cancellable events, expanded API, and PlaceholderAPI support#3
derrickmehaffy wants to merge 2 commits into
mainHyperSystems-Development/HyperEssentials:mainfrom
feat/api-events-placeholdersHyperSystems-Development/HyperEssentials:feat/api-events-placeholdersCopy head branch name to clipboard

Conversation

@derrickmehaffy
Copy link
Copy Markdown
Contributor

Summary

  • Add cancellable event system with 58 event classes (29 PreEvent + 29 PostEvent) across 7 modules, matching HyperFactions' pattern exactly
  • Expand public API from 12 to 80+ methods covering all modules with EventBus access and manager accessors
  • Add PlaceholderAPI and WiFlowPlaceholderAPI support with ~37 placeholders across homes, kits, moderation, utility, warps, spawns, and TPA

Test plan

  • Build succeeds (./gradlew :HyperEssentials:shadowJar)
  • Build succeeds without WiFlow lib (conditional compilation)
  • Deploy to dev server, verify PAPI placeholders resolve (%essentials_home_count%, etc.)
  • Test event cancellation: register listener cancelling HomeSetPreEvent, verify /sethome is blocked
  • Test PostEvent: register listener on HomeSetEvent, verify it fires after successful /sethome
  • Verify disabled modules don't expose placeholder data (return empty/false)
  • Smoke test all manager event firing (ban, mute, kit claim, warp set, etc.)

🤖 Generated with Claude Code

… support

EventBus Infrastructure:
- Add Cancellable interface with cancel reason support
- Upgrade EventBus with publishCancellable() for pre-event interception

Events (58 classes across 7 modules):
- homes: set, delete, teleport, share, unshare, setDefault
- warps: set, delete, teleport
- spawns: set, delete, teleport
- kits: claim, create, delete
- moderation: ban, unban, mute, unmute, kick, warn
- teleport: TPA send/accept/deny, back, RTP
- utility: fly, god, AFK toggle
All with cancellable PreEvent + immutable PostEvent record pairs.

Public API expanded from 12 to 80+ methods:
- Home, Kit, Moderation, Utility sections added
- Warp, Spawn, Back, TPA sections expanded
- EventBus access: registerEventListener/unregisterEventListener
- Manager accessors for advanced plugin use

PlaceholderAPI integration (~37 placeholders):
- HyperEssentialsExpansion for PAPI (%%essentials_*%%)
- WiFlowExpansion for WiFlow ({essentials_*})
- Bridge classes with runtime detection and reflection
- Conditional WiFlow compilation in build.gradle
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.