Bottled XP icon

Bottled XP -----

Create bottles with custom XP amounts



Commands:

xpb withdraw amount
bottledxp.withdraw
Takes XP out and puts it in a bottle. Use * or ALL as the amount to use all experience.

xpb player target amount (recipient)
bottledxp.player
Does what withdraw does, but to the target player not yourself. You can optionally specify what player to deliver the bottle to if you don't want it yourself. Can leverage special name/lore settings, see miscellaneous.

xpb cfg
bottledxp.cfg
Configuration subcommand

xpb cfg trigger true|false
bottledxp.cfg.trigger
Sets whether or not to use the stock XP bottle trigger. If this is true, you need to throw the bottle and have it break. If it is false, when you right click an XP bottle it just adds immediately to your XP and removes bottle from inv.

xpb reload
bottledxp.reload
Reloads config from disk

Miscellaneous:

The bottle display name and lore supports a few tokens:

%amount% - The amount of XP in the bottle
%creator% - Who made it
%donator% - Who provided the XP if /xpb player was used
%levelsadded% - Puts the text from the levels-added value in the config
%levels% - Amount of levels this XP will give you

The reason there is both levelsadded and levels is like say I have an XP bottle that gives 10 XP. If I am level 50 or something, that very likely won't give me another level. So I didn't want a lore like:

10 XP (0 levels)

I wanted the levels text to be totally gone if it's zero. If I just had levels, that wouldn't be easily doable cuz if I wipe levels value to just an empty string, you'd still have:

10 XP ( levels)

Also I made a pluralization function you can use in that field. So if you put the lore as "%amount% XP %levelsadded%" and have your levelsadded value as "(%levels% level!s)" the !s denotes where it pluralizes, so if it's 1 level it will read "(1 level)" and if it's more than 1, "(5 levels)".

I personally hate when I see things like "(1 levels)" lol

Donated Name/Lore:

If you are using /xpb player, it will try to load special name and lore settings first. If it doesn't find them, it uses the default ones. So if you want separate bottle text for a donated bottle, you may have a config like this:
Code (Java):
bottle -title : '&aXP Bottle'
bottle -lore :
- '&7%amount% XP %levelsadded%'
- '&fBottled by %creator%'
donated -bottle -title : '&aStolen XP'
donated -bottle -lore :
- '&7%amount% XP %levelsadded%'
- '&fThis XP was stolen away from &e%donator%'
- '&fBottled by %creator%'
Resource Information
Author:
----------
Total Downloads: 399
First Release: Jan 24, 2023
Last Update: Jan 27, 2023
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings