-
Notifications
You must be signed in to change notification settings - Fork 0
I | Utility: CustomItemUtils
Sartaj Singh edited this page May 29, 2025
·
3 revisions
CustomItemUtils helps you identify and work with your special items by material and display name.
What it does:
Checks if the ItemStack is both the correct material and has the specified display name.
Example:
if (CustomItemUtils.isCustomItem(item, Material.BLAZE_ROD, "§dMagic Wand")) {
// This is the Magic Wand
}What it does:
Searches a player's inventory for a custom item matching the material/display name.
Example:
ItemStack wand = CustomItemUtils.getCustomItem(player, Material.BLAZE_ROD, "§dMagic Wand");
if (wand != null) {
// Player has the custom wand
}- Always use
isCustomItem()before running custom behavior for your items. - Use
getCustomItem()for inventory checks, e.g., quest logic.
- Home
- A | Getting Started & Plugin Overview
- B | The Registry System: Items, Foods, Commands, Events
- C | Creating Custom Items
- D | Creating Custom Foods
- E | Advanced: Custom Effects in FXItems
- F | Creating Custom Commands
- G | Creating Custom Events & Behaviors
- H | Utility: CooldownUtils
- I | Utility: CustomItemUtils
- J | Utility: EffectUtils
- K | Utility: ManaUtils
- L | Utility: OneTimeCraftUtils
- M | Utility: TeleportUtils
- N | Utility: ProjectileUtils
- O | Utility: GammaUtils
- P | Utility: EntitySizeUtils
- Q | FXItems API (com.noctify.API) & Making Addons
- R | Advanced Techniques, Gotchas & FAQ
- S | Auto-Registration System
- T | Migration Guide (v1.1 → v1.2+)
- U | Changelog