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 Mar 24, 2012@Nebual - that would be cool. I hope existing imbued pearls are still usable or automatically converted into eyes. Or I'll get shouted at a little. ;
But I'll live with it if not, I don't mind giving some XP refunds. The important part is being able to tell when a pearl is full. The different item ID will allow chest shops, too!
I'm not worried about giving out free stuff, as we don't have a stronghold in our map and the eyes are otherwise useless.
-
View User Profile
-
Send Message
Posted Mar 24, 2012@rbos
Unfortunately Minecraft doesn't show the "enchanted glow" on items that cannot normally contain enchantments, as proven by imbued pearls looking normal, since I'm storing levels in the form of ranks of Waterbreathing. Turning them into eyes of ender would work, I originally didn't as I didn't want to give players what they didn't earn, but I could just block Eye's sole use by blocking right click if the eye is imbued. I'll have a build up within an hour or two, I want to test it well to ensure theres no ways to remove the enchantment.
-
View User Profile
-
Send Message
Posted Mar 24, 2012It would be very helpful if pearls could visually indicate their imbuing status. Either by using another item ID for imbued pearls (eye of ender, perhaps, since they are otherwise useless in SMP), or by giving them an 'enchant' glow effect. (ItemStack.addEnchantment(Enchantment enchantment, int level) might work, but I haven't tried it).
-
View User Profile
-
Send Message
Posted Mar 24, 2012@Nebual
j2ther and I run the same server together. I ran the new plugin and all is fixed! We appreciate the quick response.
-
View User Profile
-
Send Message
Posted Mar 24, 2012@j2ther
Odd, unsure how I didn't detect that myself but here, I'll reset the pearl entirely after emptying it (rather than just trying to remove the enchantment). Seems to fix it, have a 1.2.1.
-
View User Profile
-
Send Message
Posted Mar 23, 2012Great plugin thanks for the good work! The only thing we notice is that this now creates 3 different kinds of ender pearls.
A normal ender pearl, one that is imbued with xp, and one that was formerly imbued with xp.
The normal ender pearls and ender pearls that have no xp in them but were formally imbued do not stack. Having ender pearls with no xp in them not stack gets kind of confusing and frustrating for some of our players. Not sure if this is a bug or not, but was hoping to see the ability to stack normal and formally imbued ender pearls.
-
View User Profile
-
Send Message
Posted Mar 20, 2012@Bloodykittens
The way enchanting works you're more likely to want a level "higher than 12" than "exactly 13" if you're aiming to get particular enchants, so getting 3 more levels than you were hoping for is probably great. My logic for not allowing players to specify exact amounts of XP is both that the first 10 levels (225xp) isn't a whole lot of investment, and if "friend" did only want 5xp to get from level 12.9 to 13 (as you suggested), he could take a full 10 levels from you, do the enchant, and then give you most of that back anyways using the now-empty pearl you gave him.
Edit: Added /pearlxp <levels> in v1.2
-
View User Profile
-
Send Message
Posted Mar 20, 2012If your config is set to a max of 10lvls and you store xp on a pearl. Will it take all 10lvls from the player or does it prompt you on how many lvls you would like to store?
Say I want to trade 5xp to a friend because he needs it to enchant, but the max is 10. I don't want to give him all 10 of my levels. Could I left click to store levels and then type a number in chat to say how many levels I'd like to store?
-
View User Profile
-
Send Message
Posted Mar 11, 2012@Nebual
Thanks a lot
-
View User Profile
-
Send Message
Posted Mar 11, 2012@Tealk123
Sure, however it probably shouldn't be a weapon, tool, or armor, as the levels are stored in the pearl in the form of levels of Waterbreathing, and having a level 10 enchantment on something that can actually be enchanted might not work well.
Edit: Version 1.1 has an 'itemid' config. Imbued items will continue to have their rightclick blocked.
-
View User Profile
-
Send Message
Posted Mar 11, 2012And is it possible to get a config var that allow me to change the item?
-
View User Profile
-
Send Message
Posted Mar 10, 2012@Tealk123
You'll probably get better performance out of java7 anyway, but heres a link to 1.01 which is just 1.0 recompiled for either java6 or 7 (its taking awhile to 'be approved')
-
View User Profile
-
Send Message
Posted Mar 10, 2012@Nebual
oh ok i install java 7 xD
here for all the ather user :P
http://alexander.holbreich.org/2011/11/java-7-on-debian/
can you add in the cfg that i can change the item?
-
View User Profile
-
Send Message
Posted Mar 10, 2012@Tealk123
"Major minor version" errors suggest you're running java6, and I compiled in java7. Sorry about that, I'll quickly check if java6 plugins are safe in java7 and then upload one.
-
View User Profile
-
Send Message
Posted Mar 10, 2012If i will use your plugin i get this error:
http://dev.bukkit.org/paste/4877/
git-Bukkit-1.1-R6-76-gefe4af2-b2055jnks (MC: 1.2.3)
-
View User Profile
-
Send Message
Posted Mar 9, 2012Awesome. Been wanting to give my members a way to store xp without adding a xp bank system which I find too convenient. Thanks.
-
View User Profile
-
Send Message
Posted Mar 9, 2012@watdidyusaey
Depends on how they're handling the item entities. Levels are stored in the form of Enchantments of Waterbreathing (so having 10 levels imbued in a pearl means you have Waterbreathing X on the pearl), so if they're just moving around the ItemStack (which is what they should be doing) it should persist. They can be stored safely in vanilla chests and thrown on the ground, including through a server restart.
-
View User Profile
-
Send Message
Posted Mar 9, 2012Really cool and interesting plugin.
Do you know if these thing will work with chest shops?