VillagerShops - Set up Mobs of any type as admin shop. Shops will use a Inventory-Menu to buy/sell items

This is a discussion topic for the Ore project, VillagerShops. View the full project on Ore for downloads and more information.


VillagerShops

This plugin requires LangSwitch and MegaMenus

Feel free to open an issue on the git to share your translations

You need to download the translations from GitHub or use the auto downloader

Description:

This plugin allows you to set up villagers or other mobs as shops.
They will sell items as admin shop (this means infinite stock), or as player shops if placed above a chest.
The shop will be displayed as inventory over multiple pages you can modify with chat commands as admin or if you own the shop.
Buy items with a primary click and sell them with a secondary click (usually primary is the left mouse button).
You can also name the shop mobs and set the variant (Villager profession).
Additionally you can set items to ignore damage, nbt or use oredict entries.
Please note that your server needs any economy Plugin for this to work

Player Shops

In order to create a player shop you’ll have to first place a container below the block you want the shop to be. This can either be directly below or with a one block spacing.

The chest should be protected from punching, explosions and is only accessible for the owner. Double chest wont work - The plugin does not care for the other half, neither stock nor protection wise.

On forge this means that a chest has to have at least 27 slots, since I do not want shops to be able to sell into / buy from machines.

Chat messages will notify playershop owners about purchases in all their shops every 15 seconds to prevent mass spam.

Commands, Permissions & Options

Configuration

Setup Guide

(In-)Compatibility

For more Information see the Setup Guide, or the pinned messages in the Discord channel

  • Pixelmon will replace various vanilla mobs with Pixelmon versions resulting in VillagerShops spamming mobs
  • Minecraft Comes Alive similar to Pixelmon this mod replaced villagers with custom mobs
  • InventoryTweaks has to be installed client side only - otherwise item dupes may happen
  • RLCraft, Engineer’s Life, Roguelike Adventures & Dungeons, Life in the Village (Mod: PotionCore) if your modpack contains PotionCore you’ll have to modify configs for server and client to get things to work
  • Quarks Improved Sign Edit might cause issues with shops not opening as reported here

Optional plugins supported:

Compatible plugins:

  • Selling Commands: If you want to sell commands through Villager Shops you’ll have to use a command item plugin

FAQ

Q: How do I add items?
A: Read the commands page. It has examples.

Q: How do I add a skin to a shop?
A: Read the commands page. It has examples.

Q: The skin does not show up on my sponge:human
A: Read the commands page. It has explanations.

Q: I installed all dependencies but can’t open shops
A: You probably have Potion Core in your mod pack, Read the setup guide entry on that.

Q: Players can open the shops once / Only some players can open shops
A: Try disabling the anti-glitch system in MegaMenus config (You might have some mods that messes with inventories).

Q: The text looks strange - something.like.this
A: Please read the setup guide.
A: Your server is running a language that villager shops currently has no translations for. Go into the LangSwitch config and change the default language to “en” (or create a translation file for your language and send it to me, would appreciate it)

Q: Configuration does not accept objects of type class [I
A: Update Sponge to 7.3+

Q: I don’t get it
A: Here’s a video: YouTube

Q: I still don’t get it
A: Hop on the discord server (link below)

External Connections

Version Checker
This plugin uses a version checker to notify you about available updates.
This updater is disabled by default and can be enabled in config/vshop/settings.conf
by setting the value VersionChecker to true.
If enabled it will asynchronously check (once per server start) if the Ore repository has any updates.
This will only print update notes into the server log, no files are being downlaoded!

Translation Downloads
If you don’t want to download translations from GitHub or can’t find them you can turn on
AutoDownloading in the config/vshop/settings.conf. If you start the server or /vshop reload
with this setting enabled and no tranlations can be found on your server it will automatically
pull the latest translation files from GitHub and place them into config/vshop/Lang for you.
Once the downloads finish you’ll have to restart the server.

Need Help?

Join my Discord

Add compatibility pixelmon

1 Like

I was told there’s an option in Pixelmon to disable the replacement of villagers with trainers. If you disable this conversion in Pixelmon it should work.

Ok and dupplication bug in this mod : I have 0 money -> Press E and buy item will be in the inventory

Please ensure mods like mouse-tweaks (that are client only) are not running on the server

On spongeforge-1.12.2-2768-7.1.6-RC3593 when i restart my server all the shop npcs are unusable the npc is still standing there but nothing shows up for a gui and /vshop list is empty.

A new version has been released for VillagerShops, it is available for download here.


Switched shop rendering to MegaMenus as a more stable Menu API

This is a beta build, translations may be broken.
If you’re updating you’ll have to delete ledger db in config/vshop.
This version requires the plugin MegaMenus

(For some reason I can’t create a beta channel for this on Ore right now, sorry)

A new version has been released for VillagerShops, it is available for download here.


Fixed a bug that deleted items on the cursor when closing the menu

This is a beta build, translations may be broken.
If you’re updating you’ll have to delete ledger db in config/vshop.
This version requires the plugin MegaMenus

(For some reason I can’t create a beta channel for this on Ore right now, sorry)

A new version has been released for VillagerShops, it is available for download here.


  • Fixed inventory row calculation

A new version has been released for VillagerShops, it is available for download here.


Changed menu rendering to use MegaMenus

So I accidently forgot to turn off the pixelmonvillager config for pixelmon and overnight alot of npcs spawned near my home, how do I get rid of them all without deleting any player/pixelmon/world data

useing the kill command. I recommend you check the wiki on selectors as thery are pretty powerful.
it should be something like /kill @e[type=MOBID]. I don’t remember the mobid for trainers tho, also you can add r=100 as parameter to only delete mobs in a 100 block radius.

When adding enchantment books into the shop it will not identify the same book if it wasn’t directly purchased from the shop.

Is it possible to make it so there doesn’t have to be both a buy and a sell option? Like, if one only wants the option to buy an item, but not have it display a sell option for it in a different slot, could it be made to have flags to specify “buy only” or “sell only”?
( ex. “/vshop add [ -b BuyPrice ] [ -s SellPrice ] [ Currency ]” )

And to take it a step further, possibly make it so different currencies could be defined for buy and sell separately?
( ex. “/vshop add [ -b BuyPrice [Currency] ] [ -s SellPrice [Currency] ]” )

@Daquesha I do not quite understand. do you mean the enchantment is not on a book after purchase from a shop?

@Lil_Allie_Astra omitting prices is already a thing (use ~ instead of a number). Separate currency options for buy and sell prices seem a bit overkill to me, but if enough people want it I will think about a way to add that (possibly without breaking the current syntax)

If added, I think having a separate currency on buy and sell would work with flags in the syntax I stated, but not sure how otherwise. Also, didn’t know about the tilde for omission of price. Thanks.

hi why dose it says i chat that the anti glitch system was triggerd and i need to restart

A new version has been released for VillagerShops, it is available for download here.


  • Tried to fix false positives in AntiGlitch system

That’s a bug, that I hop to just have fixed. also you can use /mm pardon <PLAYER> instead of restarting the server

thank you great suport and best plugin