ShopChest
Get the latest snapshot that has support for 1.13 and 1.14 here. Please keep in mind that there probably are some more or less breaking issues!
This resource depends on Vault. If you don't have Vault and an economy plugin which supports it installed, ShopChest will disable itself!
This resource uses bStats. You can view the statistics here.
You can also find this plugin on SpigotMC here.
ShopChest is a very simple command based shop plugin. Buying and selling, of course, does not need commands, but is done by clicking either the chest or the hologram above it, which displays all sorts of information about the shop. What exactly it should show can be customized in the hologram format configuration file, just like a huge number of options can be customized in the normal configuration file.
Features
- Very simple shop interaction and creation
- Visually pleasing with hologram and floating item
- Normal shops and admin shops with infinite supply
- No struggle with complex attributes or flags, it just copies the item in your hand
- Shops are protected from explosions and hoppers
- Floating items are protected from water, lava, pistons, zombies, getting picked up, despawning and ClearLag (and similar)
- You can translate everything. You can use the language files of Minecraft to translate the name of items, enchantments, potions, effects, etc. into your language
- Support for MySQL and SQLite
- Supports almost every protection plugin available including WorldGuard, Towny, PlotSquared, LWC, etc.
- Vault integration for economy and permissions
- Extensive list of configurable options
Commands
- /shop create <amount> <buy-price> <sell-price> [admin]
- Create a shop
- /shop remove
- Remove a shop
- /shop removeall <player>
- Remove all shops of a player
- /shop info
- Retrieve shop information
- /shop reload
- Reload all shops
- /shop update
- Check for updates
- /shop limits
- View shop limits
- /shop config <set|add|remove> <property> <value>
- Change configuration values
How to
buy-price = Price for which other players can buy from the shop
sell-price = Price for which other players can sell to the shop
- Create a shop
- Make sure you have permission
- Make sure you have enough money
- Make sure you hold the item you want to sell in your hand
- /shop create <amount> <buy-price> <sell-price>
- You can set buy-price or sell-price to 0 to disable buying or selling
- Click the chest which should be the shop
- If not already done, put the items inside the chest
- Create an admin shop
- Make sure you have permission
- Make sure you have enough money
- Make sure you hold the item you want to sell in your hand
- /shop create <amount> <buy-price> <sell-price> admin
- You can set buy-price or sell-price to 0 to disable buying or selling
- Click the chest which should be the shop
- You do not need to put items inside the chest
- Remove a shop
- /shop remove
- Click the chest you want to remove
- Remove all shops of a player
- Make sure you have permission
- /shop removeall <player>
- Retrieve shop information
- /shop info
- Click the shop you want to retrieve information about
- Reload the shops
- Make sure you have permission
- /shop reload
- Check for updates
- Make sure you have permission
- /shop update
- Change configuration values
- Make sure you have permission
- All comments in the configuration file will be deleted!
- /shop config <set|add|remove> <property> <value>
- Buy from a shop
- Make sure you have permission
- Make sure you have enough money
- Right-Click the shop to buy the item(s)
- Look at the chat for information about your purchase
- Sell to a shop
- Make sure you have permission
- Make sure you have enough items
- Left-Click a shop to sell the item(s)
- Look at the chat for information about your sell
- Open a shop
- If the shop is not yours, make sure you have permission
- /shop open
Permissions
- shopchest.*
- Gives access to all the below permissions
- shopchest.create
- Allows the player to create a shop
- shopchest.create.admin
- Allows the player to create an admin shop
- shopchest.create.protected
- Allows the player to create a shop on a protected chest
- shopchest.create.buy
- Allows the player to create a buy-shop
- shopchest.create.sell
- Allows the player to create a sell-shop
- shopchest.buy
- Allows the player to buy something
- shopchest.sell
- Allows the player to sell something
- shopchest.openOther
- Allows the player to open other players' shops
- shopchest.remove.other
- Allows the player to remove other players' shops
- shopchest.remove.admin
- Allows the player to remove admin shops
- shopchest.reload
- Allows the player to reload the shops
- shopchest.notification.update
- Allows the player to receive update notifications on join
- shopchest.update
- Allows the player to check for updates
- shopchest.limit.x
- Allows the player to have x shops (Set x to * for unlimited shops)
- shopchest.config
- Allows the player to change configuration values per command
- shopchest.extend.other
- Allows the player to extend other players' shops
- shopchest.extend.protected
- Allows the player to extend shops into a protected region of WorldGuard or Towny
- shopchest.external.bypass
- Allows the player to use shops in regions/plots that deny shop use
Videos
English: Version 1.11.1
Portuguese: Version 1.4.3
Configuration
# ====== Configuration File of 'ShopChest' ======
# ===============================================
#
# Lines starting with '#' are comments and are ignored by the server.
# Set the main command you have to enter to manage the shops
# (default: "/shop ...")
main-command-name: "shop"
# Set the language of the item-, enchantment-, potion- and arrow-effect names
# The value must equal to the name of one of a file in the 'lang' folder
# (without the '.lang' extension)
language-file: "en_US"
# Set whether the floating shop items on top of the chest should be shown
show-shop-items: true
# Set the quality (speed) for hologram and item updating.
# Valid values are (from slowest to fastest):
# 'SLOWEST', 'SLOWER', 'SLOW', 'NORMAL', 'FAST', 'FASTER', 'FASTEST'
# The faster the value, the more performance will be used, which
# may lead to TPS loss.
update-quality: NORMAL
# Set the item with which a player can click a shop to retrieve information.
# You can set this to an empty string to disable this feature.
shop-info-item: "STICK"
# Set whether interaction with the hologram should be enabled.
# If set to true, a player can do the exact same thing with the
# hologram, as with the chest. You can even open the chest if you
# are the vendor or have permission.
enable-hologram-interaction: true
# Set whether a debug log file should be created.
# The file may get large! Please enable this setting when reporting bugs.
enable-debug-log: false
# Set whether WorldGuard integration should be enabled
# Of course, this only works if WorldGuard is installed
enable-worldguard-integration: true
# Set whether Towny integration should be enabled
# Of course, this only works if Towny is installed
enable-towny-integration: true
# Set whether AuthMe integration should be enabled
# Of course, this only works if AuthMe is installed
enable-authme-integration: true
# Set whether PlotSquared integration should be enabled
# Of course, this only works if PlotSquared is installed
enable-plotsquared-integration: true
# Set whether uSkyBlock integration should be enabled
# Of course, this only works if uSkyBlock is installed
enable-uskyblock-integration: true
# Set whether ASkyBlock integration should be enabled
# Of course, this only works if ASkyBlock is installed
enable-askyblock-integration: true
# Set whether IslandWorld integration should be enabled
# Of course, this only works if IslandWorld is installed
enable-islandworld-integration: true
# Set whether GriefPrevention integration should be enabled
# Of course, this only works if GriefPrevention is installed
enable-griefprevention-integration: true
# Set whether AreaShop integration should be enabled
# Of course, this only works if AreaShop and WorldGuard is installed
enable-areashop-integration: true
# Set whether the vendor of a shop should get messages when players
# buy or sell something from/to his shop or if his shop is out of stock
enable-vendor-messages: true
# Set whether only the shops a player has in sight should be shown to him.
# If set to false, every shop near the player (with the specified
# distance) will be shown to him.
only-show-shops-in-sight: true
# Set whether only the shop a player is looking at should be shown to him.
# This only has effect if 'only-show-shops-in-sight' is enabled
only-show-first-shop-in-sight: true
# Set whether the hologram's location should be fixed at the bottom,
# so when it gets more lines, it won't interfere with the item or chest,
# but goes higher.
hologram-fixed-bottom: true
# Set the amount (may be negative) a hologram should be lifted in the y-axis.
# A value of '1' equals to one block, and a value of '0.25' is equal to the
hologram-lift: 0
# Set whether players should be allowed to sell their items, even if the
# amount they have, is lower than the amount, the shop owner has set for the
# given price, or if the inventory of the chest doesn't have enough space
# for all the items, but only for a few, or if the player only has enough
# money for a few items, but not for the amount, the shop owner has set.
# When set to true, players may also buy items from a shop, even if the
# amount of items in the chest is lower than the amount, the shop owner has
# set for the given price, or if they don't have enough space in the
# inventory for all of the items, but only for a few, or if the shop owner
# doesn't have enough money to buy all of the items, the player wants to
# sell. The price will be calculated correspondingly.
# (If it's not clear enough, please let me know)
auto-calculate-item-amount: false
# Set whether prices may contain decimals (prices of existing shops will stay)
allow-decimals-in-price: true
# Set whether players should be allowed to sell/buy broken items
allow-broken-items: false
# Set whether the level of a potion or tipped arrow (if upgraded) should be
# appended to the item name. If set to true, the level ("II") will be
# displayed after the item name, but only if the item does NOT have a
# custom name. If set to false, it will only be shown in the
# shop info message.
append-potion-level-to-item-name: false
# Set whether shops should automatically be removed from the database if
# an error occurred while loading e.g. when no chest is found at a
# shop's location.
# This might be useful if you're removing shop chests with WorldEdit,
# resetting plots, or similar
remove-shop-on-error: false
# Set whether the mouse buttons should be inverted.
# Default:
# Right-Click -> Buy
# Left-Click -> Sell
invert-mouse-buttons: false
# Set the maximal distance (in blocks) to the shop where the
# player can see the hologram.
maximal-distance: 2
# Set the maximal distance (in blocks) to the shop where the
# player can see the floating shop item.
maximal-item-distance: 40
# Set the price a player has to pay in order to create...
# You can set this to 0 to disable costs.
# Value MUST be a number (e.g. 1, 1.5, 2.75, ...)
shop-creation-price:
# ...a normal shop
normal: 5
# ...an admin shop
admin: 0
# Set whether the shop's chest should be protected by hoppers
hopper-protection: true
# Set whether the shop's chest should be protected by explosions
explosion-protection: true
# Set whether the buy price must be greater than or equal sell price.
buy-greater-or-equal-sell: true
# Set the minimum prices for each individual Item. Not per Stack, per single Item!
# To add an item, follow the format below.
# Important: You must have exactly 2 leading spaces in each line
# You can find the item names in the 'item_names.txt' file.
minimum-prices:
# "STONE:1": 0.5
# "DIAMOND_SWORD": 100
# Set the maximum prices for each individual Item. Not per Stack, per single Item!
# To add an item, follow the format below.
# Important: You must have exactly 2 leading spaces in each line
# You can find the item names in the 'item_names.txt' file.
maximum-prices:
# "STONE:1": 19.9
# "DIAMOND_SWORD": 1000
# Set the items of which a player can't create a shop.
# To add an item, follow the format below.
# Important: You must have exactly 2 leading spaces in each line
# You can find the item names in the 'item_names.txt' file.
blacklist:
# - "STONE:1"
# - "DIAMOND_BLOCK"
# Set the events of AreaShop when shops on that region should be removed.
# Important: You must have exactly 2 leading spaces in each line
# Valid values are: DELETE, UNRENT, RESELL, SELL
areashop-remove-shops:
- "DELETE"
- "UNRENT"
- "RESELL"
- "SELL"
# Set whether the custom WorldGuard flags should be allowed by default
# (true = Allowed by default, false = Denied by default)
# This can, of course, be overridden in specific regions and is only
# enabled if WorldGuard is installed and WorldGuard integration is enabled
worldguard-default-flag-values:
create-shop: false
use-shop: false
use-admin-shop: false
# Set the types of Towny plots where shop creation should be allowed for...
# Important: You must have exactly 4 leading spaces in each line
# Valid values are:
# RESIDENTIAL, COMMERCIAL, ARENA, EMBASSY, WILDS, SPLEEF, INN, JAIL, FARM
towny-shop-plots:
residents:
- "COMMERCIAL"
mayor:
- "COMMERCIAL"
king:
- "COMMERCIAL"
# Configuration of the database, where everything is stored.
# Shops are found in the table 'shop_list', and logged economy
# transactions are found in the table 'shop_log'
database:
# Select the type of database which should be used
# Either use 'SQLite' or 'MySQL'. Otherwise you will break the plugin!
type: "SQLite"
# If the specified type is 'MySQL', here you configure the...
# (You can leave this empty if you're using SQLite)
mysql:
# ...interval in seconds, when the database should be pinged,
# to keep the connection alive
# You can set this to '0' to disable the ping interval
ping-interval: 3600
# ...hostname where the database is accessible
hostname: ""
# ...port where the database is accessible (default: 3306)
port: 3306
# ...database you want to use
database: ""
# ...username you are going to login with
username: ""
# ...password you are going to login with
# Be careful, as anyone who can read this file, can read the password!
password: ""
# Shop limits are handled with permissions.
# A player with permission "shopchest.limit.X" has a limit of X shops,
# a player with permission "shopchest.limit.*" does not have a shop limit.
shop-limits:
# Set whether admin shops should be excluded of the shop limits.
# If set to true, admin shops won't be added to a player's shop count.
exclude-admin-shops: true
# Set the amount of shops that anyone who doesn't have a
# specific permission may have.
# If you don't want the players to have a limit by default
# set the value to -1.
default: 5
Developer API
ShopChest has a maven repository. To add it to your project, insert the following code in the pom.xml:
<repositories>
<repository>
<id>codemc-repo</id>
<url>https://repo.codemc.org/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>de.epiceric</groupId>
<artifactId>ShopChest</artifactId>
<version>1.13-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
There are a few events you can catch with the API. The javadoc can be found here.
FAQ
- I am getting You don't have permission to buy/sell something here
- If you have WorldGuard or PlotSquared installed, you need to allow or set the custom flags use-shop and use-admin-shop which are all denied (or set to owner) by default.
- You can also grant permission shopchest.external.bypass that allows players to use shops in regions that deny shop use.
- I am getting You don't have permission to create a shop here
- If you have WorldGuard installed and enabled its integration, you need to allow chest-access and the custom flag create-shop which is denied by default.
- If you have Towny installed and enabled its integration, a player can create shops only in plots with the configured type.
- If you have PlotSquared installed, only players with a rank that allows shop creation (can be set per flag create-shop) are allowed to create shops.
- If you have ASkyBlock, uSkyBlock or IslandWorld installed, a player can create shops only on islands where he/she is member or owner (or as set in the config).
- If you have GriefPrevention installed, a players can create shops only in regions where they are allowed to open chests.
- If you don't have any of them installed, you may have a chest protection plugin installed (like Lockette or LWC) which denies players to open the chest. When players cannot open a chest, ShopChest will not allow them to create a shop there.
- If you enable the debug log in the config (and reload or restart the server), you can read the reason why a player is not allowed in the debug.txt.
- You can also grant permission shopchest.create.protected that allows players to create shops on every type of protected chest and in regions or plots that deny shop creation.
- I am getting Could not find translation "..." in selected language file. Using default translation ("...") in the console
- This means that the selected language file is not up to date and doesn't contain the localization of a specific message, item name or similar.
- If you haven't changed anything in the selected language file, you can remove it so ShopChest creates a new and updated one.
- If you have changed some entries in that file, you can either back up the changed entries, delete the file, let a new one be created and paste the entries back in, or add the missing values in the right format to the language file.
hi i have problem with this plugin im playing at my server 1.16.1 paperspigot and i see this in console
I know that proper work of this plugin depends on the vault. But is there a way to make this work with a scoreboard value?
Everytime i use the /shop create command even if i follow instructions it says shop not found. What do I do?
This plugin is awesome so i hope you gona update it soon on 1.13 version :3
love this plugin cant wait for it to be updated to work on 1.13
Tried installing onto my server... just comes up with:
[Server] ERROR Could not load 'plugins/ShopChest.jar' in folder 'plugins'
Hi i have a problem. a normal player cant sell or buy from admin shop and normal shop.
please help quickly. thanks
my admin shops run out of stock how do i make it so its infinite?
Hi I'm having a small problem it probably nothing but it with the permissions for normal users as its not letting them buy or sell to anyone's shop it says they don't have permission, I know it probably something to do with the perms for the rank but I'm not sure how to change that can someone please tell me how that would be greatly appreciated. ;)
In reply to BobBarkerrTV:
It's probably because of WorldGuard out PlotSquared, so please have a look at the first FAQ entry.
Hi, I have the same problem yet, I see the holograms without see them...
Any chance you can make it possible to have a free shop, i want people to be able to buy the guidebook for free.
Hi, there is a problem...
When I place 10 shops (example) after five minutes approx, all the holograms are visibles without look them fixedly. And I have to restart approx 3 or 4 times to see the shops normal...
Help please, Saludos.
In reply to Flo:
I got reported that several times now, I'll try to fix it as soon as possible with the next update.
It works! Its awesome! Thanks.
May I change the chest for a slab?
Saludos! :D
In reply to Flo:
No, this is and will not possible anytime soon.
I cant place a shop, the plugin say this:
an internal error occurred while attempting to perform this command
In reply to Flo: Then there must be an error message in the console. Can you have a look and send it to me?
In reply to Forge_User_13942153:
[17:47:23] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'shop' in plugin ShopChest v1.12.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:140) ~[craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:622) ~[craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1326) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1186) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(SourceFile:37) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(SourceFile:9) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_101]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_101]
at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:695) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:366) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:650) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:554) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]
Caused by: java.lang.NoSuchMethodError: net.milkbowl.vault.economy.Economy.getBalance(Lorg/bukkit/OfflinePlayer;Ljava/lang/String;)D
at de.epiceric.shopchest.command.ShopCommandExecutor.create(ShopCommandExecutor.java:373) ~[?:?]
at de.epiceric.shopchest.command.ShopCommandExecutor.onCommand(ShopCommandExecutor.java:98) ~[?:?]
at de.epiceric.shopchest.command.ShopSubCommand.execute(ShopSubCommand.java:42) ~[?:?]
at de.epiceric.shopchest.command.ShopCommand$ShopBaseCommandExecutor.onCommand(ShopCommand.java:250) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit-1.12.jar:git-Bukkit-ed8c725]
... 15 more
[17:47:51] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2321ms behind, skipping 46 tick(s)
[17:49:23] [Server thread/INFO]: Florenthz issued server command: /shop create 2 2 2
[17:49:23] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'shop' in plugin ShopChest v1.12.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:140) ~[craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:622) ~[craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1326) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1186) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(SourceFile:37) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(SourceFile:9) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_101]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_101]
at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:695) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:366) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:650) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:554) [craftbukkit-1.12.jar:git-Bukkit-ed8c725]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]
Caused by: java.lang.NoSuchMethodError: net.milkbowl.vault.economy.Economy.getBalance(Lorg/bukkit/OfflinePlayer;Ljava/lang/String;)D
at de.epiceric.shopchest.command.ShopCommandExecutor.create(ShopCommandExecutor.java:373) ~[?:?]
at de.epiceric.shopchest.command.ShopCommandExecutor.onCommand(ShopCommandExecutor.java:98) ~[?:?]
at de.epiceric.shopchest.command.ShopSubCommand.execute(ShopSubCommand.java:42) ~[?:?]
at de.epiceric.shopchest.command.ShopCommand$ShopBaseCommandExecutor.onCommand(ShopCommand.java:250) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit-1.12.jar:git-Bukkit-ed8c725]
... 15 more
[17:49:29] [Server thread/INFO]: [0;36;22m[Relax Server] [0;31;1mAtencion. [0;36;22mLos items en el suelo se perderan en [0;37;22m60 [0;31;1msegundos![m
In reply to Flo: You probably have an outdated version of Vault. Please update it.