SimpleItem

class SimpleItem(name: String, material: Material)

Represents a simple custom item with basic attributes like name, material, lore, and special effects.

This class provides an easy way to create basic items in Minecraft with custom names, lore, glow effects, unbreakable properties, custom model data, and item amounts. The created item can be registered as a CustomItem and given to players.

Parameters

name

The name of the item.

material

The material type of the item.

Constructors

Link copied to clipboard
constructor(name: String, material: Material)

Functions

Link copied to clipboard
fun amount(amount: Int): SimpleItem

Sets the amount (stack size) of the item.

Link copied to clipboard

Builds and returns the CustomItem representation of the item.

Link copied to clipboard

Sets the custom model data for the item.

Link copied to clipboard

Adds a glowing effect to the item.

Link copied to clipboard
fun lore(vararg lines: String): SimpleItem

Adds lore (descriptive text) to the item.

Link copied to clipboard

Marks the item as unbreakable.