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).

    [​IMG]

    The published version on this page is outdated and does not support servers running version 1.13 or higher. To prevent any known issues, I highly recommend to periodically get the latest snapshot build from the build server here that supports servers up to version 1.16.2.


    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. james090500
    james090500
    5/5,
    Version: 1.12.3
    This has been my goto shopchest plugin for years. Contant updates and it just works. 5/5
  2. xemles
    xemles
    3/5,
    Version: 1.12.3
    Shops in some chunks randomly despawn then we have to reload the plugin to get all those shops back.
  3. Bobbber
    Bobbber
    5/5,
    Version: 1.12.3
    Excellent plugin that we have been using for over 5 years, don't stop your good work and I will always wait as long as it takes for updates. congratulations
  4. RPGMais
    RPGMais
    5/5,
    Version: 1.12.3
    Plugin not work in 1.16.4, you can update plugin? thx for the god plugin! the best
  5. hadzardoes
    hadzardoes
    5/5,
    Version: 1.12.3
    theres a way to toggle the hologram of the shop?
    ----------------------------------- (80 characters)
  6. szymeo
    szymeo
    4/5,
    Version: 1.12.3
    Is there a possibility to sell all items of a kind in eq? For example with shift + right/left click?
    1. EpicEric
      Author's Response
      No but you can sell a stack by shift clicking
  7. Nextler
    Nextler
    5/5,
    Version: 1.12.3
    Nice plugin, i like it's. Please, add integration with Lands, i will be very happy.
  8. jamiesieske01
    jamiesieske01
    1/5,
    Version: 1.12.3
    wenn ich ein plot remove dann bleibt der shop da




















    ---------------------
  9. RainbowM834
    RainbowM834
    4/5,
    Version: 1.12.3
    It's official, 1.16 breaks this plugin lol. Overall, it's a great shop plugin and definitely would use for future economic-base servers.
    1. EpicEric
      Author's Response
      Use the latest dev build for 1.16
  10. MMCraftin
    MMCraftin
    1/5,
    Version: 1.12.3
    The armor stands glitch out and now Im stuck with random floating text everywhere don't use this plugin.
    1. EpicEric
      Author's Response
      This will not happen anymore when using the dev builds