Inactive [ECON] BetterShop 2.0 - A 'Better' Server-wide Shop - Spout compatible :) [1240]

Discussion in 'Inactive/Unsupported Plugins' started by jascotty2, Jul 6, 2011.

  1. Offline

    jascotty2

    BetterShop - The "better" global command-based shop
    Version: 2.0
    Download: (static jar) BetterShop.jar
    download page with older versions


    BetterShop is now primarily on BukkitDev

    (you can still come this forum for some help, though)


    this plugin (original concept) was first made by jjfs85 here
    however, he stopped development (that i know of) once i started

    Features:
    plugin support
    for economy, currently dependent on one of:
    Permissions support

    Help support

    configurable
    Fully configurable colors and message text in config.yml file
    shoplist can have text alignment (read config for more info): <item> <l(eft-aligned)> <buy and sell info>
    - uses minecraft font character spacing, so is very close to perfectly aligned in chat
    shoplist can optionally not show listing tail (or head, but recommended to leave <page> of <pages>)
    Items can be colored in the new itemsdb.yml file
    also in itemsdb.yml: kits!
    - define your own kits that the shop can sell
    - three examples provided, edit and add to your liking
    Configurable Options:
    -max pagesize when printing shoplist
    -whether to broadcast all transactions publicly
    -name of the pricelist file/table
    -customsort: a custom sorting order, so you can have items at the top of the shop list
    -allowbuyillegal: if someone without BetterShop.admin.illegal can buy illegal items
    -whether maxstack should be honored
    -if used tools can be bought back
    -default color for items
    - and more!

    shop flexibility
    shopcheck will run a name comparison check, and return all matching items
    Item sub-type support for dye colors, cloth colors, etc: magentacloth = 35:2 = cloth:magenta
    "all" is a valid amount when buying or selling: "/sell cobblestone all" or "/sell all cobblestone"
    damaged tools can be resold for an adjusted value of sellprice*(1-(damage/maxdamage))
    buystack can be given multiple items, or number of stacks: "/buystack wool 5" or "/buystack wool blackdye reddye"
    shopsellall can be given multiple items (/sell all cobble gravel flint dirt)
    plural-insensitive items: if not found, will check if plural & remove "s"
    not just items can be bought anymore: can now buy LivingEntities, like dogs (wolf)
    signs can be used for buying & selling
    - first line: [BetterShop] (not case-sensitive)
    - second line: action: buy [amt], buyall, buystack, sell [amt], sellall, sellstack
    - third line: item (name, id, etc)
    - fourth line: unused (was going to make price, but decided on pricecheck instead)
    - to activate, someone with BetterShop.admin.makesign must left-click the sign.. the first line will change color when active
    - left-click for price check (or activate), right-click to buy/sell
    - if a unauthorized player destroys a block a sign is on, is canceled
    item categories
    - can search for items by category (in shoplist)
    players using Spout (if installed & enabled) can use a GUI Menu for buying & selling
    - default button is 'b'
    - displays items in shop in top half
    - item detail below with # in stock, buy/sell price, & buttons to buy & sell
    - amount to buy/sell can be set in text box or with up/down buttons

    administration
    Every item and subtype can be priced differently
    Disable buying or selling of an item by giving it a price of -1 (0 makes it free)
    command aliases to stop carpal tunnel
    many commands have sub-aliases.. eg. shoplist kits will run shoplistkits
    MySQL pricelist support
    MySQL pricelist can be cached for a given timespan (decreases table selects) (flatfile is cached until manually updated)
    Transaction records (MySQL or flatfile as .csv)
    Downloads mysql-bin.jar dependency automatically
    buy/sell cap in program set to 999,999,999 (not that you'd be using that much, but the cap is to prevent other errors)
    if encounters errors while editing a player's account, will attempt to reload iConomy (i've had issuses with it before)(may remove in a future update.. seems to work better now)
    can backup the current pricelist: /shop backup
    can restore from backup: /shop restore <file>
    can import new prices in a batch from a csv (or old yml format) : /shop import <file>
    on start, can check the download page to see if there is an update available
    shop can be given a finite stock from which to buy & sell
    /shop ver[sion] to check the current version & see if there's an update
    /shop update to manually download & install the most recent version
    MinecraftIM support: forward errors or all messages
    checks for missing & unused configuration nodes
    strings have default values if missing
    auto error reporting added (can be disabled)
    custom message you can send with the error report
    help main page integration can be disabled
    global shop can be disabled & only allow signs to be used
    can use permissions to define discounts for certain users
    - uses nodes in "BetterShop.discount.xxxx"​
    - nodes defined in config under discountGroups​
    - ex: discountGroups:​
    VIP: 10 # gives 10% discount to players with BetterShop.discount.VIP​

    Version 2.0 - 9/24/11
    near-complete rewrite
    - more modular, should be easier to add new features
    added region-based shop support
    - just main shop for now
    - config modes:
    - - shop.commandShop: global
    - - - regions are areas where command-based shop access is disabled
    - - shop.commandShop: regions
    - - - globally disabled, except for within regions
    - - shop.commandShop: both
    - - - allows command-based shop access from anywhere
    - - shop.commandShop: none
    - - - cannot use commands (or spout) to use the shop
    - regions are defined by first selecting a region in worldguard
    - - after regions have been defined, can put the WorldEdit.jar in the lib folder
    now checks from 2 mirrors (still on git)
    - not really needed, but the code behind it looks cleaner
    finally adopted some license to support open development.
    - now the source is licenced under the GNU General Public License
    - http://www.gnu.org/licenses/gpl.txt
    added pages menu option (default) so spout scrolling goes by page, not column
    added a fix for a spout button error
    fixed a spout error where may show amount stock can sell, not buy
    added category switching (spout)
    - can use 'cycle' for a button to cycle through the categories (shows more per-page)
    - or use 'tabbed' for buttons at the top that can be selected
    chest shop interface added :D
    - to define a chest, point at the chest & type "/shop chest define"
    - automatically detects double-chests
    - multiple users can use the same chest shop
    - - each user gets a customized chest screen
    - - items in the display show either max stack, or max of that item the user can afford
    - setting for "chestSellBar", which allows selling to a chest which is full (without buying anything)
    tnt explosion cancelation settings for sign/chest shop added
    - should be more efficient than prior method
    commandlog format moved in config & added more formatting options
    updated Register methods (fixes iCo6 errors)
    added a rudimentary spell check routine
    - if an item name doesn't match at first, and there is 1 match for closeness, returns that item
    sign shop handling rewrote
    - should be more efficient
    - can now define custom prices for transactions
    - - 4th line contains cost, doen't have to just be a number
    - - - "1.23", "$1.23", "1.23 Dollars", "$1.23 total" are all acceptable
    - - for a given amount, define the total cost
    - - if using "sellall" or "buyall", define unit cost
    categories have been implemented in buy & sell
    - can sell all items in a category, or buy an amount of each item in a category
    - ex. "/sellall food"
    sign & chest shops are protected from endermenv (if shop.(sign & chest)DestroyProtection = true)
    sql routines updated for foreign locales

    Full changelog can be found in the readme on git

    Support development!
    if you really like this & don't want to see it go by the wayside, [​IMG]
    (i make no money maintaining plugins)
    if you can't donate, at least a "like" would help ;)
     
  2. Offline

    laztheripper

    Would it be possible to have a quick update for 1.8.1 compatibilty? I'm down to my last options for a shop plugin considering all the others are limited in the way i can manage them... Anyways, yours looks perfect, hope you consider updating it. Regards,
    -LAZ
     
  3. Offline

    Rich Boos

    +1, with no errors in the console. not sure about client-side error logs (do they exist?)
     
  4. Offline

    Ruan

    Use the older version 1.6.7, it works perfectly on 1.8.1.
     
  5. Offline

    GMLXK01

    I have the same Problem. Is there a part in the congig i got overseen
     
  6. Offline

    laztheripper

    Okay I'm on 1185 and I'm running 1.6.7
    I'm having a major problem, I'm dumping stuff in my chest shop and it's supposed to give me money... Wich it does... Half the time!!! Let's just say selling diamonds through these chest shops is not viable at all but I like the fact that I don't need to type in the commands with ID numbers to sell, that makes selling much faster and convenient. My users are kinda picky and they don't like having to pull out a chart with all the id. Anyways I'll get to my point, could it be possible to have a quick look at this problem and maybe fix it? These shop plugins really are'nt reliable or simple and I have probably rewritten my shop prices for basically every one of them wich is a pretty time consuming thing. These chest shops are the best I've come across yet and I don't want to let this go just because it's a bit unreliable. Please look into it.

    Also, I've found that it usually stops working properly when I walk away then come back.

    Thanks in advance.
     
  7. Offline

    Eckhart

    I'd love an update to make this baby usable with 1185+ and iConomy 6.x - It's the only global shop with a Spout GUI!
     
  8. Whenever I press "B" my minecraft crashes. I have all plugins installed correctly. How do I fix this?
     
  9. Offline

    jascotty2

    sorry for the long wait..
    simple version of the story: i needed a break after finishing 2.0
    anyway:
    Version 2.0.1
    Important Update: fixed a buying bug that instead of purchasing items gives free money
    (sorry about that.. i thought i had everything tested.. apparently this was changed & i forgot to re-test)
    fixed compatibility with new spoutcraft
    - new bug caused crashes when attempting to display an empty icon
    - also caused positioning to change
    - there is a new annoying bug with the scrollbar:
    - - when using the arrow buttons, the prior position is selected, then updated on the next button press
     
  10. Offline

    Eckhart

    I hate to be the bringer of bad news, but...

    [​IMG]

    And with the Spout UI, as well...

    [​IMG]

    This is on 1.8.1, Bukkit 1240, iConomy 6.x. It appears to be having some difficulty in detecting player inventory status.
     
  11. Offline

    jascotty2

    what BetterShop version?
    this should be fixed in the latest version (i can't get it to occur, anyway..)


    however, i did find a new break in craftbukkit 1240 (which would throw errors)
    fixed in 2.0.2
     
  12. Offline

    Eckhart

    I was experiencing those errors with 2.0.1, but it looks like it's fixed in 2.0.2!

    It's likely a Spout thing, but just in case; the menu seems to scale oddly when the aspect ratio of the client is changed, causing item icons to overlap text and generally be positioned oddly. Button text gets stretched as well for the items and exit button, but not for the buy, sell, or quantity buttons. I'd also like to humbly request a +64 quantity button!

    [​IMG]

    Thanks for the update!
     
  13. Offline

    jascotty2

    yes, that's spout scaling up the icon width, but not the depth
    (not sure if there's a setting for that.. i'll look into that, just in case..)

    glad it's working for you now :)
     
  14. Offline

    dagath

    Hello!
    I'm running cb 1185 and bettershop 2.0.1 and bpermissons latest and iconomy 6 latest.

    Im getting the message "you cannot acccess the store from here" after trying to define a region for the shop.
    In config I set "region" instead of "global" and then define a region "market" in worldguard, then selected it (/rg sel market) then typed /shop region define shop . Tried many ways but I still end up getting the same message.
    I am a OP and by bperms an Owner with just "*" so everything should be OK.

    Any advice of what might be wrong?

    thank you!
    dag
     
  15. Offline

    jascotty2

    @dagath

    part of the region calculation is where you are standing, and if you defined a region in worldedit as the floor, you are above the floor & thus above the shop, not in it

    try re-defining the region, but either run "/expand vert" or "/expand 3 up"
     
  16. Offline

    Pomme72

    Hi,

    I can only sell my items on the GUI, I can't buy anything.

    The price of the buy is -1 and when I click on it I have this :

    [​IMG]

    Fix please :)
     
  17. Offline

    jascotty2

    1. should not be allowing you to buy when the price is -1
    - (should not do anything when you press the button... won't, as far as i've tested..)
    2. have you edited the plugin.yml?
    - the shop is designed to work with the set command nodes
    - (if you want translated comands, you can add to/edit the aliases)
     
  18. Offline

    Pomme72

    Hi here,

    I made a lil video for show you my bug, sorry to do that, but I did that because I'm not good in english, so here you'll understand my problem ^^

    here it is !



    TY :)
     
  19. Offline

    jascotty2

    there are many plugins written by devs who don't think of compatibility with other plugins
    spout button press events are passed to all plugins on a server, whether it's their button or not, and they need to check for that
    you seem to have a plugin installed that tries to run commands based on spout button presses..
    can't tell you more without knowing what plugins you have, but you should notify the other plugin dev
    (this is not a bettershop error)
     
  20. Offline

    Errored

    I'm working with Signs.

    I'm getting a "You tried to buy 65 too many.. you can only hold -1 Ice more" message.
    Second message I get is: "Failed to lookup the price"
    As shown here: http://i.imgur.com/k7CUg.png

    It is accompied by this console SEVERE message:
    Code:
    23:42:44 [SEVERE] [BetterShop] Invalid Price encountered: -15.625 for -1 Ice
    java.lang.Exception: Invalid Price encountered: -15.625 for -1 Ice
            at me.jascotty2.bettershop.commands.BuyCommands._buyItem(BuyCommands.jav
    a:527)
            at me.jascotty2.bettershop.commands.BuyCommands.buyItem(BuyCommands.java
    :504)
            at me.jascotty2.bettershop.commands.BuyCommands.buyItem(BuyCommands.java
    :405)
            at me.jascotty2.bettershop.signshop.BSSignShop.onPlayerInteract(BSSignSh
    op.java:117)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.j
    ava:314)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:168)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.j
    ava:259)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:592)
            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:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    
    I've tried:
    - Adding the item to the shop
    - Selling it instead, this works
    - Tried a different item, same problem
    - Restarted my server

    Few other things:
    - I'm not near spawn
    - I'm OP with "*" set for my permissions
    - Using iConomy6
    - Using 1185 CB
    - Using BetterShop 2.0.3, was a clean install with MySQL database connection
    - When BetterShop is loading I get a WARNING: [BetterShop] Invalid setting in shop.commandShop: global
    I don't know if the warning has anything to do with the error but it was worth adding in here.

    Thanks for any help!
     
  21. Offline

    jascotty2

    Version 2.0.4
    fixed tool selling sometimes throwing errors
    fixed sign custom price maximum calculations
    changed spout gui access to only game screen (not inventory, furnace, etc)
    removed erroneous error message about commandShop: global
    fixed "blue" signs showing up as a "light blue" color


    @Errored
    thanks for the detailed report.. someone else reported this error, but i couldn't figure out how to reproduce the problem with the info they provided
    as far as i can tell, this release should have that patched up :)
     
  22. Offline

    Errored

    Thank you, jascotty!

    The new version resolved my issue! Good day, sir!
     
  23. Offline

    Pomme72

    Hi.

    Please, help me.

    I know it's not your plugin who's doing it, but I need help of someone : I can't remove this nasty message of my chat, and I have nothing in the console !

    Please, If you have an idea... Tell me.

    Here are my plugins :

    [​IMG]
     
  24. Offline

    oceanor

    Hi, this plugin is very interesting.. can I suggest one thing?

    with this api, you can interact with citizens plugin, would be great if you can "open" the spout gui or use another buy/sell method when you right click an npc, like a real vendor.. thanks for your time :)
     
  25. Offline

    jascotty2

    SpoutEssentials (3.7.1) will cause errors with any other spout gui popup

    i'll look into it when i get some time to do more than bugfixing :)
     
  26. Offline

    Messaqefrom

    Hello.

    I would really like to use this plugin on a new spoutcraft server i am making but i cant stand how the pictures of the blocks get all screwed up when you change your minecraft resolution. i know you have said this is a problem with spout most likely so i was wondering if you could instead add an option that allows for you to remove the block pictures from the gui. currently there is an option for removing the text but i would much rather have just the text and no screwed up pictures of blocks. if you could make this option it would be greatly appreciated because this is exactly what i wanted for my server.
     
  27. Offline

    Sayshal

    2.0.4... Errors when type /buy 1 1

    Code:
    2011-10-07 19:12:45 [SEVERE] [BetterShop] Error executing a command
    java.lang.NullPointerException
        at me.jascotty2.lib.bukkit.inventory.ItemStackManip.amountCanHold(ItemStackManip.java:204)
        at me.jascotty2.bettershop.BSutils.amtCanHold(BSutils.java:260)
        at me.jascotty2.bettershop.shop.BSPriceList.getAmountCanBuy(BSPriceList.java:334)
        at me.jascotty2.bettershop.commands.BuyCommands.buyItem(BuyCommands.java:420)
        at me.jascotty2.bettershop.commands.BuyCommands.buyItem(BuyCommands.java:405)
        at me.jascotty2.bettershop.commands.BuyCommands.buy(BuyCommands.java:118)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at me.jascotty2.lib.bukkit.commands.CommandManager.executeMethod(CommandManager.java:363)
        at me.jascotty2.lib.bukkit.commands.CommandManager.execute(CommandManager.java:270)
        at me.jascotty2.bettershop.BetterShop.onCommand(BetterShop.java:252)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:358)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:500)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  28. Offline

    dagath

    Hello!

    Im getting the "you tried to buy 1 too many.." message with some of the items (some of the guys in previous posts had the same),
    except i dont get the error in console. I tried adding it manually through game commands and added admin illegal perms but still nothing. Weird is that, im getting the error both with normal items as-well as illegal items (Fire and Brown Mushroom for an example).

    otherwise it works really well!
    thank you!

    dag
     
  29. Offline

    EverSubtle

    Forgive my ignorance, but I receive the message: "You tried to buy 1 too many..." whenever I try to buy anything. I have added the items. Thanks.
     
  30. Offline

    dagath

    LOL For any1 who else got this message (without the console error) you migth have to expand your banking account :D Mine was empty therefore the error! Sorry for the spam.

    dag
     
  31. Offline

    superrawr

    Running iConomy 6.0.7b (latest stable release at this time) and BetterShop 2.0.4, and for some reason BetterShop is unable to recognize iConomy.

    I've read that iConomy 6 is supported, and I do have other plugins that are using iConomy which do work and are able to recognize it. Has this not been updated yet or something?
     

Share This Page