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

    christley

    @narrowtux
    yes i did. thats why i could get "added 0 bla bla bla"
     
  3. Offline

    Snowy007

    Are you trying to buy something from your own made exchange case? You can't buy your own items. :p
    Instead it will add the exchanged items to your inventory. (the items other players gave for the item in the showcase)
    If nothing has been exchanged yet it will indeed tell you 0 has been added to your inventory.
    don't know about the error though.
     
  4. Offline

    Maragil

    Hi, just installed this mod - is it possible to do buckets of milk?? Thanks,

    Maragil.
     
  5. Offline

    quickclay

    Yes, just like any other item. mbucket is the essentials item name. It's fun with the Mudder's Milk plugin.. ;)

    Awesome! Hope this clears up the shop disappearing issue!
    (May want to change thread title to reflect the new version)

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

    narrowtux

    Oh yeah, I almost forgot :D
     
  7. Offline

    quickclay

    Dang.. the startup NPE remains that's causing the shoploss issue.
    2011-06-21 06:42:43 [INFO] Showcase version 0.6.5 is enabled!
    2011-06-21 06:42:43 [SEVERE] java.lang.NullPointerException
    2011-06-21 06:42:43 [SEVERE] at org.bukkit.Location.getBlock(Location.java:72)
    2011-06-21 06:42:43 [SEVERE] at de.moritzschmale.Showcase.ShowcaseItem.<init>(ShowcaseItem.java:29)
    2011-06-21 06:42:43 [SEVERE] at de.moritzschmale.Showcase.ShowcaseMain.load(ShowcaseMain.java:265)
    2011-06-21 06:42:43 [SEVERE] at de.moritzschmale.Showcase.ShowcaseMain.onEnable(ShowcaseMain.java:120)
    2011-06-21 06:42:43 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    2011-06-21 06:42:43 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:799)
    2011-06-21 06:42:43 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    2011-06-21 06:42:43 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:140)
    2011-06-21 06:42:43 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:118)
    2011-06-21 06:42:43 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    2011-06-21 06:42:43 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    2011-06-21 06:42:43 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    2011-06-21 06:42:43 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    2011-06-21 06:42:43 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-21 06:42:43 [INFO] [Showcase] registered type [basic] (13 items loaded)
    2011-06-21 06:42:43 [INFO] [Showcase] registered type [finite] (7 items loaded)
    2011-06-21 06:42:43 [INFO] [Showcase] registered type [infinite] (0 items loaded)
    2011-06-21 06:42:43 [INFO] [Showcase] registered type [exchange] (0 items loaded)
    2011-06-21 06:42:43 [INFO] [Showcase] Payment method found (iConomy version: 5)
     
  8. Offline

    narrowtux

    Ooops, I'm sorry.
    Will be fixed next release (which is nearly done)
     
    quickclay likes this.
  9. Offline

    quickclay

    Have been trying to isolate it further for you, but it sounds like you've got it dialed in.
    :)
     
  10. Offline

    narrowtux

    The stack traces are just perfect for this. I can see which functions were called and in which line. So I can see the error in the source.

    Release v0.6.6
    • Localisation support. Includes translations for english and german
    • Fixed another few NPEs
    • Added /showcase [save|load|reload] command
    • Added autosave with configureable interval
    I'm happy when you contribute new or enhanced translations. When you post some here, they will be included in the next release.

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

    Ailenpangwin

    when i type for example /help infinite, it goes to some random help page. i think its conflicting with another plugin which uses /help [pg#]. anyways, any fixes for that? im on build 860.
     
  12. Offline

    narrowtux

    And I added some things to the OP.

    Don't use a slash!! Just type help infinite, for example

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

    JanTTuX

    sometimes they came back but other items are gone.
     
  14. Offline

    narrowtux

    Release v0.6.7
    • Hotfix for translations: On every reload, the translation file has been copied to disk, even if there already has been a (probably modified) translation file.
     
  15. Offline

    Jan Tojnar

  16. Offline

    narrowtux

  17. Offline

    Ailenpangwin

    whenever i do that, it just pops up with the same thing that lead me to the command originally. do i need to put the item on it or something before / after? thanks :)
     
  18. Offline

    narrowtux

    the description that appears isn't that prominent. At the moment, it just shows you a very short description.
     
  19. Offline

    OutLawGam3r

    the commands aren't workin for me =/
     
  20. Offline

    Sporling19

    installed yet, feedback will follow =)
     
  21. Offline

    quickclay

    So close.. the ability to save to the file and autosave feature is great... however, now after a restart, instead of the single NPE, I am getting 1000s of the following error:
    Show Spoiler

    2011-06-21 23:09:31 [INFO] [Showcase] Registered type [basic] (4 items loaded)
    2011-06-21 23:09:31 [INFO] [Showcase] Registered type [finite] (0 items loaded)
    2011-06-21 23:09:31 [INFO] [Showcase] Registered type [infinite] (0 items loaded)
    2011-06-21 23:09:31 [INFO] [Showcase] Registered type [exchange] (0 items loaded)
    2011-06-21 23:09:31 [INFO] [Showcase] version 0.6.7 has been enabled.
    2011-06-21 23:09:31 [INFO] [Showcase] Payment method found (iConomy version: 5)
    2011-06-21 23:09:31 [SEVERE] Could not pass event CHUNK_LOAD to Showcase
    java.lang.NullPointerException
    at org.bukkit.Location.getBlock(Location.java:72)
    at de.moritzschmale.Showcase.ShowcaseItem.getBlock(ShowcaseItem.java:130)
    at de.moritzschmale.Showcase.ShowcaseWorldListener.onChunkLoad(ShowcaseWorldListener.java:11)
    at org.bukkit.plugin.java.JavaPluginLoader$41.execute(JavaPluginLoader.java:526)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:89)
    at org.bukkit.craftbukkit.CraftWorld.getChunkAt(CraftWorld.java:94)
    at org.bukkit.craftbukkit.CraftWorld.getBlockAt(CraftWorld.java:62)
    at net.TheDgtl.Stargate.Blox.getBlock(Blox.java:75)
    at net.TheDgtl.Stargate.Portal.loadAllGates(Portal.java:899)
    at net.TheDgtl.Stargate.Stargate.reloadGates(Stargate.java:216)
    at net.TheDgtl.Stargate.Stargate.onEnable(Stargate.java:123)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:799)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:140)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:118)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-21 23:09:31 [SEVERE] Could not pass event CHUNK_LOAD to Showcase
    java.lang.NullPointerException
    at org.bukkit.Location.getBlock(Location.java:72)
    at de.moritzschmale.Showcase.ShowcaseItem.getBlock(ShowcaseItem.java:130)
    at de.moritzschmale.Showcase.ShowcaseWorldListener.onChunkLoad(ShowcaseWorldListener.java:11)
    at org.bukkit.plugin.java.JavaPluginLoader$41.execute(JavaPluginLoader.java:526)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:89)
    at org.bukkit.craftbukkit.CraftWorld.getChunkAt(CraftWorld.java:94)
    at org.bukkit.craftbukkit.CraftWorld.getBlockAt(CraftWorld.java:62)
    at net.TheDgtl.Stargate.Blox.setType(Blox.java:59)
    at net.TheDgtl.Stargate.Portal.close(Portal.java:170)
    at net.TheDgtl.Stargate.Portal.loadAllGates(Portal.java:925)
    at net.TheDgtl.Stargate.Stargate.reloadGates(Stargate.java:216)
    at net.TheDgtl.Stargate.Stargate.onEnable(Stargate.java:123)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:799)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:140)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:118)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    ...1000x


    This empties the contents of the .csv file. It then loads normally after the next restart (with a blank file). Looks like there's some stuff from a Stargate plugin in there, as well as some Falsebook conflicts later on too, though that might just be due to the crash.

    PS: The /showcase load command works fine.

    PPS: Remember 0.6.7 in the thread title. ;)
     
  22. Offline

    IncendiaDrakon

    I'm getting a similar if not the same error. This plugin may have caused my server to crash not too long ago.

    I'm using version 0.6.7 with CB 860.
     
  23. Offline

    narrowtux

    Release v0.7.8
    • Fix for NPE in WorldListener (Bukkit, what have you done?)
    • Added czech translation by @Jan Tojnar (set locale=cz)
     
  24. Two requests:
    - Please do not show the Showcase creation message block, when the person placing the slabs, does not even have permission to create any.
    - Only show the showcases in the msg, that the player placing the slab, has permission for.

    Well, related requests as you can see :p

    ===

    I think you mean 0.6.8 :p
     
  25. Offline

    narrowtux

    Rather one request :D
    Will do it soon.
     
  26. Bug:

    One of our players was able to create a Showcase with a Cost, without having enough coin, and ended up at negative currency.
     
  27. Offline

    narrowtux

    Ooops, I'll fix that shortly.

    Release v0.6.9
    • Added check if a player can afford a showcase.

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

    Maragil

    So I need to install Essentials? Sorry, rather confuzzled :/
     
  29. Offline

    narrowtux

    Nope. I don't use Essentials library for item names, because it's so confusing. I use the standard bukkit names (although this isn't so easy to type in, I think I'll use OddItem later). for a milk bucket, type milk_bucket.
     
  30. Offline

    Sphax

    If I understand well, there is 4 kind of showcases:
    - basic (just to show item)
    - finite (to buy with $$$ from a stock)
    - exchange (to buy with other items from a stock)
    - infinite (to buy with $$$ from a stock)

    How can I disable one or more of those showcases (without permissions please)?
    I see a line in showcase.cfg "disable=" but I don't know what I can enter in it...

    Thanks you for your help (and your great work!). :)
     
  31. Offline

    quickclay

    YES! :D

    2011-06-22 06:39:33 [INFO] [Showcase] copied new translation file for en-US to disk.
    2011-06-22 06:39:33 [INFO] [Showcase] Registered type [basic] (1 items loaded)
    2011-06-22 06:39:33 [INFO] [Showcase] Registered type [finite] (0 items loaded)
    2011-06-22 06:39:33 [INFO] [Showcase] Registered type [infinite] (0 items loaded)
    2011-06-22 06:39:33 [INFO] [Showcase] Registered type [exchange] (0 items loaded)
    2011-06-22 06:39:33 [INFO] [Showcase] version 0.6.9 has been enabled.
    2011-06-22 06:39:33 [INFO] [Showcase] Payment method found (iConomy version: 5)

    This looks promising!!
     
Thread Status:
Not open for further replies.

Share This Page