Money and Sign Shops

Money and Sign Shops

98.7k Downloads

Money and Sign Shops

Is a a client-optional mod that adds non-item money and player/server sign shops.

Money

Players can see how much money they have with:

/money

as well as transfer funds between players

Sign Shops

come in 4 types:
[buy]  which takes money from the player and gives them items from the storage stock

[sell]  which takes items from the player inventory and transfers money from the shop owner to the player

[server-buy] which takes money from the player and gives them items (infinite stock)

[server-sell] which takes items from the player and gives them money (infinite stock)

Shop Storage Blocks

Any block with an inventory and an itemhandler capability can be used as a shop.  this includes all vanilla containers such as chests, barrels, hoppers, furnaces, etc., but also includes modded storage including machines.  (A note on Machines: the shop uses the top face as it's insert and extract face)

Activating a Shop

The first line of the shop must be one of the 4 types above (only admins can activate server shops).
The second and third lines can be anything you want.  A description is a good idea.
The last line is the price (decimals are acceptable, no thousand operators or currency symbols though)

Next, put the items the shop should look for in the container.  All items in the container are used when the shop is activated.  This allows you to trade multiple items together for money, such as tool kits

once your sign is set and your items in place, right click the sign to activate it.  If successful, the type and price will change color.

Viewing shop info

left click any shop to see what is for sale  (Note: if you are in creative mode this will break the sign)

shop info in the chat will give tooltips for the items for sale so items like tools and weapons can show their enchantments

Vending Items You Don't Have

Do you ever want something rare that if you had, you would never need again?  Does it seem silly that you can't request that item without having it first?  well this mod has a solution.  By using a Book and Quill, you can write in the exact item you want in JSON format and the shop will read the book when activating your shop.  Key components are the first page should start with "vending" then start your JSON on a new line.  see below

Shop Protections

once a shop is activated, the container is protected from opening and destruction by anyone who is not the owner or an admin. Additionally, blocks cannot be placed adjacent to the storage block.  This is to prevent other players from placing hoppers or pipes to extract items from your shop.  Note that, since the protections only kick in after the shop is activated, you can set up your own machines to connect to the storage block so long as you do so before the shop is activated.  This is one way to make self-sustaining shops.

API

This mod has an API Package for hooks by other mods.  If you have questions about implementing this with your own mod, please contact me via discord or github(links below).

Vanilla Clients

If you want to use this purely server-side you will want to add this mod's lang file to a resource pack for your clients.  Otherwise most chat messages will not be as informative to your users.  you can get the lang file HERE.

Compatible Mods

FLAN (Forge)

Section Protection

If you are a developer and want additional features, please contact me via Discord: https://discord.gg/D4gEj8y


Discord: https://discord.gg/D4gEj8y

GitHub: https://github.com/Caltinor/Guild_and_Commerce

Information on versions pre 2.0 can be found in this spoiler.

Money Mod is a utility for adding money and accounts to Minecraft.

Features for Players:

- Quick access to money actions via /account command

- accessible gui for account actions via /account gui

If commands are just too bukkity for you, you can always use the built in GUI.

Transfer to other players, withdraw your moneybags, or bulk deposit specific bags back into your account.

- One money item for all values to avoid unnecessary inventory clutter

The MoneyBag!   

Unlike many mods which have separate items for various money values, Money Mod has one that can hold different values.   You can stack bags of the same type, or combine them in any crafting grid to make one combined bag of all their values.  

obtain bags by using /account withdraw <bag value> <number of bags>

or open the account Gui and withdraw bags from there.

 - Admin Gui for server managers

While more features may be planned, the basic functions are accessible here.

API is accessible for mods to plug into directly.  This mod is planned to expand over time to meet the needs of dependent mods.

Features for developers:

- Player and non-player accounts

Player accounts are the only pre-defined account type in the mod, but an infinite number of account types can be created for your use.

All accounts use UUIDs as the owner of an account.

The account type is a ResourceLocation, so set your path to whatever unique account type you want, or use one from another dependent mod for triangulated dependency.

 - Integrated and External Database Support (WIP)

Money Mod uses an integrated H2 database by default.  However, the config allows for connection to external database services.

PLEASE NOTE:  certain databases may need to be added to the back end to work.  If you are using, or plan to use, a currently unsupported database platform, please contact me on my discord to have that integration added.