DK CommandItems
7 sections
Documentation
Official versions and changelogs
DK CommandItems 1.8-SNAPSHOT
- Specifications of 1.8-Snapshot
- Published: 2026-06-12T20:56:10.045458Z
- Channel: Release
- Loaders: foil, paper, purpur, spigot
- Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
- Dependencies: No declared
DK CommandItems 1.7-SNAPSHOT
- Specifications of 1.7-Snapshot
- Published: 2026-03-15T22:15:07.846646Z
- Channel: Release
- Loaders: bukkit, foil, paper, purpur, spigot
- Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
- Dependencies: No declared
DK CommandItems 1.6-Snapshot
- Specifications of 1.6-Snapshot
- Published: 2026-02-07T14:10:26.336916Z
- Channel: Release
- Loaders: bukkit, foil, paper, purpur, spigot
- Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
- Dependencies: No declared
DKCommandItems - Update v1.2.1 Changelog
New Features
Custom Display Names
- Set Custom Display Names: Added ability to set custom display names for items with full color code support
- Color Code Support: Use
&for color codes (e.g.,&c&lRed Bold,&6&lGolden,&a&oGreen Italic) - Optional Feature: Display names are completely optional - items work with or without them
- Clear Option: Type
clearto remove a previously set display name - Cancel Option: Type
cancelto cancel the display name operation
GUI Improvements
- New Button: Added "Set Custom Display Name" button (paper icon) in Create Item GUI
- Visual Feedback: Shows current display name status in button lore
- Persistent Storage: Display names persist across GUI reopens using static storage
- Better Layout: Reorganized GUI buttons for improved user experience
Technical Changes
Created Class
- Added
playerDisplayNamesstatic Map to store custom display names - New paper case handler for display name input
- Display name is applied to item when creating the custom item
- Proper cleanup of display names when player exits GUI
Color Code Processing
- Automatic conversion of
&toºfor Minecraft color codes - Support for all standard Minecraft color codes (0-9, a-f)
- Support for formatting codes (l=bold, m=strikethrough, n=underline, o=italic, r=reset)
GUI Layout updates
- Display name button added at slot 30
- Command block button moved to slot 32
- Single use toggle moved to slot 34
- Improved visual spacing and organization
How to use
Setting a Custom Display Name
- Open Create Item GUI:
/dkcommanditems→ "Create Custom Item" - Click the "Set Custom Display Name" button (paper icon)
- Type your desired name in chat with color codes
- The GUI will reopen showing your custom display name
- Continue creating your item normally
Color Code Examples
Basic Colors: *
&cRed Text
&aGreen Text
&9Blue Text
&eYellow Text
** With Formatting:**
&c&lRed Bold
&a&oGreen Italic
&9&nBlue Underline
&e&mYellow Strikethrough
Complex Names: *
&6&lLegendary Sword
&c&lF&6&lI&e&lR&a&lE
&b&lHealing &f&lPotion
Available Color Codes
| Code is | Color is | Code is | formats |
|---|---|---|---|
&0 |
black | &l |
The Bold |
&1 |
Dark Blue | &m |
Strikethrough |
&2 |
Dark Green | &n |
underline |
&3 |
Dark Aqua | &o |
Italy * |
&4 |
Dark Red | &r |
Reset |
&5 |
Dark Purple | ||
&6 |
Gold | ||
&7 |
Gray | ||
&8 |
Dark Gray | ||
&9 |
Blue is | ||
&a |
Green | ||
&b |
Aqua | ||
&c |
Red | ||
&d |
Light Purple | ||
&e |
Yellow | ||
&f |
White |
Bug fixed
Display Name Persistence
- Fixed: Display names now persist when reopening the GUI
- Fixed: Display names are properly applied to items when saved
- Fixed: GUI correctly shows "None" when no display name is set
GUI State Management
- Improved: Better handling of player data across GUI instances
- Improved: Static storage ensures display names don't get lost
- Improved: Proper cleanup when player exits or cancels
Compatibility
- Backward Compatible: All existing items continue to work normally
- Optional Feature: Display names are completely optional
- No Breaking Changes: Existing functionality remains unchanged
- Server Compatibility: Works with Paper, Spigot, and Bukkit 1.20+
Use of Examples
Example 1: Legendary Weapon
Display Name: &6&lLegendary Sword
Item ID: LegendarySword
Commands: effect give %player% strength 60 2
Example 2: Healing Item
Display Name: &a&lHealing Potion
Item ID: HealPotion
Commands: effect give %player% regeneration 10 2
Example 3: Rainbow Item
Display Name: &c&lR&6&la&e&li&a&ln&b&lb&9&lo&d&lw
Item ID: RainbowStar
Commands: give %player% diamond 10
Example 4: Simple Name
Display Name: &bTeleport Stone
Item ID: TPStone
Commands: tp %player% 0 64 0
What's Next
This update focuses on giving players more creative freedom with item customization. Future updates may include:
- Custom Lore Lines
- Item enchantment configuration
- Item attribute modification
- More placeholder options
Installation of
- Download the latest version (v1.2.1)
- Stop your server
- Replace the old plugin jar with the new one
- Start your server
- Enjoy the new custom display name feature!
́©Å Important Notes
- Display names are optional - you can skip this step if you want
- Display names are separate from item IDs (internal identifiers)
- Color codes use
¼(the plugin converts automatically) - Type
clearto remove a display name - Type
cancelto cancel the operation
Versions of: 1.2.1
Date of Release: 2024
Compatibility: Minecraft 1.20+
Required Java: 17+
Thank you for using DKCommandItems!
DK CommandItems 1.5 Snapshot
- Filed to:1.5 Snapshot
- Published: 2026-02-04T18:02:02.552423Z
- Channel: Release
- Loaders: bukkit, foil, paper, purpur, spigot
- Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
- Dependencies: No declared
DK CommandItems 1.4 Snapshot
- Specifications of 1.4-Snapshot
- Published: 2026-02-03T20:50:51.671962Z
- Channel: Release
- Loaders: bukkit, foil, paper, purpur, spigot
- Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
- Dependencies: No declared
DK CommandItems 1.3 Snapshot
- Specifications of 1.3-Snapshot
- Published: 2026-02-03T18:14:17.206865Z
- Channel: Release
- Loaders: bukkit, foil, paper, purpur, spigot
- Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
- Dependencies: No declared
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 fixed
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 were not 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:", "Name:", or "Nombre:" in lore
- Display Name Parsing: Extracts item names from "[Delete]" 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 English Lore to English in CustomItem class
- Consistent Language: "Commands:" instead of "Commands:", "Single use" instead of "Single use"
- Cleanup Detection: Removes both English 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 maintenanceability
Configuration Changes
by 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
DK CommandItems 1.2 Snapshot
- Version of 1.2 Snapshot
- Published: 2026-02-03T17:06:03.305343Z
- Channels: Alpha
- Loaders: bukkit, foil, paper, spigot
- Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
- Dependencies: No declared
After defining the item name, the GUI would freeze on papermc.
DK CommandItems 1.1 Snapshot
- Specifications of 1.1 Snapshot
- Published: 2026-01-16T14:00:18.137614Z
- Channel: Release
- Loaders: foil, paper
- Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
- Dependencies: No declared
Added compatibility with Gothic, added English league, and added get items only through dkci give in dkci.
DK CommandItems 1.0-Snapshot
- Specifications of 1.0 Snapshot
- Published: 2025-06-16T19:52:58.836129Z
- Channel: Release
- Loaders: bukkit, paper, purpur, spigot
- Minecraft: 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5
- Dependencies: No declared