Tags
Creators
Details
Licensed ARR
Published last year
Updated 4 months ago
All versions
1.3-SNAPSHOT
Release
DK CommandItems 1.3-SNAPSHOT9 months ago 25
Uploaded by
Compatibility
Minecraft: Java Edition
1.21.x
Platforms
Bukkit
Folia
Paper
Purpur
Spigot
Changes
DKCommandItems - Changelog v1.3
π New Features
Customizable Lore System
- Toggle Default Lore: Added
show-default-loreoption in config.yml to enable/disable the default plugin lore - Hidden Identifier: When disabled, only an invisible identifier is added to items
- Custom Lore Freedom: Allows players to create items with fully customized lore without plugin information
- Configuration: New setting in config.yml with comments in English, Portuguese, and Spanish
Case-Insensitive Placeholders
- Flexible Placeholders: All placeholders now work regardless of capitalization
- Supported Formats:
%player%,%Player%,%PLAYER%,%PlAyEr%all work correctly - All Placeholders: Applies to all placeholders including
%world%,%x%,%y%,%z%,%health%,%food%,%level%
π§ Bug Fixes
GUI Listener Management
- Fixed Duplicate Messages: Implemented GUIManager to prevent multiple listeners from being active simultaneously
- Automatic Cleanup: Old GUI listeners are automatically unregistered when opening new GUIs
- No More Duplicates: Resolved issues with duplicate messages when saving items, getting items, toggling settings, and listing commands
- Centralized Control: All GUIs now use GUIManager.registerGUIListener() for proper listener management
Single-Use Item Consumption
- Fixed Consumption Order: Single-use items are now consumed BEFORE executing commands
- Prevents Loss: Solves the issue where items weren't consumed when using commands like
kill %player% - Proper Verification: Added checks to ensure the item is still in hand before consumption
- Debug Logging: Added logging to track item consumption for troubleshooting
Delete Items GUI
- Fixed Item Detection: Improved item name extraction from display names and lore
- Multi-Language Support: Detects items with "Name:", "Nome:", or "Nombre:" in lore
- Display Name Parsing: Extracts item names from "[DELETAR]" or "[DELETE]" prefixes
- Confirmation Dialog: Fixed confirmation GUI to use correct localized titles
- Proper Deletion: Confirmation buttons now work correctly instead of giving items
NullPointerException Fixes
- CreateItemGUI: Fixed null baseItem error by saving item reference before chat input
- CommandsGUI: Added validation to prevent null item references
- Error Messages: Added user-friendly error messages when item base is not found
Localization
- English Lore: Changed hardcoded Portuguese lore to English in CustomItem class
- Consistent Language: "Commands:" instead of "Comandos:", "Single use" instead of "Uso ΓΊnico"
- Cleanup Detection: Removes both Portuguese and English lore lines when updating items
π οΈ Technical Improvements
GUIManager Utility Class
- Centralized Management: New utility class to manage all GUI listeners
- Active Listener Tracking: Maintains a set of active GUI listeners
- Automatic Unregistration: Unregisters all previous listeners when registering a new one
- Memory Efficient: Prevents listener accumulation and memory leaks
Listener Lifecycle
- isActive Flag: Added to all GUI classes to track listener state
- HandlerList Cleanup: Proper use of HandlerList.unregisterAll() before opening new GUIs
- Event Priority: Maintained EventPriority.HIGHEST for critical GUI events
- Thread Safety: Proper use of SchedulerUtil for async operations
Code Quality
- Better Error Handling: Added try-catch blocks with informative error messages
- Logging: Added debug logging for troubleshooting item consumption and GUI operations
- Validation: Added null checks and validation before operations
- Comments: Added explanatory comments in English for better code maintainability
π Configuration Changes
config.yml
# Show default lore on custom items
show-default-lore: true
- Default: true (shows plugin information in lore)
- When false: Only adds hidden identifier, preserves original item lore
π Compatibility
- Backward Compatible: Items created with previous versions continue to work
- Lore Detection: Recognizes both old (Portuguese) and new (English) lore formats
- Automatic Migration: Old items work seamlessly with new system
- No Data Loss: All existing items and configurations are preserved
π Known Issues Resolved
- β Duplicate messages when saving items
- β Duplicate messages when getting items from GUI
- β Duplicate messages when toggling single-use
- β Duplicate messages when listing commands
- β Single-use items not being consumed
- β Items not consumed when using kill command
- β Delete confirmation not working
- β NullPointerException in CommandsGUI
- β Portuguese lore showing in English mode
- β Case-sensitive placeholder issues
π Notes
- All GUI classes now use GUIManager for listener registration
- Single-use items are consumed immediately before command execution
- Placeholders are now case-insensitive for better user experience
- Default lore is now in English for international compatibility
- Delete confirmation GUI properly detects item names in all languages
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:hPUFBB5M:JTI22Baa"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:hPUFBB5M:JTI22Baa"
}

