HelpChat Wiki
  • Welcome
  • HelpChat Plugins
    • ChatChat
      • Commands
      • Permissions
      • Formats
      • Channels
      • Mentions
      • Placeholders
      • API
        • Getting Started
        • ChatChatAPI
        • Events
      • Files
    • DeluxeMenus
      • Commands & Permissions
      • Options & Configurations
        • GUI
        • Item
        • Requirements
        • Command Registration
      • Meta (Metadata)
      • External menus
      • Example GUI menus
      • Plugin's files
    • DeluxeTags
      • Commands & Permissions
      • Placeholders
      • Plugin's files
    • PlaceholderAPI
  • Clip's Plugins
    • AutoSell
      • Commands & Permissions
      • Placeholders
      • Plugin's files
    • ActionAnnouncer
      • Commands & Permissions
      • Plugin's files
      • API
    • ChatReaction
      • Commands & Permissions
      • Plugin's files
    • DeluxeChat
      • Installation
      • Commands & Permissions
      • Placeholders
      • Config options
      • Plugin's files
    • DeluxeCommands
      • Commands & Permissions
      • Plugin's files
    • DeluxeJoin
      • Commands & Permissions
      • Plugin's files
    • EzRanksPro
      • Commands & Permissions
      • Configuration
    • EzPrestige
      • Commands & Permissions
      • Configuration
    • InventoryFull
      • Commands & Permissions
      • Configuration
    • MessageAnnouncer
      • Commands & Permissions
      • Configuration
    • MineCrates
      • Commands & Permissions
      • Configuration
    • NoFlyZone
      • Commands & Permissions
      • Configuration
  • Funnycube's Plugins
    • CowPunch
      • Commands & Permissions
    • Firework Chests
      • Commands & Permissions
      • Configuration
    • Fish Slapper
      • Commands & Permissions
      • Configuration
    • RawMsg
      • Commands & Permissions
    • Spit
      • Commands & Permissions
    • Temp MOTD
      • Commands & Permissions
      • Configuration
  • Glare's Plugins
    • Guilds [W.I.P Migration]
      • Installation
      • Configuration
        • Buffs
        • Config
        • Roles
        • Tiers
      • Commands & Permissions
      • Placeholders
      • Developer API
    • VoteParty
      • Commands & Permissions
      • Placeholders
      • Configuration
      • API
      • Changelogs
        • v2.30
        • v2.29
        • v2.28
        • v2.27
        • v2.26
        • v2.25
        • v2.24
        • v2.23
        • v2.22
        • v2.21
        • v2.20
        • v2.19
        • v2.18
        • v2.17
        • v2.16
        • v2.15
        • v2.14
        • v2.13
        • v2.12
        • v2.11
        • v2.10
        • v2.9
        • v2.8
        • v2.7
        • v2.6
        • v2.5
        • v2.4
        • v2.3
        • v2.2
        • v2.1
  • piggy's barn
    • Java
      • Gradle
        • Argument
        • Tutorial
      • How to run your minecraft server(s) in IntelliJ
      • How to run your program in IntelliJ
      • Hot Swapping
      • Cheat Sheet
  • ADDITIONAL RESOURCES
    • Discord
    • Paste
    • YAML Parser
    • Java Docs
Powered by GitBook
On this page
  • What is it?
  • Data Types
  • How to use it?
  • What else must I know?
Edit on GitHub
  1. HelpChat Plugins
  2. DeluxeMenus

Meta (Metadata)

Starting with Spigot (and forks such as PaperMC) 1.14, a new feature called Persistent Data Container (PDC) was added. This is a small document explaining what it is and how DeluxeMenus uses it.

PreviousCommand RegistrationNextExternal menus

Last updated 2 months ago

What is it?

The Persistent Data Container is a way to store custom data on a whole range of objects; such as items, entities, and block entities. This data is persistent (DOES NOT disappear on server restart) and is stored in the server files.

DeluxeMenus uses PDC to allow menu creators to store and retrieve custom data for menu users (players). You will find this feature on the wiki usually listed as "meta" or "metadata".

Data Types

While PDC allows storage of a wide range of data types and even allows custom implementation, DeluxeMenus only supports 3 of those types: DOUBLE, INTEGER, STRING. Some times you may see that LONG and BOOLEAN are supported as well, but these two are aliases for INTEGER (LONG) and STRING (BOOLEAN).

Name
Aliases
Data Type

INTEGER

LONG

64 bit signed number

STRING

BOOLEAN

String ("true" or "false" when using BOOLEAN)

DOUBLE

Fractional number from 1.7e−308 to 1.7e+308

How to use it?

Setting a value is pretty easy:

  1. You can use the [meta] action which you can read more about .

  2. You can use the /dm meta <player> <set/remove/add/subtract/switch> command which you can read more about .

Retrieving a value is just as easy:

  1. You can use the PlaceholderAPI placeholder %deluxemenus_meta_<key>_<data-type>_<default_value>%.

  2. You can use the /dm meta <player> show <key> <type> to see a single value.

  3. You can use the /dm meta <player> list <type> to see a list of all values of one type.

Checking that the player has a value is no harder:

  1. You can use the PlaceholderAPI placeholder %deluxemenus_meta_has_<key>_<data-type>%.

What else must I know?

  • Values are stored with a prefix (namespace) even if you don't set one. If you don't specify a namespace, deluxemenus: is used.

  • Keys (including namespaces) are case-insensitive. This means that my_key will work the same as MY_Key and MY_KEY.

You can use the has meta requirement which you can read more about .

If you want a more in-depth description of PDC, we recommend this amazing post from the PaperMC team:

https://docs.papermc.io/paper/dev/pdc
here
here
here