Skip to content

Enums

The core system provides a set of enums that define standard values used across the project.

Always use these enums instead of duplicating values manually.


General Notes

  • Most enums provide static lookup methods for fast access.
  • Many use cached maps internally - prefer those methods over manual iteration.
  • These enums are part of the core API - do not reimplement similar logic.

ChatDisplayType

Defines where a message is displayed on the screen.

  • CHAT → normal chat message
  • TITLE → center screen title
  • ACTION_BAR → above the hotbar

ItemColor

Maps PixelColor to Bukkit Material (wool).

Used for building color selection inventories.

Useful methods:

  • getByMaterial(Material) → get color from item
  • getByColor(Color) → get item from color

ItemGlassPaneColor

Same concept as ItemColor, but for glass panes.

Used for UI / inventory layouts.


PixelChatSmiley

Handles chat smileys and their replacements.

Examples:

  • :)◕‿◕
  • <3

Useful methods:

  • getSmiley(String) → resolve smiley
  • setSmileys(String) → replace all formats in a message

Also contains all emoji characters for filtering (EMOJI_CHARS).


PixelColor

Central color system used across the entire project.

Supports:

  • Minecraft color codes
  • Hex colors
  • Adventure format
  • Rank-based color permissions

Key features:

  • getByChar(char) → resolve from color code
  • getByHex(String) → resolve from hex
  • hasNeededRank(Rank) → permission check

Represents predefined server-related links (website, discord, shop, etc.).

Provides:

  • colored display (getColor())
  • raw url (getRawUrl())
  • full url (getUrl())

Helper methods:

  • toClickable() → formatted clickable message
  • toString() → formatted display string

PixelVersion

Represents supported Minecraft versions.

Provides:

  • version id (protocol)
  • version name (e.g. "1.20.4")

Useful methods:

  • getVersion(String) → resolve by name
  • getVersion(int) → resolve by id

Constants:

  • CURRENT_VERSION
  • HIGHEST_VERSION

BreedItem

Defines which items can be used to breed specific entities.

Examples:

  • PIG → carrot, beetroot, potato
  • COW → wheat
  • WOLF → various meats

Useful methods:

  • getByEntity(EntityType) → get valid materials
  • isBreedItem(EntityType, Material) → check if valid