Inactive [MECH/ECON] Showcase v0.8.1 - Create visual shops by spawning drops on slabs [1.1-R5]

Discussion in 'Inactive/Unsupported Plugins' started by narrowtux, May 17, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    Version 0.8.1​
    As supposed in this thread, I created a plugin that lets you put items into glass blocks (now steps, it's notchs fault) to showcase them. This is useable for shops, to show what's for sale there, or to make clear what type of farm you built.
    • Showcase all items in a half-step Block
    • Block protection (you can't break the step block and the block below it to prevent that the item falls down)
    • Multiworld
    • Items in a showcase can't be picked up
    • Only the player who created a showcase can remove it
    • Prevents despawning of items (Normally, drops disappear after 5 minutes)
    • You can setup finite and infinite shops
    • DropChest support (disables DropChest for absorbing the showcased items)
    • WorldGuard support (works out of the box)
    • Localisation
    • Can show custom item names through BukkitContrib
    • Economy support:
      • iConomy 4 & 5
      • BOSEconomy
      • Essentials Economy
    Download & Source-Code
    Download Showcase.jar
    Browse Source-Code on Github
    You will need an economy system if you want shops.
    This will install NarrowtuxLib automatically!
    Please donate, if you really like this ;)
    Show Videos (open)

    When you have got issues, please read this:
    Issue Report (open)

    1. Please, first check if you have got the most recent version of Showcase and the most recent recommended build of Bukkit.
    2. Then, check if the bug is already listed in the "Known Bugs" section.
    3. After doing step 1+2, report the bug with at least this information:
      • Version of Showcase
      • Version of Bukkit
      • If possible, a step-by-step explanation of the bug
      • If possible, console errors
      • When you think that this has got to do with another plugin, please list all your plugins like this:
        • PluginA, PluginB, PluginC ...
    This will be incredible helpful for me to fix it faster.

    You don't actually have to retype everything I typed here, but if you'd take it as a guideline which content you should include in your issue report, it's more helpful ;)

    Please, don't come here just to say "This doesn't work.". This says nothing.

    Adding a showcase
    1. Start sneaking!
    2. Right-click a half-step block with the item in your hand you want to showcase
    3. An assistant will ask you which type of Showcase you want to add. Type the text before the colon :))
    4. Depending on the type you chose, the assistant will ask some extra questions, follow the assistant to finish showcase creation.
    Removing a showcase

    1. Sneak
    2. Right-click on a showcase. If this was a finite showcase or an exchange showcase, you will get your items back.

    ActionPermission-NodeWithout Permissions
    Create a basic Showcase.showcase.basicPlayer
    Create a infinite shop Showcase.showcase.infiniteOperator
    Create a finite shop Showcase.showcase.finitePlayer
    Create an exchange Showcase.showcase.exchangePlayer
    Buy from a finite shop
    Buy from an infinite shop
    Removing a showcase of other players.showcase.adminOperator

    The column "Without Permissions" explains which user-type can use this permission when no Permissions system is installed.
    What are shop showcases?
    A shop showcase can be used to sell items to your players. There are 2 types of shops now:
    1. Infinite shop. This one has an infinite amount of items. The money that the players give to buy an item will go to nirvana
    2. Finite shop. This one has that number of items which the owner has set up. The owner will get the money from which the items were bought.
    How can a Player buy items from a shop showcase?

    1. Click on the Showcase. The price per item and the available amount will be displayed.
    2. Type in the number of items you want and hit enter. A message will show you the success of the checkout.
      • Type 0 to abort checkout
    How can you refill a finite shop showcase?

    1. Click on it
    2. Type in the amount of items to refill. Negative values will remove that amount from the showcase.
    3. Walk away or type 0.

    The showcase command handles manual saving and loading
    /showcase save
    Saves the items to showcases.csv
    /showcase load
    Loads the configuration, translation and items without saving (Use with caution)
    /showcase reload
    Saves and loads everything after that. Useful when some items aren't in place and you want to quick-fix that.

    The configuration file is auto-generated and is called showcase.cfg
    Here are the configuration possibilities:
    • basicmode : this decides if the plugin should operate like in version 0.2 or before (Just the basics)
    • priceforbasic : this adds a price to the basic showcases
    • priceforfinite : this adds a price to the finite showcases
    • priceforexchange: this adds a price to the exchange showcases
    • removewhenempty: when set to true, a finite showcase will be removed when it's amount hits 0
    • showcaseprotection : turn this to false to be able to remove showcases from other players (griefers) (you should now use WorldGuard instead of this one ;) )
    • locale: standard is en-US. The german translation which is included in the jar-file is de-DE. If you type that in, it will copy the german file from the jar to your plugins folder
      • You can change the translation very easily by editing the existing locale.
      • Colors are supported, just add something like [GREEN] or [DARK_RED] to the text.
      • You can add newlines with \n
    • autosaveinterval: the time between two auto-saves in seconds. Standard is 60 secs. Use -1 to disable autosave.

    Currently available translations:

    Version 0.8.1
    See the whole changelog

    • Spawn multiple items in the same glass block (up to 4, would be aligned nicely)
    • Verify that there is no free space below the glass block before adding a showcase
    • Maybe let the showcase glow when you placed torches, glowstone or lava in it
    • Custom messages (aka localisation)
    • Sell-Showcases
    • DropChest support (so the items inside the glass won't be absorbed by a Dropchest)
    • Limit the amount of Showcases per player
    • Add a price that the creator of a showcase has to pay (there would be an independent price for each basic, infinite and finite showcases)
    • Linking infinite shops to banks (money spent for items goes there)
    • Rent a showcase for money/day
    • Autosave with configureable interval
    • Commands for save, load and reload
    Crossed items are already done!

    Known bugs
    • This plugin conflicts with some chat-altering plugins (i.e. bColoredChat) this is because the authors don't know how to correctly set up the priority of events.
    • Normal players (the ones that aren't operators) can't use showcases that are in the spawn-protection area. Either disable the spawn protection or place the showcases to an other location (Disable spawnprotection by setting "spawn-protection-size=0" in the file)
    • With the latest dev preview (not the recommended build), you're able to make slabs to double steps. I've got to investigate until they propose it as RB.
    • ATM, Showcases won't save enchantments. So please just don't try to sell yours because that wouldn't work either.
  2. Offline


    I should get a mention in the OP for my bug spotting. :p
    Just joking...

    But yeah, spotted this:

    18:16:05 [SEVERE] Could not pass event PLAYER_CHAT to Showcase
    java.lang.NumberFormatException: For input string: "data"
            at java.lang.NumberFormatException.forInputString(Unknown Source)
            at java.lang.Integer.parseInt(Unknown Source)
            at java.lang.Short.parseShort(Unknown Source)
            at java.lang.Short.valueOf(Unknown Source)
            at java.lang.Short.valueOf(Unknown Source)
            at de.moritzschmale.Showcase.Types.ExchangeTypePage.onPageInput(Exchange
            at com.narrowtux.Assistant.Assistant.onPlayerChat(
            at de.moritzschmale.Showcase.ShowcasePlayerListener.onPlayerChat(Showcas
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.Packet3Chat.a(
            at net.minecraft.server.NetworkManager.b(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(
    Happens in the 'Exchange' part of the shop when it is being created, it said "or type item:data", so one of my players literally typed item:data, and the console window kept getting spammed with that, not sure if you can fix it to not spam the console window or not, just giving you the heads up.

    Great GREAT plugin. Thank you for all your work on it. :)

    EDIT: Just a request, could you also add so on pre-made player made showcases, they can see the price of their own item.


    murdrums makes a showcase for 60 logs at 15 each.
    At the minute when I left click, I get the refill assistant that says "60 of log in showcase", is it possible to change that to "60 of log in showcase at 15 each" ? :)

    EDIT2: Is it also possible to make it so you need to crouch and left click to use the refill assistant, and just left click to see the price of your own items? Or does that conflict with anything else that requires crouch and left click.
  3. Offline


    Hmm, I seem to have problems working with exchange, for example when I want to exchange a map for lets say 1g.

    When I get into the screen, and type "exchange" it asks me:

    "Put the item you want to get for exchange and type ok, or type item:data"
    Presuming you talk about a currency here, so you switch to goldbars on the inventory and type ok?
    I tried giving the item id and item:266 but those dont work. And when I have the goldbars in my hand, and I type ok, I get to the Exchange Rate window which works utterly confusing too. 2 gold for 1 diamond = 1:2. So I pay 2 gold for 1 diamond in this example or pay 1 diamond and get 2 gold?
  4. Offline


    If you want to exchange 1 gold bar for 1 map, it would be 1:1.
    And the example works left to right, as it states. So the example is giving 2 gold bars in exchange for 1 diamond.

    Hope this helps. :)
  5. Offline


    Yeah, I should explain this a little more:
    When you don't have got the item you want to get paid with, you type in it's id, name, or even it's id and data-value (for colored blocks for example). So if you want black wool blocks for something else, type 35:15
    If you've got the item, you can simply switch to that item and type ok after that.
    The exchange-rate is a bit confusing, I have to admit :)
    the left value is what the player get's, the right value is what the player has to pay for this.
    So when you want to get 2 gold blocks for one pickaxe, you have to type 1:2.
    I will upload an info-graphic that explains this more soon.

    Noo that's not true...
    You get one diamond for paying 2 gold bars ;)

    First, thank you for reporting the bug ;)
    The second one is easy to add to the existing refill-assistant, not very much work to be done here.
    I won't make it more difficult by adding crouch-left-click just for displaying the price ;)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jul 16, 2016
  6. Offline


    Thanks for explaining the exchange system, my players and me are in love with this plugin already, it's so much more pleasing on the eye than looking at a sign or a chest shop. :)

    No problem on reporting the bug, i'll report anymore I find in the future :-D glad to help such a great plugin become better. :)
    And I only thought of the crouch-left-click to refill, and just left click without crouching to see the price, as it's quite time consuming if a player is checking around 40 of their items prices, and has to type "0" to get out of the refil assistant when he/she is done, which also includes a lot of chat window spam for them, instead of just a simple line that says "X amount of X in showcase, at X price each."

    Thanks anyways. :)
  7. Offline



    When I Showcase Sand, I chose to Exchange.
    I now see the "Exchange Item" menu where he asks me what item I want for in its stead, I select ironbars on my hotbar and type ok. Exchange rate is just 1:2 (so you get 1 sand when you pay with 2 ironbars). I confirm i want to sell 10 items. Then the plugin tells me its succesfully made a showcase.

    Now the huge confusion: It prints 'added 0 iron ingot to your inventory' while sandstone is on display? Is this normal? I don't get any sand as well
  8. Offline


    He hasn't got to cancel every time, he can click on each one without having to cancel manually, and if he goes away from that place, the assistant is automatically cancelled.
    That's for the owner of the showcase. He can collect the paid items when he left clicks on it. When another player clicks on it, a normal shop-assistant will be displayed to him.
    I will soon provide a refill-assistant for this.
  9. Offline


    Ah, thats better than, thanks for clearing that up. :)
    When will the bug fix and price showing up in the refill assistant be released?
  10. Offline


    Tomorrow, I'm going to bed now ;)
  11. Offline


    HUGE problem that I have now @narrowtux
    I had around 100+ items in a showcase, and the server backup'd and saved at 10:09PM, the server then crashed to a halt, and never resumed at 10:48, the backup ONLY backs up the world, not the plugins, and ALL the items for sale on the showcase have dissapeared, and the players do not have them in their inventorys or chests. And the showcases arent in the Excel Database either, I'm going to have a few raging players tbh.
  12. Offline


    Would it be possible for you to add the ability to sell kits in a shop? Like, right click an empty showcase with nothing in your hand, and type kit <kitnamehere> to put that kit on display to buy/show off.
  13. Offline


    Great plugin...
    many thanks...
    I only have one request:
    is it possible to make a showcase that you can sell your items to, and receive money for that??
    it could be like the limited/unlimited showcases, only for selling...
    when a seller clicks on a limited sell showcase, he sells the item to the showcase, if the showcase owner have money, and then receive the correspondent money amount.
    and when the seller clicks on a unlimited sell showcase, he sells the item for money coming from nirvana...
  14. Offline


    So I assume regular clay doesn't work? Clay blocks work fine, but the balls of clay don't work. Also is there a chance you can add a notification when someone buys from your shop?
  15. Offline


    Every Blocktype works, And there is also a notification sent when someone buys from your shop. (not the infinite one)
  16. Offline


    I got it, the notification wasn't that noticeable as (white text), but it works fine. I found out the name for it was (clay_ball) Instead of just clay lol. was wondering what went wrong, thank you narrow.
  17. Offline


    It just came in my mind, that you could sell to a showcase, so showcases could be like "showcases" and like "we take this" this would make it perfect (perhaps you add the selling-option + price-declaration to the assistant)
    things sold to the showcase are instantly added to the amount of items a showcase already has, so you could place one to let players sell logs for 2 and buy them for 5
    Also, there could be a "bin"-showcase which buys every item to a defined standard-price from the player. like, if the price would be 1 10 diamonds give 10 coins but also 10 dirt gives 10 coins. That could be used as Recycling-center to get rid of things like doors without burning them.
  18. Offline


    I like the idea with the trash :D
    An empty bucket should be displayed there.
    Sell showcases will also come soon, maybe I even combine them with the current showcases.
  19. Last version:

    - People still reporting they can dupe items by picking up showcases
    - It now seems to ignore "showcase.basic", everyone is being asked to create a showcase when crouching, not just people with the node.
  20. Offline


    If you don't tell me how they are able to pick the items up, I can't fix it. The People should report what they did to make this happen
    The second one is true, the assistant will show up also for players who have no permissions.
  21. Well yea, someone just said he "walked over some showcases and could loot the items" <_<
  22. Offline


    Do you think that would be possible to add a feature based on the datavalue (damage) of a specific block (half-step by default) to store all the parameters of the showcase ?
    Thanks to that, we would be able to craft a pre-configured showcase (ID, finite/infinite, amount, price) with CustomCrafting or Cookbook.

    Or if you can't because it's impossible to store those values in the damage value, would it be possible to configure a default price for each ID in a config file and then use the damage value to store parameters like finite/infinite (for example 0=not a showcase, 1=finite showcase and 2=infinite showcase). Then the players would just craft a showcase and put their items in it without any configuration or commands. The item would be sold by following the price list.

    That would be nice to create a standard and simple economy.
  23. Offline


    I don't know if minecraft keeps data-values that don't change the appearance (because half-steps already have data-values for their type (cobblestone, stone, wood, sandstone)).
    There would be very much to code, though. :D
  24. Offline


    This plugin is beast! I have been looking for a shop plugin but none seem to cut it, they're either too complicated or too stupid or I didn't get them to work :) This is easy and neat and works out of the box!
    Also the OP is perfect documentation. Everything I need to know to use the plugin.

    I have been trying to disable the spawn protection by setting spawn-protection=0, but that didnt work. Have been googling with no results. How could I disable the spawn protection?

    Last, a feature request/idea:
    I would like to be able to create a showcase of free items. For instance, instead of having a /kit starter or similar, I would like to offer my players to be able to have either..
    • equipment with like X different items from one showcase
    • it is now, one of each of those X different items but retrieved from separate showcases.
    Of course another option would be to have a free infinite showcase.

    Also, it would be sweet if you either could restrict use like either this examples:
    • One use per each showcase. Once you had that free items, you can't have more.
    • If it would be possible to check if the player already have that item in their inventory, they can't have one more free.
    • This should go with the former example (or without, but I think this is required if the former example is an option to avoid abuse.) — A cooldown period to restrict people to "get free item, drop it, get another free item, drop that one etc..
    I guess you can come up of more variations of how to set up free showcases, but this would be my preferred setup.

    I think that was it, did I make anything unclear just send me a message!
  25. Offline


    I googled it too, I found that the property is called "spawn-protection-size". Maybe it works when you set this to 0...
    Thank you for your Feature suggestions.
    The Kit-Showcase has already been suggested, I have a cool idea how to display the kit: The item-id in the showcase will change every 5 secs, and walk through the item-ids of the kit. Also, I will implement that cooldown so the players can't abuse the kits.

    It's already very easy to set up a showcase, you sneak and rightclick on it, then the assistant takes the player step-by-step through the setup-process.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Sep 9, 2018
  26. Offline


    @narrowtux Thank you, seems like "-size" was it.

    And good work on the future features :)
  27. Offline


    Minecraft keeps Datavalues for any block. That's the solution the creaturespawner plugin uses to store which kind of mob to spawn with a spawnerblock (which is pretty cool to let us create recipes for specific creature spawner). :)

    But you're right, steps already have a data-value which is used for appearance... Have you solved the Notch corrected bug with glasses. :)
  28. Offline


    Hey I was wondering if there currently is a way (which I havent found, hopefully not due to my ignorence) to alter the pricing of a showcase, without having to remove all the contents and suffer the failure of pricing it wrong again, having to fork out yet another [x] money to remake it etc.

    Like restock, but rightclick in sneak with an empty hand or something brings reprice menu up..
    anyway, beautiful mod all the same.
  29. Offline


    The Creaturespawners do not originally have data-values for their mob-type, just creaturebox saves and reads the type from the data-value to make sure that a creaturespawner keeps its type. But I think that this is the only blocktype which doesn't use the data-value for it's type.
    Good, will change this in the OP ;)

    Currently not... I planned this though. When you really want to change the prices, you can alter them in the showcases.csv in the plugins/Showcase folder. But you have to stop the server first, then edit the file, then restart the server.
    Finite Showcases have this format:
    Infinite Showcases have this format:

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jul 16, 2016
  30. Offline


    You're right but for example the glass block doesn't use its damagevalue, isn't it ?
    Is it still possible in the 1.6.6 to use a glass block for your showcase ?

    I would love to install your plugin but I would like it more "simple" to use. That's why a default price-list would be great. The players would just create their finite showcase with a recipe and then put the handled items in it. :)

    Also, maybe add an option to set if by default the wood-slab, stone-slab or sandstone-slab are finite or infinite showcase ? That way, I would just create a recipe for just the finite showcase.
  31. Offline


    naw i meant like, as a player changing the price of their stock, not the server admin. (im a server user, not owner)
Thread Status:
Not open for further replies.

Share This Page