ShopChest 1.12.3

A Bukkit plugin letting players create custom chest shops.

  1. EpicEric
    Native Minecraft Version:
    Legacy (< 1.13)
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    Source Code:
    https://github.com/EpicEricEE/ShopChest
    Languages Supported:
    German
    This plugin depends on Vault and an economy plugin that supports Vault (e.g. my plugin JustMoney).

    Plugin will not be updated for 1.18.

    Last version working up to 1.17 can be found here.

    [​IMG]


    ShopChest is a very simple to use chest shop plugin. Managing shops is done via command, while using them is done by clicking the chest. A hologram above the chest 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. Other features include:
    • Very easy shop interaction and creation
    • Visually pleasing with hologram and floating item
    • Admin shops with infinite supply
    • No struggle with complex attributes or flags, it just copies the item in your hand
    • Included hopper and explosion protection
    • Floating items are protected from water, lava, pistons, zombies, getting picked up, despawning and ClearLag (and similar)
    • Fully translatable, supporting Minecraft language files
    • Support for MySQL and SQLite
    • Supports most protection plugins, even hooks into e.g. WorldGuard, PlotSquared or Towny for advanced integration
    • Vault integration for economy
    • Extensive list of configurable options

    [​IMG]

    Usage
    By default, a player can buy from a shop by right-clicking the chest, and sell to a shop by left-clicking it. This can be reversed in the config. To buy or sell a stack at once, the player can sneak.
    A player can retrieve information about a shop either by using the command /shop info or by clicking the chest with the configured shop-info-item that defaults to a stick.

    Commands
    The main command name can be customized in the config but will be referred to here as /shop.
    The argument <buy-price> refers to the price for which players can buy the item from the shop while <sell-price> is the price for which players can sell their items to the shop.

    /shop create <amount> <buy-price> <sell-price> – Create a shop
    /shop create <amount> <buy-price> <sell-price> admin – Create an admin shop
    /shop remove – Remove a shop
    /shop info – Retrieve information about a shop
    /shop open – Open a shop
    /shop removeall <player> – Remove all of a player's shops
    /shop reload – Reload the shops and config
    /shop config (set|add|remove) <property> <value> – Set configuration values
    /shop update – Check for plugin updates

    Permissions
    • shopchest.*
    • shopchest.create (allowed by default)
    • shopchest.create.admin
    • shopchest.create.protected
      Allow shop creation on protected chests or in protected regions
    • shopchest.extend.other
    • shopchest.extend.protected
      Allow shop extension on protected chests or in protected regions
    • shopchest.buy (allowed by default)
    • shopchest.sell (allowed by default)
    • shopchest.external.bypass
      Allow shop use in protected regions
    • shopchest.openOther
    • shopchest.remove.other
    • shopchest.remove.admin
    • shopchest.reload
    • shopchest.config
    • shopchest.update
    • shopchest.notification.update

    Developer API
    ShopChest is published on CodeMC's maven repository:

    Replace {version} with the respective version
    Code (XML):
    <repositories>
        <repository>
            <id>codemc-repo</id>
            <url>https://repo.codemc.io/repository/maven-public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>de.epiceric</groupId>
            <artifactId>ShopChest</artifactId>
            <version>{version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    Code (Text):
    repositories {
       maven {
           url = "https://repo.codemc.io/repository/maven-public/"
       }
    }

    dependencies {
       compileOnly 'de.epiceric:ShopChest:{version}'
    }
    Example Usage
    The API is not the most user-friendly and not the most documented, but it should be manageable to implement when necessary.

    Have a look at the javadoc
    Code (Java):
    // Events
    @EventHandler(ignoreCancelled = true)
    public void onShopBuySell(ShopBuySellEvent event) {
       Shop shop = event.getShop();
       long worldTime = shop.getLocation().getWorld().getTime();
       if (worldTime > 20000 || worldTime < 7000) {
           event.setCancelled(true);
           event.getPlayer().sendMessage("You can only use a shop between 7am and 8pm.");
       }
    }
    Code (Java):
    // Creating a shop (removing a shop is done similarly)
    ShopProduct product = new ShopProduct(itemStack, amount);
    Shop shop = new Shop(shopChest, vendor, product, location, buyPrice, sellPrice, shopType);
    boolean success = shop.create(true); // Creates the shop's hologram and item. Passing true so errors are logged in the console.

    if (success) {
       // Adds the shop to the server's shop list
       // Passing true so the shop is added to the database
       // The callback is optional
       shopChest.getShopUtils().addShop(shop, true, new Callback<Void>(shopChest) {
           @Override
           public void onResult(Void result) {
               // Optionally handle the success
           }

           @Override
           public void onError(Throwable throwable) {
               // Optionally handle the error here
           }
       });
    }
    Code (Java):
    // Getting shops
    Collection<Shop> shops = shopChest.getShopUtils().getShops();
    Shop shop = shopChest.getShopUtils().getShop(location);
    Code (Java):
    // Shop limits
    int shopAmount = shopChest.getShopUtils().getShopAmount(player);
    int shopLimit = shopChest.getShopUtils().getShopLimit(player);

    Does this plugin work with 1.13/1.14/1.15/1.16?
    • This version does not yet support 1.13/1.14/1.15/1.16, but you should get a developer build here with the latest feature set, including support for 1.13 - 1.16.1.
    AreaShop integration does not work
    • Try to remove any capital letters from the region's name, or wait for the next update.
    I cannot buy or sell anything, 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 cannot create a shop, 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 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 player can create shops only in regions where he/she is allowed to open chests.
    • If you don't have any of them installed, you probably 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 file.
    • 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.

    [​IMG]
    View the source on GitHub
    Get development builds

Recent Updates

  1. Fixes
  2. A few fixes
  3. Quickfix for ASkyBlock

Recent Reviews

  1. Paintsplatters
    Paintsplatters
    5/5,
    Version: 1.12.3
    Working as expected so far. why no more updates?
    Its a very good plugin and i hope you change your mind
  2. Ranksu
    Ranksu
    5/5,
    Version: 1.12.3
    Great plugin for latest version mate! Nice work doing this plugin. Keep work up!
  3. AfkF24
    AfkF24
    5/5,
    Version: 1.12.3
    Great plugin, easy to use and has great features! Even though the spigot releases haven't been updated in a while, there are working 1.17.1 builds available for download linked on top of the overview page. Keep up the good work!
  4. Proomp
    Proomp
    1/5,
    Version: 1.12.3
    Server version: 1.8.8

    [18:09:46 WARN]: Exception in thread "Craft Scheduler Thread - 16"
    [18:09:46 WARN]: org.apache.commons.lang.UnhandledException: Plugin ShopChest v1.12.3 generated an exception while executing task 75
    at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
    at org.github.paperspigot.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:23)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException
    at de.epiceric.shopchest.utils.UpdateChecker.check(UpdateChecker.java:43)
    at de.epiceric.shopchest.ShopChest$4.run(ShopChest.java:321)
    at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
    at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    ... 4 more
  5. MeuhSLy_
    MeuhSLy_
    4/5,
    Version: 1.12.3
    New build are made on Github etc but it not clear for us, can you please update your "1.13SNAPSHOT" for a "1.14.x" ? That can be more helpfull for us....
  6. Kyles120
    Kyles120
    4/5,
    Version: 1.12.3
    good plugin but really needs to be updated to 1.17 hopefully soon. It is essential on my server.
  7. souldin
    souldin
    5/5,
    Version: 1.12.3
    Great plugin, been using it for years on the server and everyone loves it. Please update to 1.17
  8. Hans_dieter
    Hans_dieter
    5/5,
    Version: 1.12.3
    Great Plugin! The players on my server love this. It is easy to setup and has many customization options. Please update to 1.17 :)
  9. HanneZHD
    HanneZHD
    5/5,
    Version: 1.12.3
    Geiles Plugin habe eine abstimmung auf meinem server gemacht die haben gesagt 10/10.
  10. Zutgurt
    Zutgurt
    5/5,
    Version: 1.12.3
    Its a very good plugin, but can you please add a fuction, that for example a player can only sell 64 items per day at a admin shop? This would be so nice!