Upgrade enchantment of custom Item with money [OP Prison]

Status
This thread has been locked.

Budx

Feedback score
0
Posts
33
Reactions
1
Resources
0
Hello everyone,

First, excuse me if I go wrong with English because I don't speak the language very well...
I am a beginner in java and I am creating a plugin with a custom pickaxe.
When I right click with the pick, a GUI appears with enchanting books.
When I click on the efficiency book for example, my pick gains 1 level of enchantment. (the max level is 1000)
For the moment, that it's working.

And here I need your help.
I'm looking for a way to make the player pay to go up a level of enchantment
I would like to see displayed on the book in the GUI the current level of enchantment, the maximum level of enchantment, and the price for level up.
It would also be perfect if I could configure the price of each level in a configuration file.

If you can help me it would be nice.

Thank's a lot.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Erwan

Java Developer
Premium
Feedback score
10
Posts
172
Reactions
51
Resources
0
hook into vault and check the user's balance before processing the upgrade. If the user has enough money the take away their money and do the upgrade else return. You can use this to get started with vault. https://github.com/MilkBowl/VaultAPI
 

Clems02

Feedback score
0
Posts
15
Reactions
0
Resources
0
Hmm ok I'll try. But how do I configure the price of each level? And how do I display the price of the next level in the GUI and display the maximum level of the enchantment?

I think I should use a configuration file but how? How to retrieve the variables?

Thank you
 
Status
This thread has been locked.
Top