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

    narrowtux

    [​IMG]
    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.
    Features
    • 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 ;)
    Videos
    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.


    Usage
    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.
    Permissions


    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 showcase.showcase.buy.finitePlayer
    Buy from an infinite shop showcase.showcase.buy.infinitePlayer
    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.
    Commands

    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.

    Configuration
    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.
    Translations

    Currently available translations:
    Changelog

    Version 0.8.1
    See the whole changelog

    Todo
    • 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 server.properties 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

    MiHo

    Me too! PLEASE
     
  3. Offline

    airsoftinva

    i am extremly upset with you narrowtux. MAking it a half block instead of glass was utterly STUPID! HOW COULD YOU! IT LOOKS LIKE CRAP NOW! so if you could. Do you think youd be able to make it configurable to use either one? otherwise im sorry to say im getting rid of this. I love this plguin but with half blocks it sucks.
     
  4. Offline

    Haekon

    Hey, Tux..experimenting a bit and I found that with VoxelSniper, you can delete to half-block. The item then just drops. I deleted about 20 blocks, the item just fell down. The shop didn't work. (obviously) but when I filled the deleted blocks in, the item raised back up into position. Then I replaced the half-block and the shop worked again.

    Not like it's a huge deal, aside from snipers being able to grief shops, but I figured it was interesting enough to post.

    I really like how resilient the thing is.

    An idea on the refill assistant: A simple login message letting you know the current level in your finite shops, and maybe a notification of what sold and for how much.

    And personally, I prefer the blocks to the glass. A lot of texture packs have really opaque windows which obscure the items showcased.
     
  5. Offline

    Twisted

    If you would have even bothered to read the last few posts before yours it would have been apparent that the glass no longer works because of a change Notch made in 1.6, so it's either half steps or nothing at all.
     
  6. Offline

    geloum

    Hello there, first, thanks for your awesome pluggin buddy.

    I have a bug, with max admins rights I try to remove items from a shop but it says : The shop is sold out with left click.
    When i try to sneack and right click it just doesnt work at all, nothing appears and the objetcs stay there.

    This brings a question : when a shop from a user gets empty, the stab doesnt get free? I mean, the user have to remove the "showed" item manually ?

    Thank you !

    Now, when I try to remove any objets by sneaking and right click (still admin) nothing works, I got no messages and the items stay on the slabs.

    Already restarted the server :§

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

    Twisted

    I don't think you can fix this but it would be important to put it down as a known conflict.

    With minecartmania enabled running a storage cart past a showcase will pick up the show case items, which will then respawn on the half step. However the items will also still exist in the storage cart effectively letting you dupe items.
     
  8. Offline

    ledhead900

    Same thing

    PHP:
    2011-06-05 17:56:25 [INFOWrong locationnet.minecraft.server.EntityItem@61
    2011
    -06-05 17:56:25 [INFO95.5,-5.5(5,-1vs 6,-1
    2011
    -06-05 17:56:25 [SEVEREjava.lang.ExceptionStack trace
    2011
    -06-05 17:56:25 [SEVERE]     at java.lang.Thread.dumpStack(Unknown Source)
    2011-06-05 17:56:25 [SEVERE]     at net.minecraft.server.Chunk.a(Chunk.java:367)
    2011-06-05 17:56:25 [SEVERE]     at net.minecraft.server.ChunkLoader.a(SourceFile:181)
    2011-06-05 17:56:25 [SEVERE]     at net.minecraft.server.ChunkRegionLoader.a(SourceFile:42)
    2011-06-05 17:56:25 [SEVERE]     at net.minecraft.server.ChunkProviderServer.loadChunk(ChunkProviderServer.java:133)
    2011-06-05 17:56:25 [SEVERE]     at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:63)
    2011-06-05 17:56:25 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.getChunkAt(CraftWorld.java:88)
    2011-06-05 17:56:25 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.getBlockAt(CraftWorld.java:56)
    2011-06-05 17:56:25 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.getBlockAt(CraftWorld.java:451)
    2011-06-05 17:56:25 [SEVERE]     at org.bukkit.Location.getBlock(Location.java:72)
    2011-06-05 17:56:25 [SEVERE]     at de.moritzschmale.Showcase.ShowcaseItem.<init>(ShowcaseItem.java:42)
    2011-06-05 17:56:25 [SEVERE]     at de.moritzschmale.Showcase.ShowcaseMain.load(ShowcaseMain.java:247)
    2011-06-05 17:56:25 [SEVERE]     at de.moritzschmale.Showcase.ShowcaseMain.onEnable(ShowcaseMain.java:112)
    2011-06-05 17:56:25 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    2011-06-05 17:56:25 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
    2011-06-05 17:56:25 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    2011-06-05 17:56:25 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:134)
    2011-06-05 17:56:25 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:112)
    2011-06-05 17:56:25 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    2011-06-05 17:56:25 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    2011-06-05 17:56:25 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    2011-06-05 17:56:25 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    2011-06-05 17:56:25 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Its bukkit isnt it ? bukkit is not really ready for reco lol thats why we have to use dev versions to fix the thigns that a RECO should have.

    820
     
  9. I am still getting multiple reports of duping issues with this, even the latest version. It's difficult to reproduce this issue, but currently, I can only disable it, too easy to dupe entire diamond blocks :/
     
  10. can you made in conifugrable if we want a half step or the glass block as a Showcase or Shelf ?
     
  11. Offline

    geloum

    Another question, I tried uninstall the plugin and réinstall again to have clean databases, by deleting the folder and the jar in the plugin folder, but doesnt seems to work, I rebooted and everything is there again, where is the data located ?


    Thanks
     
  12. Offline

    narrowtux

    You've got to stop the server before you delete the files because Showcase saves when the server shuts down.
    Would be too much work because Glass isn't possible with 1.6 anymore. Sooner or later, everyone will have updated to 1.6, so the setting wouldn't make sense for them.
    This isn't a severe error, just a warning. The whole stack trace has been removed in an update earlier this day.

    I already thought of this, needs some extra work because the items will fall down if I remove the block below the half-block. When I drop an item on a free-standing half block manually, it won't fall down, though, so it is possible, but not without some changes i've got to figure out.
    You should only give sniper-rights to people who you trust ;)
    Aside from that, I can check if the block has been removed and respawn it then

    Notifications for offline players is somewhat huge, but not impossible. But a message every login would be like spamming for many players, but I can do it in a command, so the login message would only display that some items have been sold as you weren't online and you should type /showcase to see more details.
    Removing finite Showcase shops from other players who are offline doesn't work, because then the system is unable to give them the items back.
    I look if MinecartMania calls an event for that and if I can cancel this (it's already done in the same way with DropChest)

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

    NeonJ

    Would there be an option of taking the item away from you if you made a basic showcase?

    EG: Player has 4 diamonds.
    Player makes a diamond basic showcase.
    Player now has 3 diamonds.
    Player gets the showcase back.
    Player has 4 diamonds.

    Like that.
     
  14. Offline

    murdrums

    Is it possible to make the plugin be able to use three 'shelves' instead of having a block to support it, like this:

    http://i.imgur.com/DJO3C.png

    The far right is how the plugin works now, which is pretty ugly, as on my server, the market place gives each player a wall to sell things on, we used to use a chest market plugin (RealShop), but the developer has seemed to stop developing that, and this is the next best thing as sign markets don't appeal to anyone on my server, including me.

    In order to get the slabs to stay like that on the picture, you build from top to bottom, placing a block below, then removing it, the slabs can't be used without the block below it since you get 'This is not a safe place for this item, it will fall down', is there any way for it to be able to have three shelves?

    Thank you.

    EDIT: I posted this at the same time the post got answered above, hopefully it will be implemented in the future otherwise my server will have to resort to no market. :(
     
  15. Offline

    narrowtux

    Good news! I figured out how to do it :)
    I'm currently on fixing the bug where the Slabs would collapse when you place a step onto another which is already a showcase.

    Release v0.5.13
    • Showcases can now be stacked
    • Fixed a bug where a showcase would turn into a double step when you placed a step above it.
    • When the player is sneaking to build something (in this case, he would "fly" over an air-block), don't show the showcase creation assistant to him.
    View attachment 3824
    This is what stacked showcases could look like, you can now create nice shelves for your shop!

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

    powback

    epic! thank you! i looked forward to that stacking feature :D
     
  17. Offline

    geloum

    Thanks for your reply, however I have two questions now :

    - Being an admin should mean you have the power to remove users goods, isn't it possible to bypass this ? It's a very important thing I think ?

    - When shops (placed by regular players) run out of stock, the "showed" item stays on the slab, is it normal ? It's pretty anoying because I want the stab to be free when the selling is finished so it doesn't require user removal. (That's why I was asking you the first question)

    Thanks buddy
     
  18. Offline

    narrowtux

    You're correct with the first question, it should be possible to remove the items...
    The other thing has been done by request because I implemented a price for basic and finite showcases and the players didn't want to pay twice for a showcase when they have got to refill it.
    I can add that to the configuration, though ;)
     
  19. Offline

    geloum

    That would be sweet for both of your propositions, let me know if you add those features, this will free some time to all my admins :)

    Thanks mate
     
  20. Offline

    murdrums

    Weird, I have v0.5.13, and when I place a step above a showcase, it turns into a double step. Even though I do it like it is shown in your picture. You have any idea why this is?

    EDIT: Just checked I have version 0.5.12, where can I get 0.5.13? :s

    EDIT2: Got someone else to download me 0.5.13 and upload it to me on another hosting site, for some reason I kept getting 0.5.12, great work on 0.5.13, thank you!
     
  21. Offline

    Jutle

    It would be nice to be able to choose the currency. We're using gold ingot on my server.
     
  22. Offline

    narrowtux

    Good news!
    I'm currently recoding huge parts of showcase to make it more extensible. This will allow me and other devs to add new Showcase types very easily. The basics of the new API for the extensions are already done, now I'm working on implementing finite and infinite showcases again. After that, I will add the much requested exchange-showcase.

    For the devs amongst you:
    You have to implement 2 interfaces for each new showcase type:
    ShowcaseProvider handles loading and creating showcases. This class has to give the system instances of ShowcaseExtra for each showcase of the type you defined in the provider
    ShowcaseExtra handles what should happen when a player clicks on a showcase or he wants to remove it. It also returns a string to save some extra attributes.
    You can see the interfaces on github.
    To register a type, do Showcase.registerProvider(new YourProvider()); after Showcase has been enabled.

    I'm done with re-coding the Showcases, everything works. Because no new features have been added, I will release Showcase 0.6 when I finished implementing the Exchange Showcase!
    The exchange showcase will contain these attributes:
    The item that will be exchanged to get the item in the showcase
    The ratio (e.g. 2:1) for the exchange. Example: you set up a showcase where you can buy a diamond pickaxe for gold. You want to have 3 gold ingots for the diamond pickaxe, so you type in 1:3
    Also, the showcase will contain the exchanged items itself. The owner of the showcase will have to pick the items up manually.

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

    geloum

    Nicely done buddy, have you thinked of the two suggestions you made above ?
    Cya :)
     
  24. Offline

    narrowtux

    The first thing is implemented, thank you for reminding me for the second one ;)

    EDIT:
    Implemented the second one (of course configureable)
     
  25. Offline

    geloum

    Thanks for your fast replies ! I'll check out the new version when I get home.
    Have a nice day
     
  26. Offline

    narrowtux

    Release v0.6
    • Made the code much more extensible, other plugins can now add new showcase-types themselves
    • Added the exchange-showcase
    • New configuration value: removewhenempty (default off) when set to true, finite showcases will be removed when their amount is 0
    • New configuration value: priceforexchange sets the price a player has to pay when he creates an exchange showcase
     
  27. Offline

    murdrums

    Great work with the updates, but can I ask, what is an Exchange showcase? :eek:
     
  28. Offline

    narrowtux

    You can put items in there, just like with the infinite showcase, but the item in there won't be paid by dollars, but by items. So you can decide to sell a diamond block for 9 gold ingots or so.
     
  29. Offline

    murdrums

    Sounds good :D

    One annoying thing about creating a shop when people are talking is getting:

    "This is the chat held back for you:
    <%1$s> <%1$s>"
     
  30. Offline

    narrowtux

    Oh, sorry... fixing :)

    Release v0.6.1
    • Fixed held back chat

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  31. Hey, my other user got banned, anyways, it's me again !

    I did a small video presentation for my server and, well, your plugin is in it !
    So I thought I'share it with you :)

    http://www.megavideo.com/?v=YLXBYZKL
     
Thread Status:
Not open for further replies.

Share This Page