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

    Mentioum

    please make save to disk time configurable - not hardwritten.
     
  3. Offline

    Twisted

    Any luck with the minecartmania dupe issue ?
     
  4. Offline

    QQCucumber

    @narrowtux Basic Mode is incredibly bugged at the moment.

    First of all, the config file gets messed up and there's a new line called disabled= that shouldn't be there:

    Code:
    priceforbasic=0.0
    removewhenempty=false
    priceforfinite=0.0
    showcaseprotection=true
    priceforexchange=0.0
    basicmode=false
    disabled=
    
    Second, while you can add a showcase in basic mode just fine, you can't remove it. Whenever you try to, it throws this error in the console:

    Code:
    2011-06-11 02:30:49 [SEVERE] Could not pass event PLAYER_INTERACT to Showcase
    java.lang.NullPointerException
    	at de.moritzschmale.Showcase.ShowcasePlayerListener.onPlayerInteract(ShowcasePlayerListener.java:51)
    	at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:299)
    	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:162)
    	at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:209)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:556)
    	at net.minecraft.server.Packet15Place.a(SourceFile:57)
    	at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
    	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)
     
  5. Offline

    narrowtux

    I chatted with Afforess, if there was an event for absorbing items (like DropChest has one), but he said that he removed this event because it would make Servers laggy.
    The "disabled"-line is a new feature (you can disable certain types with it).
    Thank you for reporting the remove-bug, I will fix that shortly.
     
  6. Testing new version for duping exploits again :)

    This error came by:
    Code:
    12:08:11 [SEVERE] Could not pass event PLAYER_INTERACT to Showcase
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
            at java.lang.String.substring(String.java:1958)
            at de.moritzschmale.Showcase.ShowcaseTypeSelectionPage.<init>(ShowcaseTypeSelectionPage.java:18)
            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)
    
     
  7. Offline

    narrowtux

    @Joy @QQCucumber
    Release v0.6.4
    • Fixed 2 Exceptions that could be caused when a Showcase was removed or when someone wanted to create a showcase when he hadn't permissions for each available showcases.
     
  8. Download URL erroring.
     
  9. Offline

    narrowtux

    Yeah, wait a sec, github is screwed at the moment, will upload it to my webspace

    New Download link
    Because github screws my uploads all the time, I've changed my host:
    http://tetragaming.com/narrowtux/plugins/Showcase.jar

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

    QQCucumber

    The bug is fixed, but one thing I notice is there really should be a message when you add a showcase with basic mode. There's only one when you remove.
     
  11. Offline

    narrowtux

    Okay, I'll do that ;)
     
  12. Offline

    an0x

    Also work without problems with [860]
     
  13. Offline

    narrowtux

    Thanks ;)
     
  14. Still on 0.6.4:

    Code:
    2011-06-11 15:12:39 [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)
    
    And now it's just spamming:

    16:30:03 [SEVERE] Could not pass event PLAYER_INTERACT to Showcase
    java.lang.NullPointerException
    16:30:04 [SEVERE] Could not pass event PLAYER_INTERACT to Showcase
    java.lang.NullPointerException
    16:30:05 [SEVERE] Could not pass event PLAYER_INTERACT to Showcase
    java.lang.NullPointerException
    16:30:05 [SEVERE] Could not pass event PLAYER_INTERACT to Showcase
    java.lang.NullPointerException

    btw. Could you please support Plugman? Thus implement onDisabled. If I do plugman disable Showcase, it just keeps spamming errors.

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

    narrowtux

    I'm sorry :D
    I implement onDisabled in every plugin. Don't know how plugman disables plugins, but with the standard bukkit-plugin manager everything is just fine.
     
  16. Offline

    PedroN041

    I HAVE A DIAMOND BUGGED! I HAVE ALREADY REMOVED THE SHOWCASE BUT IT IS STILL THERE! I REMOVED THE PLUGIN AND IT DESAPEARES, AND IF I PUT THE PLUGIN AGAIN IT APPEARS!! WHAT I HAVE TO DO?

    sorry, i was desesperate... I am using a host and i ca not delete everything, i can just remove the plugin. I am going to try another thing. Your plugin is very cool. :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 10, 2018
  17. Offline

    maetthew

    Is there any progress on the "Sell to shop" feature?
     
  18. Offline

    Kazaam

    Each time I reload the server (with the /rl command) Showcase freezes the reloading process during few seconds. Is there a way to prevent this? Thanks for your plugin :)
     
  19. Offline

    narrowtux

    Better not write in all-caps! D:
    Try to remove it once again, there could have been an error with it ;)
    Not yet.
    What is standing there when it freezes?
    How many showcases have you set up (how many lines has showcases.csv)?
     
  20. Offline

    Kazaam

    I have few showcase 3 or 4, just to test the plugin.
    Odd, I just setup a clean MC Server without plugin and it seems to be Ok, I don't understand. Thx for answering :)
     
  21. Well, afaik it calls onDisable. And yes, /reload works fine, but all plugins work fine with /reload, just some that don't let themselves be reloaded on their own by Plugman :S
     
  22. Offline

    narrowtux

    Sorry, I actually meant that you should try to remove the showcase once again, I didn't point that out correctly ;)
     
  23. Offline

    Snowy007

    Just a few questions i haven't been able to find the answer to in the main post. (there isn't really much info given about the exchange showcase)
    These things are possible with the finite showcases but not with the exchange showcases as far as i noticed. As the owner of the shop, i cannot see how much items are left in it. It just tells me 'added 0 of [item] to your inventory'. Is it possible to see the amount of items left in the exchange showcase?
    and secondly, if it is empty. Could i refill it? I wasn't able to do this either.
    and thirdly, there is an option te remove the finite showcase when there are 0 items left. This doesn't work for exchange showcases either.
    CB 860
    Showcase 0.6.4
     
  24. Offline

    Mentioum

    Are buy/sell chests coming? Ha ha The one which we dont have yet?
     
  25. Offline

    Logstone

    What has happend with the Glass showcases??
     
  26. Offline

    narrowtux

    Notch "fixed" them :D
     
  27. Offline

    Skyline969

    Sorry if this was asked before, but is there a way to set it up so only the creator of the showcase can add/remove items and other players cannot "buy" from the showcase? This would be an excellent way to get rid of my many food chests and arrow chests.

    EDIT: For what it's worth, I do not have iConomy set up on mine, so right now everything is just free to set up. Would setting the buy price of the item to 1 make it so nobody but me can take items?

    EDIT(2): A recommendation, do not show the cost to set up a showcase if it's $0. Just makes things look cleaner.

    Good work with this one. I'll be using it on my server for sure!
     
  28. Offline

    narrowtux

    You can set the price to something veeeery high (e.g. 21324341234 :D), so no-one will buy it.
    Your recommendation will come, too.
     
  29. Offline

    Skyline969

    Sounds good. I'll tell my users to set a price greater than 0 if they don't want someone else buying their items (since we have no forms of currency). Thanks again!
     
  30. Offline

    an0x

    lold hard its so easy but great xD
     
  31. Offline

    powback

    if only those damn items could stop jumping... damn...<
    once again, GREAT WORK!
     
Thread Status:
Not open for further replies.

Share This Page