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

    OutLawGam3r

    even without restarting the server, the items on the steps go away after a while
     
  3. Offline

    FireFreak111

    Would MySQL support be possible?
     
  4. Offline

    narrowtux

    Fixed in the next release.
    Some evil Client things that don't show items all the time.
    Sometimes the client doesn't get when the items are spawned, sometimes it doesn't get when they disappear (double items).
    That would require a heavy recoding of the whole loading algorithm.
    Why would you need MySQL?
     
  5. Offline

    Snowy007

    request:
    exchange showcases with infinite items. (sorry if it has already been requested)

    I have a survival world where it is impossible to find any cocoa beans, lapis lazuli and probably some other stuff. Right now the only thing i can do is fill up my entire inventory with lapis and put it all in an exchange showcase. Its a working solution for now but it has some downsides:
    1. As the owner i can't see when the showcase is empty to determine if i have to refill it. (already requested before)
    2. I really don't want to refill it each time it is empty again. With a full inventory of lapis lazuli it would still take a while before having to refill it but if i would use non-stackable items i'd have to refill it often.

    So obviously an infinite exchange showcase would be very usefull in my situation to give players access to resources otherwise not possible to acquire.
     
  6. Offline

    KuroSnow

    Love this plugin, but I found an interesting bug.

    If you have a few showcases next to each other, and you start to place items in a showcase (as in make a showcase), and then instead of finishing with that, you go and remove the showcase nearby, you don't get your items back.

    Edit: VERY weird bug. After respawning the items lost, I found my inventory was full when it had spaces still. So I clicked the empty space, and all my missing items appeared. =/
     
  7. Offline

    ledhead900

    Got some people tellingme this not working like ppl can create but they cant buy from other ppl's shops I dunno why but we on CB 888.
     
  8. Offline

    FireFreak111

    MySQL could store the data in a more editable way, and MySQL is often faster for alot of people.
     
  9. Offline

    quickclay

    Shops seem to revert back to the default world after each reload. How do you set it up for a specific world? (Shops in the sky realms all disabled after restart)
    Thanks!

    .csv is pretty dang editable.. just use excel.

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

    powback

    Could it be possible to make it use preasure-plates?
     
  11. Offline

    OutLawGam3r

    so do i just have to keep restocking the shelves or is there any fix?
     
  12. Offline

    jeffreylec

    Showcase works wonderfully, but I just thought I would post this for you.

    Code:
    2011-06-20 23:10:12 [SEVERE] Could not pass event PLAYER_INTERACT to Showcase
    java.lang.NullPointerException
        at de.moritzschmale.Showcase.ShowcaseTypeSelectionPage.<init>(ShowcaseTypeSelectionPage.java:20)
        at de.moritzschmale.Showcase.ShowcaseCreationAssistant.<init>(ShowcaseCreationAssistant.java:25)
        at de.moritzschmale.Showcase.ShowcasePlayerListener.onPlayerInteract(ShowcasePlayerListener.java:45)
        at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:306)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:166)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:212)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:550)
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  13. Offline

    narrowtux

    You can /reload and the items should reappear then.
    Fixed in next release.
     
  14. Offline

    Tikii

    Showcase Version 0.6.3
    Bukkit 860

    Problem with iConomy
    Showcase will not stop players that don't have enough money, instead it puts them in the minus
     
  15. Offline

    FireFreak111

    Well first of all you should update to 0.6.4
     
  16. Offline

    Tikii

    You mean 0.6.4 ?

    Yes i did it
    and
    No i didin't work
     
  17. Offline

    quickclay

    Hi I think maybe the showcases are unloading when the server restarts like you mentioned above, rather than it being a problem specific to the skylands like I had thought. What was the command to reload the showcases from the datafile? showcase reload? Thanks!
     
  18. Offline

    narrowtux

    you can't just reload showcases, but you can reload all plugins with /reload.
     
  19. Offline

    quickclay

    Ooh command request? showcase reload. :)
     
  20. Offline

    Oroboro

    I have the same problem with the items randomly disappearing. They all just disappear randomly on every restart and I check the files and its all blank, everyone's shop gets erased. Is there anyway to fix this? I've tried /reload and everything and nothing works, still all gone.
     
  21. Offline

    quickclay

    Here's the error at the exact moment the stores get erased during a restart. A temporary workaround is to backup the .csv file before a restart, then reapply any missing fields after the bootup.
    Show Spoiler

    2011-06-20 22:28:24 [INFO] Showcase version 0.6.4 is enabled!
    2011-06-20 22:28:24 [SEVERE] java.lang.NullPointerException
    2011-06-20 22:28:24 [SEVERE] at org.bukkit.Location.getBlock(Location.java:72)
    2011-06-20 22:28:24 [SEVERE] at de.moritzschmale.Showcase.ShowcaseItem.<init>(ShowcaseItem.java:30)
    2011-06-20 22:28:24 [SEVERE] at de.moritzschmale.Showcase.ShowcaseMain.load(ShowcaseMain.java:265)
    2011-06-20 22:28:24 [SEVERE] at de.moritzschmale.Showcase.ShowcaseMain.onEnable(ShowcaseMain.java:120)
    2011-06-20 22:28:24 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    2011-06-20 22:28:24 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:799)
    2011-06-20 22:28:24 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    2011-06-20 22:28:24 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:140)
    2011-06-20 22:28:24 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:118)
    2011-06-20 22:28:24 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    2011-06-20 22:28:24 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    2011-06-20 22:28:24 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    2011-06-20 22:28:24 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    2011-06-20 22:28:24 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-20 22:28:24 [INFO] [Showcase] registered type [basic] (13 items loaded)
    2011-06-20 22:28:24 [INFO] [Showcase] registered type [finite] (7 items loaded)
    2011-06-20 22:28:24 [INFO] [Showcase] registered type [infinite] (0 items loaded)
    2011-06-20 22:28:24 [INFO] [Showcase] registered type [exchange] (0 items loaded)
    2011-06-20 22:28:24 [INFO] [Showcase] Payment method found (iConomy version: 5)


    At this point the reason the stores are empty is because the .csv fails to load. I can tell because all of the data is still intact. THEN when you restart, it loads all currently existing shops MINUS any new ones, then recreates the .csv file with those shops only, omitting the new ones. They become forever lost after the reload. That's the best I can figure out what's going on. The real crux of the problem is that fail to load (NullPointerException) after a restart due to the error above. Thanks!
     
  22. Offline

    narrowtux

    Release 0.6.5
    • Fixed many NPEs
    • Loading from file when a block isn't available should work now
    • When a player hasn't got permission to use any of the showcases, the assistant is canceled.
     
    quickclay likes this.
  23. Offline

    Fedorya

    Hello,
    Im very interested to use your plug-in on my serv.
    But if i understand, actually the only way to save the Showcases, is to stop the serv with the Stop command right ?
    My serv is a public server hosted on a dedicated computer, running 24/24, with periodic data save, but we never use the stop command, so my question is, actually, there is other method to save the showcase ? I see you plan to add a Save every 10s, when did you plan to do that ? And 10s must be a little too much no ? Something like all 10-15Mn can be better no ? Plus don't hardcode it, maybe users can choose the time between 2 saves ?
    In other word, you plug-in is highly interesting, but the actual save systeme isn t very usefull, i mean, on a 24/24 open server, it didn t match, and i don't really want to restart my server every X hours just for one plug-in, and the players on my serv would not appreciate if they lost everything when my serv crash^^
    I want this plug-in, but can't use it ^^ Frustating :)

    Anyway, Good job for this plug-in !
    Sorry English not my native language so its not perfect ^^
     
  24. Offline

    narrowtux

    In my local version, I already added commands for saving, loading and reloading.
    I can't release it now, because I also done translation support and this isn't finished in the whole plugin.
    For now, you can also use /reload, that bukkit-build-in command reloads all plugins.
    And, I also added autosave in a configureable interval.
     
  25. Offline

    Fedorya

    Okay glad to hear it ^^
    Well i will be patient and wait for a proper save system ^^
     
  26. Offline

    JanTTuX

    i have problem, some times my BASIC showcases.... items dissapears from them why?
     
  27. Offline

    narrowtux

    does this also happen with the most recent version?
     
  28. Offline

    JanTTuX

  29. Offline

    narrowtux

    When do the items disappear, and do they come back after a restart?
     
  30. Offline

    christley

    this error showed up with the exchange. i couldnt get any items from it. had the right item, yet it said "added 0 'name of the item' to your inventory"

    Code:
    2011-06-21 13:55:20 [SEVERE] Could not pass event PLAYER_CHAT to Showcase
    java.lang.NullPointerException
        at de.moritzschmale.Showcase.Types.ExchangeTypePage.onPageInput(ExchangeTypePage.java:59)
        at com.narrowtux.Assistant.Assistant.onPlayerChat(Assistant.java:47)
        at de.moritzschmale.Showcase.ShowcasePlayerListener.onPlayerChat(ShowcasePlayerListener.java:91)
        at org.bukkit.plugin.java.JavaPluginLoader$6.execute(JavaPluginLoader.java:278)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:683)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:671)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  31. Offline

    narrowtux

    Did you type ok?
     
Thread Status:
Not open for further replies.

Share This Page