Inactive [ECON] BarterSigns v1.2.5-fix - Player owned sign shops that trade in items [1.2.5-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by dumptruckman, Jul 31, 2011.

  1. Offline

    dumptruckman

    BarterSigns
    v .1.2.5-fix

    Create sign based bartering shops. Each sign can sell one type of item and collect many different types of items for payment. Signs are simple to setup and very self explanatory.THIS PLUGIN DOES NOT USE ANY ECONOMY PLUGINS! I may support them in the future though.

    Features:
    • Player owned sign shops that deal in items.
    • Sell a specific amount of 1 item for a specific amount of multiple items.
    • Intuitive, command-less sign interface. (ActionMenu API)
    • Signs can be indestructible.
    • Signs can drop items upon breaking.
    • Optional permission use.
    • Option to have BarterSigns override other sign plugins.
    • Signs can have a max stock limit in either total item count or total stack count.
    • NO reliance on ANY economy plugin.
    Attention: Version 1.1 will break your old data files.

    Unfortunately I made a mistake in my choice of yaml key names, I have converted items to be ItemID,ItemDurability instead of ItemID:ItemDurability. You can manually update your data stores, if you know how.

    This plugin uses Superperms and has a simple 3 permissions:
    Permission Nodes (open)

    • bartersigns.admin - grants sign owner menu privilege on every Barter Sign. Includes the following two permissions.
    • bartersigns.create - allows user to create Barter Signs.
    • bartersigns.use - allows user to use Barter Signs.


    If you do not wish to use permissions, they are disable-able in the config.yml.

    Download
    download plugin

    German language file by @MrPikPik and xGhOsTkiLLeRx
    source code

    Instructions
    1. Install the plugin like any other.
    2. Create a sign with the first line reading: [barter]
    3. The plugin will guide you in further usage.
    If you have trouble understanding what to do from the in game prompting, please share your issues. My goal is to make this plugin explain it self.


    The configuration file in 1.2 is now commented for your convinience!

    This plugin uses my ActionMenu API to create the sign owner menus. This API has allowed me to create a menu on signs where I chose right-click to scroll through the menu and left-click to activate the menu selection. When the API is released it will be extended to work with Bukkit's Map API and Spoutcraft's GUI API.

    Changelog

    Version 1.2.5-fix
    • Fixed for use on 1.1-R5+ (That means 1.2.5-R1.0!)
    • Resolved an error caused by removing worlds that had signs.

    Version 1.2.5
    • Added new items (from 1.0.0) to the signs.
    Version 1.2.4
    • Fixed compatibility with Towny.
    • Fixed NPE when breaking signs still in the setup phase.
    Version 1.2.3
    • Added new version of usage statistics so that Bukkit version stats are also sent.
    Version 1.2.2
    • Added usage statistics.
    Version 1.2.1

    • Added support for Towny's shop plots.
    • Fixed some NPEs related to the new override config option.
    Version 1.2

    • Fixed some sign text that was too long due to color codes.
    • Added a commented config.
    • Fixed some over looked item name length issues. (And suphlur (sp) is now Gunpowder). This change requires you to delete your old item.yml.
    • Added a new option to enforce max stack sizes.
      • This causes any items sold to be split into multiple stacks if the amount is greater than that item's max stack size. No more stacks of 64 soup!
      • This also causes the sign stock limit to be a number of item stacks instead of total item amount.
    • Added a revenue stack count to the revenue menu item.
    • Added a config option to override other sign plugins when operating a BarterSigns sign.
    • Changed the default use/create permissions to true for when using permissions.
     
  2. Offline

    Warby579

    I'm Running:

    AdminCmd
    AnnouncementTNT
    BarterSigns (obviously)
    BlockHat
    creaturebox
    EfficiencyExpert
    Fruitful
    IceBreakerBoats
    LazyRoad
    Lockette
    MagicCarpet
    MidiBanks
    MobDisguise
    MuddersMilk
    multiworld
    namespace
    NSCommand
    NSCompass
    PetCreeper
    Safe Creeper
    Seats
    SimpleSignEdit
    SleepNotify
    SpongeRestore
    teslacoil
    TntSweep
    TrainCarts
    Volcano
    Warpz0r
    WorldEdit

    Of these, BarterSigns, Lockette, Midibanks, SimpleSignEdit and teslacoil are sign based.

    Thanks for taking the time to help by the way :)
     
  3. Offline

    dumptruckman

    @Warby579
    Just released 1.2. In it I added a configuration option to override other sign plugins when the sign in question is a BarterSigns sign. It's on by default. Let me know if this does the trick!
     
  4. Offline

    PurePandemonium

    Bartering works great. I was looking for something just like this for my server! I only have one problem- I can't seem to destroy signs! I'm the sign owner and op, but when I switch to "You may destroy this sign right now" and hit it, the text disappears, but the sign remains.
    Left clickgin If I break the block it's hanging on, I get the following error:
    Code:
    19:51:31 [SEVERE] Could not pass event PLAYER_INTERACT to BarterSigns
    java.lang.NullPointerException
        at com.dumptruckman.bartersigns.listener.BarterSignsPlayerListener.onPlayerInteract(BarterSignsPlayerListener.java:32)
        at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:314)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:139)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:824)
        at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:36)
        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'm running CraftBukkit 1185 and BarterSigns is the only mod.
     
  5. Offline

    Quezax

    I get that error on the console even when not trying to break a sign. same 1185 and 1.2
     
  6. Offline

    dumptruckman

    The issue was actually unrelated to the signs themselves and was being caused by NOT clicking a sign but (probably) clicking air or some other block. Regardless, the new override config option was preventing signs from being broken and causing some other errors. All this should be fixed up in the new 1.2.1 version I just released. :)
     
  7. Offline

    Zynthist

    Hi i am having a bit of trouble understanding the sign system for my server members and me can you change it to so when you put down the sign you put it in front of a chest (FILL THE CHEST WITH THE ITEM YOU WANT TO SELL/BUY) then on the sign you put

    [barter]
    <item to sell>
    for
    <item to buy>
    then the sign attach to front of chest, and when you right click the sign you trade the objects.

    IF YOU COULD DO THIS FOR ME I WILL HUG YOU FOR 100000000 DAYS
     
  8. Offline

    dumptruckman

  9. Offline

    MikeA

    I cannot destroy signs from anyone or myself as OP, with admin permissions for it. Kind of sucks eh. It's a nice plugin, just what my 'vanilla' server needs, so I'd really appreciate a fix.
     
  10. Offline

    dumptruckman

    Are you using version 1.2? If so, upgrade to 1.2.3. There was a bug in 1.2 that caused signs to be indestructible.
    When you go to destroy them, did you select the correct menu option? You have to select the one that says "You may destroy the sign now."
    There is an option in the config that makes them not indestructible. You could disable that but I don't recommend it.
     
  11. Offline

    Warby579

    Yes, it now works fine! Thanks for making such a great plugin :)
     
  12. Offline

    dumptruckman

    Thanks! My pleasure. :)
     
  13. Offline

    MikeA

    Would it be possible to make the barter signs work in WorldGuard protected regions? Players cannot use the barter signs to trade inside of my WorldGuard region spawn protection...
     
  14. Offline

    dumptruckman

    Are you using the latest version?
     
  15. Offline

    MikeA

    Yes, I am - I redownloaded it also to test if there was any difference.
     
  16. Offline

    dumptruckman

    Hmm... A few things: When you say "use them to trade" do you mean they can't place them? Do you mean they're already there (perhaps because you set them up) and they simply can't use them? If you have the latest version, there is a config option that talks about overriding other plugins, if that is set to true, then they should at least be able to buy/sell from existing ones.
     
  17. Offline

    MikeA

    I placed the signs, they can't trade using the sign I placed in the region.
     
  18. Offline

    dumptruckman

    Just to make sure you added the item to sell to the sign correct?

    What permission plugin are you using?
     
  19. Offline

    Strahan

    I get this error:

    Code:
    16:49:37 [SEVERE] Error occurred while enabling BarterSigns v1.2.3 (Is it up to date?): special characters are not allow
    ed
    unacceptable character #0 special characters are not allowed
    in "<reader>", position 0
            at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:68)
            at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:159)
            at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:117)
            at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:106)
            at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.java:964)
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:237)
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
            at org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produce(ParserImpl.java:200)
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:104)
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
            at org.bukkit.util.config.Configuration.load(Configuration.java:82)
            at com.dumptruckman.bartersigns.config.ConfigIO.load(ConfigIO.java:35)
            at com.dumptruckman.bartersigns.BarterSignsPlugin.reload(BarterSignsPlugin.java:128)
            at com.dumptruckman.bartersigns.BarterSignsPlugin.onEnable(BarterSignsPlugin.java:57)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:920)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:173)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:156)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    
    What should I do to fix it? I looked in the data.yml figuring it may hold whatever is the invalid character, but it has nothing. ??
     
  20. Offline

    dumptruckman

    Did you try editing your data.yml file? If so, you must've done something wrong in it. In any case, if it's blank now, delete it and restart the server. Should load fine.
     
  21. Offline

    Strahan

    Nope, didn't touch it. OK, I'll try that. Was hoping to be able to salvage the signs, cuz my users are gonna cry about the lost stock, but ah well lol. Thanks!
     
  22. Offline

    hahito

    I have found a problem.
    If a player wants to buy something, but the inventory is full, the cash disappears and he gets nothing. I'm using the latest version.

    hahito
     
  23. Offline

    WimFris

    Whoa, I really like the plugin!
    And I'm glad it works with UltraItems :)
    Thank you.
     
  24. Offline

    Camyo

    A suggestion, that would make me be your lover.

    Add an admin command to the second line of creating the [barter] sign, like .... [admin], which makes the stock infinite. Also, make the items traded in disappear, or whatever.
    On my map, I have a main spawn type area where I want a shop that players can exchange their items in for upgrades. 10 gold = 1 diamond, etc. I just don't want to sit there right clicking for an hour to get the stock up to where I won't need to... Yeah, you see where I'm going.
    Make a config to make it have an infinite stock, another perms for it if you want, etc. etc.

    Thanks! ~Camyo
     
  25. Offline

    Ticksy

    Code:
    2011-10-23 11:11:45 [SEVERE] Error occurred while enabling BarterSigns v1.2.3 (Is it up to date?): null
    java.lang.NullPointerException
        at com.dumptruckman.bartersigns.sign.BarterSignManager.updateSigns(BarterSignManager.java:41)
        at com.dumptruckman.bartersigns.sign.BarterSignManager.<init>(BarterSignManager.java:29)
        at com.dumptruckman.bartersigns.BarterSignsPlugin.onEnable(BarterSignsPlugin.java:112)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:920)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:173)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:156)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Why? I use plugin v1.2.3, CraftBukkit 1185.
     
  26. Offline

    AlmightyESH

    Thank you so much this is exactly what i need for the nooby people on my server THANK YOU it explains it perfect :D
     
  27. Offline

    Deathfromace

    Seems no one is posting on here. Just wanted to say thank you for the plugin and hope to see more updates on it.
     
  28. Offline

    piranhamonkey

    Is this working with 1.8.1?
     
  29. Offline

    ShootToMaim

    QUESTIONS:
    1. How do you barter the items after making the sign :-/
    2. Will this work with large chests?
    3. Does this support PermissionsEx?
    4. Can you make this iConomy compatible?
     
  30. Offline

    _ROM_

    I am reviewing this plugin. I would like to add it to my server. Before I do I want to know if this plugin is still being supported and/or developed further. Is it?
     
  31. Offline

    TheLucky7even

    PLEASE, PLEASE, PLEASE, PLEASE MAKE THIS COMPATIBLE FOR BUILD: #1476 A.K.A [ MC: 1.0.0 ] !!! PLEASE MAKE THIS COMPATIBLE WITH MINECRAFT 1.0.0!

    WHENEVER "RIGHT-CLICK" ON THE SIGN TO CHANGE STOCK/PAYMENT/E.T.C.,, THE SIGN GOES **BLANK** AND COMLETELY DISAPPEARS!! HELP! UPDATE IT PLZ! I LOVE THIS PLUGIN! I NEED IT TO WORK!
     
    Ticksy likes this.

Share This Page