EconomyGold
A MySQL Economy System
EconomyGold is a super simple economy system, consisting of a /epay, a /eshop, and more. The only thing is that EconomyGold requires MySQL to run, so keep that in mind.
Commands:
/epay <player> <amount>: Pays another player the amount specified.
/eshop: Opens up the shop.
/gold: Shows how much gold you have.
Permissions:
shop.eshop: Allows player to use /eshop. Default: op
shop.epay: Allows player to use /epay. Default: op
Features:
Logs player buying items, commands, server starting up, etc.
Permissions
MySQL Suppport/Dependency
Customizable Shop
Paying other players
Setting Up the Database
In the confg.yml, you'll see these lines:
host: 0
database: 0
username: 0
password: 0
table: 0
That's the MySQL connection and is REQUIRED. The one thing you should change right now is table: 0 to table: player_data since as of version 1.4 EconomyGold automatically sets up the table whether you have made it manually or not. You can fill out the rest of the information based on your hoster. If you need any help regarding this, join our Discord below.
Setting Up the Shop
An example of the shop is already engraved into the config.yml. It should look something like this when you first start up the server:
shop:
items:
BLACK_WOOL:
name: Black Wool | $60
cost: 60
command: give @p black_wool
A brief run-down is the material, which in this case is BLACK_WOOL . That's the material that appears in the GUI. Next is name: Black Wool | $60 . Spigot/Bukkit/Paper don't support other fonts (at least the default don't) but a $ sign is okay. Anyways, this is the name of the item and what appears when you hover on the item. Next is cost: 60 . That's the price of the item. When a player clicks on the item they are deducted that amount. Finally is commmand: give @p black_wool . This one is a bit complex. It is basically what happens when a player clicks the item. So for this item, when they click on the black wool the command give @p black_wool is ran, giving the player a black wool. You can change this, but make sure that you use @p when doing player-specific tasks.
Examples of what you can do:
give @p <some_item>
effect give @p <some_effect>
kill @p
tp @p <some_location>
ANY command can be ran. Even ones from other plugins. Even PERMISSIONS can be added (although I don't know if @p is supported). I haven't tested this yet, but since @p is parsed into the actual player name, you can theoretically add this command if you have LuckPerms:
lp user @p permission set my.permission.node
Try it out :)
Now, onto adding items to the shop. Copy and paste the BLACK_WOOL example. The config should look like this:
shop:
items:
BLACK_WOOL:
name: Black Wool | $60
cost: 60
command: give @p black_wool
BLACK_WOOL:
name: Black Wool | $60
cost: 60
command: give @p black_wool
Change BLACK_WOOL to the item you want to appear. An example of all the items are listed here:
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
Next, change name: Black Wool | $60 to the name of the item. I suggest adding the cost since player's can't see how much the item costs. Afterwards change the cost of the item to whatever you want. Cost has to be an integer. Decimals don't work (yet). Finally, change the command to whatever you want. As said above, experiment! One last thing: If you want there to be a blank space, all you have to do is add this:
AIR:
name: null
cost: 0
command: effect give @p jump_boost 0 0
That's it! You can change the name to something else other than null if you want.
Getting Money
EconomyGold has a built-in system that allows you to get money from mining ores (and soon by killing mobs). In the config there is something like this:
mine:
enable: true
block:
iron: 5
gold: 7
coal: 2
lapis: 10
redstone: 13
diamond: 25
emerald: 30
quartz: 15
You can turn off mining for money by changing enable: true to enable: false . Each section (ex. iron: 5 ) is each ore type that you can change the value of to get different amounts of money. For example, changing quartz: 15 to quartz: 50 allows you to get $50 instead of $15 by mining Nether Quartz. Anyways, play around with the values. Here is a list of what each section means in terms of Minecraft:
iron : Iron Ore
gold : Gold Ore
coal : Coal Ore
lapis : Lapis Lazuli Ore
redstone : Redstone Ore
diamond : Diamond Ore
emerald : Emerald Ore
quartz : Quartz Ore
How to Use EconomyGold
EconomyGold was originally made for another user as a TEBEX replacement. There is an addon for EconomyGold that allows you to add money to the player using a specific command (more on that later). You can integrate TEBEX or BuyCraft into this plugin (it's not a dependency!!!) to create a virtual currency. I don't know how to specifically do this, but it requires the Master plugin to run. View my profile to see the plugin.
FAQ
Does this work on Bukkit?
Yes. I have even removed the API and added Bukkit API to see if it works. After a few changes or so, I made it work with the Bukkit API. So this works on BOTH Spigot and Bukkit. Even Paper!
Does this hook into Vault?
No. This does not. I don't plan on it to either.
Where can I donate?
I have not set up a donation link as of 4/17/2020. I will soon, though. If you want to support me, spread the word of this plugin or join the Discord for donations. I can DM you the PayPal (it's not mine though since I'm under 18) :)
How do I set up the MySQL database? Where can I find the information?
The info is different for everyone. Again, join the Discord for one-on-one support.
Can I host the MySQL database on my computer?
Yes. You can. But be sure to set the host to localhost and not your IP. Use XAMPP for hosting the database on your computer. You can only host it there if you are hosting your server on your computer.
The plugin isn't working!!!
...that's not a question. Join the Discord...
If you have any questions, please check the Discord for more info or support. Thanks!
Discord: https://discord.gg/SHsPsDw
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta