💾Player Data

💬 INTERACTIVE

Player Data

Save, retrieve, and manipulate per-player data fields


GUIPlus includes a built-in player data storage system that lets you save, retrieve, and manipulate per-player data fields. This enables features like bank balances, kill counters, quest progress, and any custom data you need.

⚙ How It Works

Player data is stored in plugins/GUIPlus/playerData.yml, keyed by player UUID. Each player can have any number of custom fields with string or numeric values.

Storage Format

d290a6cf-1234-5678-90ab-cdef12345678:
  deposited: 1500
  kills: 25
  rank: gold
  custom-note: Hello World

💾 Saving Data

Use the save-player-info click event to save data fields:

click-events:
  save-player-info:
    save-format: field:value

Format

The save-format uses the pattern: field1:value1,field2:value2

Multiple fields can be saved at once by separating them with commas.

Setting a Static Value

Math Operations

You can perform arithmetic on existing values. The expression evaluator supports a full range of operations:

Basic Operators:

Operator
Description
Example

+

Addition

10+5 = 15

-

Subtraction

10-5 = 5

*

Multiplication

10*5 = 50

/

Division

10/5 = 2

^

Exponentiation

2^3 = 8

Functions:

Function
Description
Note

sqrt(x)

Square root

sqrt(16) = 4

sin(x)

Sine

Input in degrees

cos(x)

Cosine

Input in degrees

tan(x)

Tangent

Input in degrees

Parentheses () are supported for grouping: (2+3)*4 = 20.

Saving Multiple Fields

📖 Retrieving Data

Use the %GUIPlus_player_info_<field>% placeholder to display saved data anywhere in your GUIs:

If a field has not been set for a player, the placeholder returns the string null.

🛒 Full Example: Point Shop


Last updated