-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add caching and middleware support for placeholders, enhance documentation generation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…cumentation generation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds significant new features to the placeholder management system: caching support via @Cache annotation, middleware processing via @Middleware annotation, permission requirements via @RequirePermission annotation, and automatic documentation generation. It also enhances existing annotations with description and example fields.
Key Changes
- Introduces three new annotations (
@Cache,@Middleware,@RequirePermission) and a middleware interface for extensible placeholder processing - Refactors caching logic to support configurable cache durations with TimeUnit-based control
- Adds
generateDocs()method to automatically create documentation files listing all registered placeholders with their metadata
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
PlaceholderMiddleware.java |
New functional interface for processing placeholder results before returning to PlaceholderAPI |
RequirePermission.java |
New annotation for permission-gated placeholders with customizable denial messages |
RelationalPlaceholder.java |
Added optional description and example fields for documentation generation |
PlaceholderIdentifier.java |
Added optional description and example fields for documentation generation |
Middleware.java |
New annotation to specify middleware chain for placeholder result processing |
Cache.java |
New annotation for configurable caching with duration and TimeUnit support |
BenthPAPIManager.java |
Major refactoring: added middleware support, permission checking, improved caching logic, and documentation generation functionality |
.gitignore |
Added dependency-reduced-pom.xml to ignore list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/com/bentahsin/benthpapimanager/BenthPAPIManager.java
Outdated
Show resolved
Hide resolved
src/main/java/com/bentahsin/benthpapimanager/BenthPAPIManager.java
Outdated
Show resolved
Hide resolved
src/main/java/com/bentahsin/benthpapimanager/BenthPAPIManager.java
Outdated
Show resolved
Hide resolved
src/main/java/com/bentahsin/benthpapimanager/BenthPAPIManager.java
Outdated
Show resolved
Hide resolved
src/main/java/com/bentahsin/benthpapimanager/BenthPAPIManager.java
Outdated
Show resolved
Hide resolved
…java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.