Minecraft Data Packs / Game Mechanic

(1.16.5) xEconomy - The #1 Economy Datapack in Minecraft Reborn! - Money, Shops, Payments, and More!

  • check_circle Functions
  • 104,156 views, 351 today
  • 10,338 downloads, 37 today
NickTonj avatar NickTonj
Level 61 : High Grandmaster Modder
84
This datapack is made for 1.16 and up.
Latest build: 2/2/21 for 1.16.5
xEconomy
In 2018, I released a datapack named nEconomy, which was a bare-bones project I was working on for fun, with no actual intent on it becoming anything more. It soon became a much bigger project, undergoing two revisions to make it the best that it could be, hitting #1 for google searches for any money or economy datapack. Although it was doing really well, I believed that it was unoptimized and didn't have the best effort from me. Today I present to you, xEconomy, an open-sourced economy datapack, built from the ground up and based on nEconomy 3, but without the bugs ;)

Features
Money (of course)
Easy balance view by looking straight down or using /trigger bal
Paying players by distance or direct player ID
Shops! Players can Buy or Sell ANY Item
No known Glitches or Exploits
Easy and Cheap setup for players
Custom colors for shops
Open Source, and Secure!

Plugins
This datapack is meant to have addons/plugins! Feel free to make or find some!
If you make a plugin please add the following code to your load.mcfunction
summon armor_stand 0 255 0 {Invisible:1b,Small:1b,Tags:["xplugin"]}

Documentation
Installing / Uninstalling:
To install the pack, simply drag the datapack zip file into the world/server's datapack folder. To uninstall the datapack, type /function xeconomy:uninstall
Giving players money:
All players start off without money, and is the server admin's responsibility to supply them with some. Admins can use /scoreboard players add (player) balance (amount) to give money to a player. This is subject to change in the future, and an official way to obtain money will be added.
Setting up and Configuring a shop:
Players can make a shop by placing an item frame on a chest, and sticking a sign inside it. This should automatically create the shop. To access it, they must hold sneak, and open the chest with an empty hand.
The shop can be further configured using the buttons inside.
Make sure you use the blue/yellow button to select the proper shop type!
Removing Shops:
Player can remove their shops with the "Destroy Shop" button on the inside. Admins can remove shops by looking at the item frame of the shop they want to remove, and typing /function xeconomy:removeshop
Buy Shops:
For a buy shop, fill the chest inventory with any item you choose to sell to players. You can then configure the price using the green and red buttons, and set the item count using the gray button.
Sell Shops:
For a sell shop, place one item you're looking to buy off of players in the very first slot available slot in the chest. You can then configure the price using the green and red buttons, as well as set the item count using the gray button. In order for the shop to give the players money, you must deposit money of your own into it. Go as close to the shop as you possibly can, and type /trigger deposit add (amount)
Replacing (amount) with your choosing.
Admin Shops:
Admin Shops are like normal shops, but do not require money or extra items. Its a set-and-forget feature of the pack.
To make an admin shop, instead of placing a sign in the item frame to create a shop, place a debug stick instead. You can obtain a debug stick by typing /give @s debug_stick
Playtime:
Playtime rewards can be configured with the xsettings panel. Type /scoreboard objectives setdisplay sidebar xsettings and then modify the settings you wish.
Payments & Transactions:
Players can now pay other players easily! All they have to do is type /pay (amount) and they will be shown a menu of players to choose from.
Redstone Triggers:
Shops have the ability to trigger redstone when they are used. To do this, place a repeater on the back end of the shop, and once a player successfully buys or sells to it, it will trigger for one tick.

Planned Features
In the video I mentioned that this datapack is fully finished and is releasing as-is. I kinda lied about that. Basically there are a few things I plan to code in eventually:
-An easier, command-less way to deposit money into sell shops
-Cleaner UI
-More optimizations
And yeah that's pretty much it. If you would like to see a feature in this pack, please post it in the comments below!


Open Source Info
This pack can be found on GitHub, and if you'd like to contribute or make changes to the pack's code, please let me know and submit a pull request! You will be added to the credits!



CompatibilityMinecraft 1.15
toMinecraft 1.17 Snapshot
Tags

34 Update Logs

xEconomy 210202 : 02/02/2021 7:10:58 pmFeb 2nd

-Changed the way shops act when a block is placed inside the item frame. Instead of breaking the shop, it breaks the block (excluding signs and torches)
LOAD MORE LOGS

Create an account or sign in to comment.

