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

    ledhead900

    iChat and Factions

    Both alter the Preffix of a users name.

    What I don't understand is why the rest work fine.

    Side note:
    bukkitcontrib should just be added as standard to bukkit thats my opinion anyway. I thought it was only for client - Server related functions tho and I don't have it actually installed apart from what ever narrowtux has in his api thingo.
     
  3. Offline

    wassilij

    It would be nice if i could buy iConomy money with this Showcase shop ..
    the "item" that is flying could be bedrock, but if you buy it you get money .. and you can buy it only with items like diamonds or gold
     
  4. Offline

    narrowtux

    Hmm, I don't think that they are the reason for this, can you post your full plugin list as well as a screenshot of the error?

    On the side note:
    BukkitContrib was created because the bukkit team didn't want to accept Afforess pull requests for some more Inventory hooks.
    After that, he developed the idea with the client mod, and the upcoming features will be great!

    You actually mean sell?

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

    ledhead900

    I disagree I only will client mod require when Notch finally takes on somones good work of a decent client to server mod downloader and runs mods when joining server and downloads any required updates or mods.

    Until then client modding for server is dead to me im not dealing with hassle of supporting users trying to mod the client.

    I will send those requests in a sec just moving back to mcbans. oh you said bukkit contrib required right its installed so I guess im stuck with it for now but it does seem usefull I never really looked into it.

    Edit:
    Hmm apprently bukkit contrib offers a decline on ppl not installing the bukkitcontrib mod I may use this but only when more mods come outfor it that actually add new things to the game. *coug* someone go code better than wolves mod for MP use and bukkitcontrib*
     
  6. Offline

    wassilij

    Oh hehe .. yes i mean sell ^^
     
  7. Offline

    Black_Fox

    On our server we don't use any economy plugin, there is Showcase 0.7.2 and recommended build 1000, showcases set to infinite amount and zero price. We just want to use it to display stuff. This happens on left click from anybody:
    Code:
    18:53:16 [SEVERE] Could not pass event PLAYER_INTERACT to Showcase
    java.lang.NullPointerException
            at de.moritzschmale.Showcase.Types.BuyAssistant.<init>(BuyAssistant.java
    :56)
            at de.moritzschmale.Showcase.Types.InfiniteShowcaseExtra.onClick(Infinit
    eShowcaseExtra.java:23)
            at de.moritzschmale.Showcase.ShowcasePlayerListener.onPlayerInteract(Sho
    wcasePlayerListener.java:78)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.j
    ava:307)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:332)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:168)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:6
    3)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:458)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  8. Offline

    wassilij

    If you want only to show the item someone, use not infinite, use basic.
     
  9. Offline

    narrowtux

    I think they want to have an unlimited item-dispenser ;)
    Ok, I'll see what I can do about it, in the meantime, you could just install iConomy while denying all of your users the permission to use it.
     
  10. Offline

    Aramillio

    Exchange is missing its translation for setting up the exchange rate.
    i keep getting an error in game where instead of setting up the rate it says key for translation not found

    This makes it very hard to set up exchanges, could you possibly post how to set the rate so it can be used until its fixed in the plugin?
     
  11. Offline

    narrowtux

    Basically, type the rate like this: 1:1
    The left value decides how many items one should get for paying the right value.
    So if you want to sell 64 dirt for one cobblestone, type in 1:64
     
  12. Offline

    Aramillio

    reply ok so then exchange isnt working correctly. ill post my steps

    crouch, right-click holding cake
    type exchange
    type cobblestone
    type 1:1
    add 1 cake

    click completed showcase
    result: 0 cobblestone added to your inventory

    no cakes or cobble were added or removed


    NVM: i figured it out..... i cant use my own exchange booth.
     
  13. Offline

    narrowtux

    Correct :D
    This will change in the next release. You'll have to rightclick on that then.
    Just like with the Finite Shop Showcase.
     
  14. Offline

    Aramillio

    thats good :) i use mob arena and im setting up a safehouse and i want to be able to let players get cakes while using mobarena but i dont want them to pay for them and i dont want to just give it to them right away so im going to give them things to exchange for the cake.

    on that note, could you add an infinite exchange? that would be awesome :)
     
  15. Offline

    Haduke

    Is there a way you can make your plugin not use so much CPU power? I use your plugin and my CPU shoots to 100%. I take your plugin out again and my CPU drops to around 20%. :eek:
     
  16. Offline

    narrowtux

    How many showcases do you have got?
    It's quite expensive to check if the item someone wants to pickup is a showcase.
    The more showcases it has, the more CPU it uses, obviously.
     
  17. Offline

    SwedeMontages

    I downloaded the .jar below the "Download & Source Code" text.
    And I've got the latest recommended build.
    I tried to disable iChat.

    Step by Step error.

    I made a stone slab, pressed shift to sneak, held the item I wanted to showcase, right-clicked the block.
    And it says nothing. I tried with a wooden slab, still nothing. But when I held nothing in my hand and tried to right click, it stated in the chat that I wasn't holding anything anything.

    Here's my error log;

    Code:
    [SEVERE] Could not pass event PLAYER_INTERACT to Showcase
    java.lang.LinkageError: com/nijikokun/register/payment/Method
        at de.moritzschmale.Showcase.ShowcaseTypeSelectionPage.getPrice(ShowcaseTypeSelectionPage.java:82)
        at de.moritzschmale.Showcase.ShowcaseTypeSelectionPage.<init>(ShowcaseTypeSelectionPage.java:19)
        at de.moritzschmale.Showcase.ShowcaseCreationAssistant.<init>(ShowcaseCreationAssistant.java:25)
        at de.moritzschmale.Showcase.ShowcasePlayerListener.onPlayerInteract(ShowcasePlayerListener.java:51)
        at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:210)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:552)
        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:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  18. Offline

    Kalais

    1. Have you implemented a message for offline users who log back on to see what items were sold?
    2. Every now and then the item jumps off the showcase and stays on the ground for a few seconds. Normal?
    3. Is there way to prevent the bobbing of the item on the showcase and have it static? (I have hundreds of showcases in sixty-four different player shops.)
    4. My users only have access to the finite showcase. Can you implement a feature which automatically chooses a certain type of showcase by default instead of them having to type out "finite?"
     
  19. Offline

    narrowtux

    1. Yes, when they log in, a message with the number of unread notifications is displayed to them. When they type /nt, they can see them along with a number and when they type /nt [the-number], they see the actual message.
    2. Yep, that's because items despawn after 5 minutes and the plugin respawns them
    3. No, that's calculated by the Client itself, so it won't drain the servers performance so much
    4. That's possible.

    Seems I've got to update Register API...
    It'll be working 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
  20. Offline

    Raycrash

    well before adding two other plugins everything was okay ;D
    anyways after it's fixed we will try it again.
     
  21. Offline

    GmK

    We also have, as I have mentioned, an EXTREME cpu rise since any 0.7+ version. We have around 200 showcases, all over a 6000x6000 map. I cannot see my players' chat in console anymore almost due to the cant keep up messages - all only since 0.7+.

    I really wonder what happened with the addition of bukkitcontrib+narrowtux lib that made it so :(
     
  22. Offline

    Mathew Alden

    1.Re-add the half steps where they should go.
    2.Remove the showcase by crouching and right clicking.
    3.Remove the half step.

    Hi. Will this work without any other economy plug in? How will people get money to buy things? Does it give everyone a little money to start with?

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

    Bouger

    Hi, well, first of all I speak Spanish so I have to translate with google translator.

    My problem is that when I write finite or infinite in the chat says the following error: Showcase creation canceled.

    And I can not solve: l.

    Sorry for the language. I have to translate =P.
     
  24. Offline

    narrowtux

    Do you have any plugins that change chat color installed?
    @all I'll look into the performance issued today. Maybe @GmK can drop a full plugin list here so I can test this better.
     
  25. Do we really need to rely on BukkitContrib? This library is starting to appear in half the plugins, it is not part of Bukkit, it's GIGANTIC, and controlled by one person, instead of a Bukkit team.

    Further more, it's performance is dubious...
     
    GmK likes this.
  26. Offline

    GmK

    I really hope that the performance issue isnt caused by your plugin, as it was always running so perfectly. Maybe it is since 0.7 that people in areas with many showcases cause the issues?

    Plugin list:

    Code:
    [INFO] Plugins: CombatTag, CraftIRC, CraftBookCommon, WorldBorder, Jail, BigBrother, BukkitContrib, WeatherRestrictions
    , ShopAds, iConomy, AutoRepair, BlastControl, BankAccount, WordRank, WorldEdit, Turnstile, PvPTime, Clans, HeroBounty, MCDocs, Residence, MobBount
    y, NarrowtuxLib, CraftBookMechanisms, CraftBookCircuits, VoxelPort, LagMeter, PvPReward, SignColours, CommandBook, ButtonWarp, HeroSpaw
    n, MinequeryPlus, Permissions, AfkBooter, LoginQueue2, NoCheat, MinecartManiaCore, Stats, SpyerAdminCommands, WorldGuard, MyHome, MapMa
    rkers, MinecartManiaStation, MyWarp, SpamHammer, Votifier, Showcase, VoxelSniper, MinecartManiaChestControl, PetitionPlugin, SimpleReserve, HeroChat, HeroicR
    ebuke, PermissionsPlus, SpyerAdmin, MinecartManiaSignCommands, MinecartManiaAdminControls, LWC, p2Aliases, PreciousStones
    
     
  27. Offline

    Mr.Squeak

    seriously need to know if this works with double slabs, not keeping it if it doesn't
     
  28. Offline

    wassilij

    it dont work .. but on three halfstepts it works ..
     
  29. Offline

    Mr.Squeak

    The problem is i want a shop where people can look in and not see half a step but just a floating item...
     
  30. Offline

    ledhead900

    I frogot to send that stuff u wanted @narrrowtux will do it now.
     
  31. Offline

    19jojo93

    Is a selling functionality being worked on?

    My server has a mall full of infinite shops where people can buy items. But we would really like to sell too!

    We used to be able to sell items there too before our TradeCraft plugin stopped working, so we moved to ShowCase, and got to say, REALLY love it and I hope you continue updating it for a long time :)
     
Thread Status:
Not open for further replies.

Share This Page