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

    Kostronor

    Well, that was my bug to, now it works ;) (ps, i'm having 766 :D)
     
  3. Offline

    moonjokes

    "Moonjokes bought 2 pork for totally 20 dollars" should be "Moonjokes bought 2 pork for a total of 20 dollars"
     
  4. Offline

    narrowtux

    Thank you ;)
     
  5. Offline

    xDice

    i cant put a showcase on doublesteps? why? he say: "This is not a safe place for your item. It will fall down."
     
  6. Offline

    moonjokes

    any item that says that cannot be used because the items fall through them.

    as in will not be in the glass.
     
  7. Thanks for the duping fix :)

    However, my users have already managed to find a new issue in 5mins it was enabled :(

    You can stuff items in glass blocks "owned" by other players, basically any glass works, protected or not. This means you can use this to Grief very easily, by stuff other people's glass with dirt, for example. The owner of the glass block can't remove the block afterwards.

    I suppose a limit to the number of Showcases would help, and perhaps being able to check who created a showcase.

    I'd also like a flag to disable the protection entirely, as we only have people build these on their protected land anyways.

    ===
    Edit:

    And another issue, you can use the finite shops to buy any item stacked, so it violates regular MC stacking rules. When buying 2 pickaxes from a finite shop, it should use 2 inventory slots.
     
  8. Offline

    narrowtux

    What kind of Protection plugin are you using? Maybe I can add support for it ;)
    The second thing already has been reported, I will fix that.
     
  9. We use WorldGuard regions. But I'd prefer the solution where glass blocks are not protected, or a flag to do so, simple and effective :p
     
  10. Offline

    MiHo

    I would prefere a broadcast "XYZ is a theef!" or something else, when breaking a glass block of a shop. :D
     
  11. You have misunderstood the issue <_<

    ===

    narrowtux, can you condense this console message (spam) please:

    18:20:59 [INFO] Restored item from unloaded chunk.
    18:20:59 [INFO] Checking for remaining items.
    18:20:59 [INFO] Restored item from unloaded chunk.
    18:20:59 [INFO] Checking for remaining items.
    18:20:59 [INFO] Restored item from unloaded chunk.
    18:20:59 [INFO] Checking for remaining items.
    18:20:59 [INFO] Restored item from unloaded chunk.
    18:20:59 [INFO] Checking for remaining items.
    18:20:59 [INFO] Restored item from unloaded chunk.
    18:20:59 [INFO] Checking for remaining items.
    18:20:59 [INFO] Restored item from unloaded chunk.
    18:20:59 [INFO] Checking for remaining items.
    18:20:59 [INFO] Restored item from unloaded chunk.
    18:20:59 [INFO] Checking for remaining items.
    18:20:59 [INFO] Restored item from unloaded chunk.
    18:20:59 [INFO] Checking for remaining items.
    18:20:59 [INFO] Restored item from unloaded chunk.
     
  12. Offline

    beatcomet

    is there any chance that you will add the auction function?
     
  13. Offline

    SulimirCular

    THX A LOT FOR UPDATING TO 0.4.2
    I realy like this shop plugin best ^ (also my players do)
    It would be great if u could sell things on glassblocks (only little idea from most of my players ^^)
    anyway.. greate job dude :D
     
  14. Offline

    MiHo

    Had the plugin on the server until now. It's a great idea, but I have to disable it, cause of serious lags produced after some time by the plugin.
     
  15. Offline

    narrowtux

    Release v0.5
    • Shop system looks if the items will fit into the players inventory. If not, it tries best to fill it and calculates only the price for the added items. (Correct item stacking is not implemented at the moment)
    • Configuration (auto-generated)
      • 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
      • showcaseprotection : turn this to false to be able to remove showcases from other players (griefers)
    • Some minor refinements
    • When a player walks away after he clicked on a shop, the checkout is also cancelled (he obviously doesn't want it)

    Spam removed in 0.5

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

    s1ck3st

    17 versions in two days!
    dude you're killing it! code-monster!

    aber im ernst: für's wochenende geb' ich dir frei :)
    saubere arbeit!

    have fun & enjoy!
     
  17. Offline

    CyrussM

    first User i give the permissions for this Plugin: he make a Showcase with a Glas over a Door. This drops the item , and drop and drop. Infinity Item rain, can you fix this?
     
  18. Offline

    narrowtux

    New "Logo":
    2011-05-19_20.10.50.png
     
  19. Offline

    Missnostalgia

    Hello Narrowtux, this is a great mod but do you have any idea why when I try to create a Basic it said Invalid answer aborting. I am typing it (basic) and I have no idea why it would do that, I am the admin of the server and I also put permission it.
     
  20. Offline

    CyrussM

    sry no, spams my console too, version 0.5
     
  21. Offline

    narrowtux

    That doesn't work because the item has to have something where it can lay. It can't lay on the door, obviously.

    What comes there?
    Should I make this text any bigger? :D
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  22. Offline

    CyrussM

    but he do it, and this works. Again and again, with all items.

    spam:
    2011-05-19 20:13:21 [INFO] Checking for remaining items.
    2011-05-19 20:13:21 [INFO] Restored item from unloaded chunk.
    2011-05-19 20:13:21 [INFO] Checking for remaining items.
    2011-05-19 20:13:21 [INFO] Restored item from unloaded chunk.
    2011-05-19 20:13:21 [INFO] Checking for remaining items.
     
  23. I think I can confirm this, need a bit more testing...anyone else?
     
  24. Offline

    MiHo

    Code:
    	@Override
    	public void onBlockBreak(BlockBreakEvent event){
    		for(ShowcaseItem item:ShowcaseMain.instance.showcasedItems){
    			if(event.getBlock().equals(item.getBlock())){
    				event.setCancelled(true);
    				event.getPlayer().sendMessage(ChatColor.RED+"This is a Showcase. You can't destroy it until you remove the item.");
    				return;
    			}
    			if(event.getBlock().getFace(BlockFace.UP).equals(item.getBlock())){
    				event.setCancelled(true);
    				event.getPlayer().sendMessage(ChatColor.RED+"This is below a Showcase. You can't destroy it, because the item would fall down otherwise.");
    				return;
    			}
    		}
    	}
    Waste of CPU. There would be much speed boost, if you check first if the "event.getBlock()" is a glass block! (Save iterarting through any list item!)
     
  25. Offline

    narrowtux

    Sorry, will remove that.
    The problem is that this plugin can't trick the minecraft physics, because items will fall down when they can. If I'd reset the position every tick, it would look extremely ugly...

    Yes, I already thought about that. Will fix all kinds of these loops.

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

    laztheripper

    Hello,
    I really enjoy this plugin since it's out and my players just love it as well because of the visual aspect of buying from shops now on my server and all so, much props for that.
    I have a couple details I would really like for you to check out, little glitches..
    -Sometimes items just don't show up in the showcases after relog and sometimes other players can't view other people's showcases, this may be caused by warping.. I'm not sure though.
    -One of my players just now walked by my showcase and the item somehow came out and he took it, only happened once.
    -I know you are already working on selling through these showcases but I just wanted to say that it's probably the most urgent thing you could add... This plugin will completely eclipse the other shop plugins available is you do and its much simpler that way.
    -maybe use another button instead of crouch to manage the showcases, some players build alongside cliffs with glass and they are annoyed by the assistant promps.
    I must say though, I am thoroughly impressed by this plugin keep it up!

    -LAZ
     
  27. Offline

    SulimirCular

    Version 0.5 doesnt seems to work...

    Code:
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:260)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:100)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:115)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:191)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:59)
    at java.util.jar.JarFile.(JarFile.java:114)
    at java.util.jar.JarFile.(JarFile.java:150)
    at java.util.zip.ZipFile.(ZipFile.java:131)
    at java.util.zip.ZipFile.open(Native Method)
    java.util.zip.ZipException: error in opening zip file
    > 20:32:18 [SEVERE] Could not load 'plugins/Showcase.jar' in folder 'plugins':
    could u fix it??
     
  28. Offline

    laztheripper

    Yes tux, this guy is right, one of my players did that on my server and the item falls out of it every time it "refreshes"
     
  29. Offline

    narrowtux

    Release v0.5.1
    • Improved performance
    • Finally removed all debug messages!

    I know that this is possible, but it's your thing if you do something like this. Creating Showcases on Doors will be prevented as of 0.5 (as it is already for air, glass, flowers, buttons, ...)

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

    laztheripper

    youz are fast! :D
     
  31. Offline

    narrowtux

    Redownload, maybe you just downloaded the file when I removed it and replaced it with the new one :D

    Ok, hmm.
    What plugins do you have installed?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 9, 2018
Thread Status:
Not open for further replies.

Share This Page