PearlXP
Feb 2019 - Now with 1.13+ support! (tested on Spigot v1.13.2)
This enables enderpearls to store experience, to safeguard XP from deaths and to allow trading XP like physical items.
Features
- Left clicking with an enderpearl in hand deposits up to 16 (configurable) levels worth of experience into the pearl, making it look like an Eye of Ender
- Left clicking with an imbued Eye restores the experience and returns a plain pearl
- Experience lost/gained still takes level scaling into account (from wiki's values)
- For example, with the cap set at 10, up to 160 xp can be stored
- If at level 16, storing 160xp (the xp to get from level 0->10) will take you to 11.4
- If at level 10, storing 160xp will take you to 0
- If at level 20, restoring 160xp will take you to 22.4
- Right clicking imbued Eyes tells you how much XP is in them and won't throw them, as that'd waste the XP
- Imbued pearls (Eyes of Ender with a custom name + lore) can be dropped on the ground and left in chests, including through server restarts
- /pearlxp <level> imbues the held pearl with a specific number of levels
UltiByte made a video of v1.3.4! (missing the new custom imbued pearl name/description)
Configuration
- maxLevel - The max experience that can be stored in a single pearl (so maxlevel 16 would be the experience from level 0->16, or 352xp)
- emptyMaterial - The item material to use for the "empty pearl".
- imbuedMaterial - The item material to use for the imbued pearl, can be the same as the empty pearl
- expReturnRate - A multiplier for how much experience to return to the player on restore. 0.85 would impose a 15% "penalty" or "tax"
- alwaysBlockRightClick - Default off, entirely disables enderpearl/eye teleportation (not just on enchanted stuff)
- Customizable Messages
Permissions
- pearlxp.imbue - Default true
- pearlxp.restore - Default true
The source code is in the jar.
-
View User Profile
-
Send Message
Posted Jun 3, 2012Thank you for the update Nebual :)
-
View User Profile
-
Send Message
Posted May 20, 2012@ursak
While storing XP in a pearl does lower the player's level, my calculations are done based on amounts of exp, so it doesn't make it "faster" to level, just a little safer (like a bank with no interest).
If you're level 10, and you put all your XP into the pearl, you'll be 0. When you then level up to 10 and eat the pearl, you'll become level 14.5, exactly as if you hadn't used the pearl.
@moneybagman
In a pvp server, when you kill a player normally they drop what, 1/4th of their exp? Half if you're lucky? If they're holding any pearls, thats a perfect transference (of the exp in their pearls), just like how all their items are perfectly dropped (if they had a stack of gold bars killers don't get 20-30 of them, they get 64!), which I think is a useful mechanic. Also an exp tax would reduce trading I'd think, but since its been asked before sure I'll add it.
Edit: 1.3.2 here you go :D
-
View User Profile
-
Send Message
Posted May 18, 2012Although I really like this plugin, it kinda seems to easy. I run a semi hardcore server and I want every aspect of the server to feel like that.
My suggestion? Make an option for percentage drain for when you get the xp back from the pearl.
For example, right now I have it set so that one can store 15 levels in a pearl. I would really like to see a feature so that when someone takes the xp back out, it only gives them like 80% of the original input. This way when someone goes to take the 15 levels back out, they will only receive 12 levels back.
If this is a possibility, I think It would be even cooler if it was a random percentage within some given boundaries. For example, if one placed 15 levels in a pearl, and tried to retrieve it, they would receive a random 65%-95% of the amount back.
Big fan of the plugin, and I really hope to see these features added, they would make the plugin so much better :)
-
View User Profile
-
Send Message
Posted May 18, 2012Will storing all your XP in a pearl clear all XP from the player? I mean, since it takes more xp to gain a level at lvl 50 than it does at lvl 1 does storing 50 lvls XP in gems reset the player so that the next levels are as easy to gain as if you never had any from start?
-
View User Profile
-
Send Message
Posted May 2, 2012@RDBruski
Not positive what you're asking in (1), but using /pearlxp 8 will attempt to store 8 levels into the current pearl (its not an admin command: it cannot store more levels than you have nor more than the maxlevel config), its just useful if you're hoping to give someone exactly 5 levels or something. I'd imagine most users would just right click to store as much as they can (up to the maxlevel per pearl setting) rather than bother with the command.
-
View User Profile
-
Send Message
Posted May 2, 2012Considering on using this plugin. We hate loosing XP on death only to get a fraction of it back when you loot your stuff. I have a few questions.
1) Using /pearlxp <level> lets ME specify the number of levels worth of XP to store?
2) If I am level 15 and use /pearlxp 20, what will happen? Is there logic to just store 15 levels worth of XP, or will an error be thrown?
I really like the potential of this mod as it creates a challenge to get ender pearls and keeps ur XP safe.
-
View User Profile
-
Send Message
Posted May 1, 2012@Nebual
Thanks! :D
-
View User Profile
-
Send Message
Posted Apr 29, 2012@douglast5
Here you go! Configs 'chatcolor' and 'chatcolorerror' for your organization :D
-
View User Profile
-
Send Message
Posted Apr 27, 2012First of all, I love this plugin, it is so useful when trying to run events and players are worried about there experience. One request that I think (No clue on how to make plugins) should be simple is writing our own text when using the pearl?
The text you use is perfect I would just like to colour it so it isn't white, we keep stuff colour coded so it is easy to distinguish server announcements, negative, positive, general messages. Other then that its great though! :)
-
View User Profile
-
Send Message
Posted Apr 12, 2012This is certainly the best XP storage plugin I've used, well done.
-
View User Profile
-
Send Message
Posted Apr 9, 2012@Nebual
Awesome thanks!
-
View User Profile
-
Send Message
Posted Apr 9, 2012@j2ther Updated the main post to better articulate this, but /pearlxp with no arguments will tell you how much XP is in the held pearl, and right clicking a block will too (right clicking air with an unimbued pearl/eye would throw it though, careful)
-
View User Profile
-
Send Message
Posted Apr 9, 2012Players are always coming up with good ideas. Some of our players were wondering if it was possible to have a command, like say /exp, that will show the amount of xp stored in the current imbued pearl your holding?
-
View User Profile
-
Send Message
Posted Apr 8, 2012@j2ther
:D!
-
View User Profile
-
Send Message
Posted Apr 8, 2012Just wanted to say great update Nebual! Thanks for the great plugin and quick fixes and responses! Made my imbued Pearls look like Bottle O' Enchanting to help players distinguish imbued pearls even more.
-
View User Profile
-
Send Message
Posted Apr 5, 2012@EKO9
Glad you think so! I suppose I'm just bad at marketing. v1.3 still works on 1.2.5 as it has since 1.1R5.
-
View User Profile
-
Send Message
Posted Apr 4, 2012this is a clever little idea, seems kind of under-rated. think this should be a more well-known plugin. you will be updating this for 1.2.4 and/or 1.2.5?
-
View User Profile
-
Send Message
Posted Mar 25, 2012@rbos
Stacking/unstacking eyes/pearls is fine when the player does it, but when code does it its both more complicated and a bit jarring for the user in my opinion. Say you have a full inventory besides one slot in the middle, and you try to use a stack of 6 pearls in your quickbar. One pearl pops off, becomes an eye, and lands in the middle of your inventory. "Where'd the pearl go? It disappeared along with my exp-oh there it is". Plus, then I have to loop through all those slots looking for either an empty space or an eye which has the same enchantment level, and throw an error if theres no space at all. Doable, just a bit bug-prone.
You'd want the eyes to be unstackable? I could add that as a config setting, default off, though theres no serverside way to specify maxstacksize, perhaps by giving each imbued eye a totally random enchantment+level alongside the specific water enchantment I use for tracking.
XP Tax? I don't like the gameplay mechanic myself, in my opinion needing pearls is enough of a cost for the minor security they provide (if you die you still have to get the Eye back before it despawns), and I worry a tax would make people avoid the pearls altogether and just take their chances. I initially did break the eye on xp restore, but I realized between dying while lost and thieves there was plenty of opportunity to lose precious pearls and by making them single use you can't load up your 5 levels, wait a bit, restore 5 load 7, wait, restore 7 load 10. Again if you want it as an option I wouldn't mind adding it, would just be default off.
-
View User Profile
-
Send Message
Posted Mar 25, 2012Cool. A modification to make eyes unstackable would be an improvement, and also being able to take un-imbued pearl stacks and automatically split off an imbued eye would be another.
Is it a problem if eyes stack? I made a stack of 64 (same-enchanted) eyes, and was able to unstack and use them.
edit: Another idea would be to specify lossage - eg, 10% XP gets lost when imbuing a pearl, and taking it out. eg, you use 100 XP to add 90 to a pearl, and you only get 81 out. That adds a cost to the benefit.
Another possible cost is that you lose the eye when you break it to get the XP out.
-
View User Profile
-
Send Message
Posted Mar 24, 2012@rbos
Here you go, v1.3, now with Eyes of Ender for the imbued visual! Old imbued pearls still work just the same, though they're now even rarer :P Also, I'm stopping right-click-block with both kinds of both pearls, so its safe to right click a block to check imbued status. Right clicking air with a non imbued pearl/eye does throw it though.