1
04/22/2021 10:08 pmhistory
Level 1 : New Miner
superwizzman
superwizzman avatar
Hi this datapack is not working in the snapshot 1.17 of minecraft :(
1
04/07/2021 2:48 pmhistory
Level 1 : New Miner
fabznX
fabznX avatar
There is a bug, because when you reload the server and you go to a shop and buy something, it takes your money but does not give the money to the other player. In addition the other players chat gets spammed with the message you received something over and over again, even if you just bought one time. Please fix this.

https://drive.google.com/file/d/1ynEf5Nbe1mJnjM1Yp2QyFNZ7lnfdM72K/view?usp=sharing
1
03/30/2021 2:54 pm
Level 1 : New Miner
Mafioso_BG
Mafioso_BG avatar
"Your transaction has been capped to $100" how to make it more (1000) ?
1
03/22/2021 2:48 pm
Level 24 : Expert Miner
Exkallibur
Exkallibur avatar
Hey Nick,

I'm currently thinking about remaking my Addons for your datapack (check my profile). If these features are wanted / nobody else already created them please let me know
1
03/06/2021 9:56 am
Level 1 : New Miner
Uncle_Kardel
Uncle_Kardel avatar
How do you get your money back after depositing it into a store?
1
03/02/2021 10:50 am
Level 1 : New Explorer
Izuku_midoria
Izuku_midoria avatar
make it so you get money from killing monsters
1
02/04/2021 4:25 am
Level 1 : New Network
baole444
baole444 avatar
I want to know if it's possible to disable the block outfit for the chest cause standing near it cause lost of noise and my player recently complaint about this, or how to turn off the sound ?
1
02/05/2021 7:35 pm
Level 61 : High Grandmaster Modder
NickTonj
NickTonj avatar
Would you mind sending me a clip of the audio? I can't get it to happen when i'm using the pack. Thanks!
1
02/20/2021 3:32 pm
Level 1 : New Miner
User3446830G
User3446830G avatar
Did this ever get fixed? Mine are doing the same thing.
1
02/03/2021 4:09 pm
Level 1 : New Crafter
Jsnotlout1
Jsnotlout1 avatar
Just add a way to obtain money in survival and its perfect!
This pack is amazing
2
02/03/2021 9:48 am
Level 2 : Apprentice System
TheXyX
TheXyX avatar
Left a few issues for you on your github. Thanks for the update Nick.
1
02/01/2021 11:24 am
Level 2 : Apprentice System
TheXyX
TheXyX avatar
Placing a block in front of a shop breaks the shop. I've tested with torches and signs.
2
01/30/2021 2:34 pm
Level 2 : Apprentice Miner
TehKAMI
TehKAMI avatar
Found a major bug.

If you attempt to send all your money to another player, the money is taken away, but the transaction doesn't go through. Basically you have to keep $1 in order for the bug to not occur.
1
01/29/2021 3:54 pm
Level 1 : New Miner
ZzmanzZ
ZzmanzZ avatar
how do I use /trigger pay
1
01/24/2021 2:25 pm
Level 1 : New Miner
sumernites
sumernites avatar
whenever /trigger pay for non opped players is executed, it just comes up with a book of random letters and symbols. I've tried fixing the issue with permission plugins but it still hasn't fixed the issue. Any recommendations?
2
01/25/2021 11:39 pm
Level 61 : High Grandmaster Modder
NickTonj
NickTonj avatar
Did you download the latest version? In the newest version /trigger pay shouldn't give you a book at all. Otherwise, PMC has been giving me issues with uploading files. Ill take a look now.
1
01/18/2021 8:36 pm
Level 1 : New Miner
steverick
steverick avatar
does it work on the newest version
1
01/12/2021 11:03 amhistory
Level 1 : New Miner
CapnBenJMan
CapnBenJMan avatar
I just installed the datapack to my server (run on Aternos). I set up a shop and there was an audio glitch. The clickity clack noise that the shop makes when it's being built kept playing for 30 seconds straight. It also starts playing randomly when a player goes near it or trains their crosshairs on the item frame. I turned on subtitles and it plays a block broken sound over and over again.
There was also a problem with the fact that, when I tried to make a shop with an item frame facing upwards, the shop created with the block floating diagonally half a block away from the center.
2
12/31/2020 2:39 pm
Level 1 : New Miner
Vorple
Vorple avatar
so i did the /trigger setpayxid command and now my chat is constantly spammed with "No Player is Online with xid 0" and i have restarted my server, my game, etc and it wont stop
1
01/09/2021 8:49 am
Level 1 : New Miner
Talent31
Talent31 avatar
Hi
all you have to do is delete the scoreboard with the name setpayixd. Then add a new scoreboard with the name setpayixd and give everyone a score between -9999 and 9999. For me it worked out and the dataack is still working. I hope it helped you.
2
01/02/2021 11:07 am
Level 1 : New Miner
User3362896G
User3362896G avatar
Same, Do you have a Solution to it?
1
12/30/2020 2:26 pm
Level 1 : New Miner
Kebabmaha456
Kebabmaha456 avatar
What command do i use to set the things in xsettings? i got the thing on the right pop up but how do i change the numbers?
1
12/25/2020 3:28 pm
Level 1 : New Miner
TheGayThug
TheGayThug avatar
Why when i try to add the data pack it says it is for a later version. And if i launch it nothing happens at all.
Can anyone Help?
1
12/22/2020 1:09 pm
Level 41 : Master Engineer
UncleThaodan
UncleThaodan avatar
Word of advice: if you have 116 @e selectors in your tick function you're doing something wrong. Each @e has to go through every entity in the world and check if the selector matches, which is a massive overhead.

To avoid this you have to be aware that executing things as some entity changes the context. So if you do
execute as @e[tag=xecshop] at @s run function <something>inside the <something> function @s will be the entity you've selected (each of the selected entities will run their own instance of the function as itself, one by one) and ~ ~ ~ will be the position of the entity.

Minecraft commands are inefficient as is, you don't have room for duplicate selectors, plus removing them will structure your code better.

Oh and please please please try to remove 64, 32, 16, 8, 4, 2 and finally 1 items. There is no need to count down 1 by 1 inside "remover1", you can do everything with 7 checks.
1
12/22/2020 5:38 am
Level 1 : New Miner
User3348520G
User3348520G avatar
I need help,

every time I log on my realm this message "No player is online with xID" and I can't read messages from my server people please help me fix this, I tried deleting and reinstalling the data pack but it doesn't seem to do anything it occurred when I typed /trigger setpayxid set 12
1
01/09/2021 8:47 am
Level 1 : New Miner
Talent31
Talent31 avatar
Hi there all you have to do is have admin rights on that server and do /scoreboard objectives setpayixd remove then execute it. After that add a scoreboard to the game with the name setpayixd and give every player obn the serer a different score between -9999 and 9999. For me this worked out. I hope it helped if you havent fixed it yet.
1
12/24/2020 1:26 am
Level 1 : New Miner
Lord_Si
Lord_Si avatar
I have the same problem. It was when i tried the setpayxID function
1
12/15/2020 5:02 am
Level 1 : New Miner
santexowskyy
santexowskyy avatar
Hey 've gotta question !

how to modify enableplaytime bec i dont know commands at all .
can someone help me to set enableplaytime to 15$ per minute?
3
11/29/2020 2:06 pm
Level 1 : New Miner
Thefuuu1
Thefuuu1 avatar
When I tried to use this command "/trigger setpayxid set <value>", it start to show an endless message "no player is online with Xid 0" and I can't stop it, and yes, I put the right xID number, please help
2
11/18/2020 2:12 am
Level 1 : New Miner
User3304255G
User3304255G avatar
http://prntscr.com/vl9f4o this line of text keeps being spammed in my chat and I dont know how to stop it
1
11/12/2020 2:37 pm
Level 1 : New Miner
User3297122F
User3297122F avatar
I installed the datapack, and shops work fine, but the payment books just generate as garbage and dont work. Help
1
11/10/2020 4:03 pm
Level 1 : New Miner
User3294732G
User3294732G avatar
Hey, everything works except for the the player payment system. I used /trigger pay set <value> and received a book. But when I click on the Names in the Book Nothing happens (the players are online).
1
10/20/2020 3:37 pmhistory
Level 22 : Expert Crafter
DarkChange
DarkChange avatar
Players can destroy stores by placing blocks in front of the store and then it will destroy.
(I downloaded the last update)
Sorry for bad english
1
10/19/2020 8:54 pm
Level 1 : New Miner
LordSmugly
LordSmugly avatar
Players in my server keep losing their shops (the item frame and sign pops off and the chest becomes locked to everyone).
2
10/28/2020 1:10 pm
Level 61 : High Grandmaster Modder
NickTonj
NickTonj avatar
would you mind sending me the server IP? I would like to take a look at this myself, if you're willing to allow that. Thanks!
2
10/09/2020 9:05 pm
Level 1 : New Miner
AJ213
AJ213 avatar
I made this account just to say that this economy mod is extremely laggy on servers. Over time, the server will progressively get laggier and laggier when using this datapack, and I only found out due to carpet mods profiler and through doing testing and removing the datapack. We went from 20 mspt for a single person to like 5 mspt. Before it was possible that the server could be at like 9 tps, now it is almost consistently near 20tps.
1
10/09/2020 9:38 pm
Level 1 : New Miner
AJ213
AJ213 avatar
This is the profiler that showed me the problem (lithium mod and carpet can help you with this):

[00] tick(126/1) - 98.44%/98.44%
[01] | commandFunctions(126/1) - 55.57%/55.10%
[02] | | minecraft:tick(126/1) - 99.99%/55.09%
[03] | | | execute as @e[x_rotation=..89] run tag @s remove showbal(126/1) - 3.18%/1.75%
[03] | | | execute as @e[type=item_frame,tag=!xecshop] at @s if block ^ ^ ^-1 minecraft:chest if data entity @s {Item:{id:"minecraft:oak_sign"}} run tag @s add xecsetup(126/1) - 2.10%/1.16%
[03] | | | execute as @e[type=item_frame,tag=!xecshop] at @s if block ^ ^ ^-1 minecraft:chest if data entity @s {Item:{id:"minecraft:debug_stick"}} run tag @s add xecadmin(126/1) - 1.95%/1.07%
[03] | | | execute as @e[type=item_frame,tag=!xecshop] at @s if block ^ ^ ^-1 minecraft:chest if data entity @s {Item:{id:"minecraft:debug_stick"}} run tag @s add xecsetup(126/1) - 1.91%/1.05%
1
10/19/2020 8:49 pm
Level 61 : High Grandmaster Modder
NickTonj
NickTonj avatar
Would you mind sending me a full profiler report? Pastebin please.

That would be amazing! I'll patch it up as soon as I can figure out the problem. Thanks!
1
11/17/2020 2:22 pm
Level 1 : New Miner
AJ213
AJ213 avatar
Sorry about the late delay, I don't really know how to use this website too well. Here is the full profiler report:

https://pastebin.com/p00PvTqS
We have a lot of datapacks in this server and carpet mod as stated earlier. However, I would like to point out the server has been around a solid 20tps ever since we removed xEconomy a month ago.
1
10/01/2020 2:26 amhistory
Level 1 : New Collective
MrBelles
MrBelles avatar
Make /Sell Hand to sell items in the hand for money like the one plugin I don't know the name of on the Minecraft server I play on. Also very small feather board on the side to show money amount instead of looking up/down.
1
09/13/2020 2:51 pm
Level 1 : New Network
calcine
calcine avatar
Features Realms compatibility?
1
09/17/2020 11:50 am
Level 61 : High Grandmaster Modder
NickTonj
NickTonj avatar
As long as the realm is 1.16+ it should be just fine
1
09/10/2020 11:11 pm
Level 2 : Apprentice Engineer
Atolite
Atolite avatar
this would’ve been useful like
a month ago-

( ̄▽ ̄)
1
09/09/2020 5:05 pm
Level 1 : New Miner
NitroManiac533
NitroManiac533 avatar
add a transfer rate lol
1
09/10/2020 1:17 am
Level 61 : High Grandmaster Modder
NickTonj
NickTonj avatar
What do you mean by transfer rate? If you have an idea for the pack i'm definitely down to implement it
1
09/09/2020 8:23 am
Level 24 : Expert Miner
Kate1902019
Kate1902019 avatar
pAY SOME MONEY FOR THIS DATApACK!!!! ^_^
1
09/09/2020 8:19 am
Level 24 : Expert Miner
Kate1902019
Kate1902019 avatar
pay for items.
1
09/09/2020 8:18 amhistory
Level 24 : Expert Miner
Kate1902019
Kate1902019 avatar
correct:
"Open Source Info:
None :p"
pppppppppppppp
2
07/02/2020 3:18 pm
Level 1 : New Miner
H4ZA4
H4ZA4 avatar
How do you pay off other players? (Player to Player payment) whats the command for that ?
1
07/01/2020 11:24 am
Level 1 : New Miner
User3125989G
User3125989G avatar
There is a dupe glitch rn
Planet Minecraft

Website

© 2010 - 2021
www.planetminecraft.com

Welcome