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

    cloownix

    I made a french traduction but it doesn't work. I tried to remove accents and ' but it only works with the english pack.
    when i put a sign with [barter] it does nothing when i use this traduction:

    (this is on .txt because i cannot share a .yml file)
     

    Attached Files:

    Last edited by a moderator: May 18, 2016
  3. Offline

    sleite

    I love that you can accept more than one type of payment. I also love that the setup is so simple. No commands. Just click and read the instructions on the sign.

    WELL DONE!

    One Request: I would really like to see Economy (Vault) support. I would like "cash" to be one of the available payment methods.

    Eg. Sell 1 gold ingot for 10 iron ingots, OR, 100.0 dollars.

    How it would work:

    When the sign prompts you to "click on the sign with the item in hand", you just click on it with an "emtpy" hand (air). This would invoke a message to "Please speak the amount". Then player would simply type in the chat the amount (eg. $100.50).

    Vault/Economy support could be totally optional. If the plug-in is detected, then use it, otherwise don't.

    Think about it!

    Regards,
     
  4. Offline

    Jeronimo654

    After a server restart i have to reload to get the signs working again. The signs are showing the main screen but doesn't react. please fix this
     
  5. Offline

    Ubermatik

    This is fantastic and very lightweight - aweosme job!

    However, would there be a way to a) add infinite stock as an admin b) have the sign display a set message to all other players, such as "ARROWS, 12, 5 Gold Bar" if I want to sell a stack of 12 arrows for 5 Gold Bars?
     
  6. Offline

    Jeronimo654

    Please make this plugin compatible with 1.3. It's just awesome ;)
     
  7. Offline

    dumptruckman

    If you can tell me how it isn't already then I will fix it. As far as I can tell it works fine.
     
  8. Offline

    Jeronimo654

    [quote uid=9066 name="dumptruckman" post=1257265]If you can tell me how it isn't already then I will fix it. As far as I can tell it works fine.[/quote]
    the German translation doesn't work.

    /edit:
    fixed it ;) <Edit by Moderator: Redacted mediafire url>

    Besucht meinen Minecraft-Server:
    Jeronimo654.minecraft.to
     
    Last edited by a moderator: Nov 13, 2016
  9. Offline

    Kurai Ookami

    so kinda odd situation, I'm my server's admin but wanted to disable my admin permissions for bartersigns, for ease of interaction with other shops. but every time I set the admin group permission to bartersigns.admin: false it also disables all other permissions (discovered via /permissions dump [my player name]) any idea if this is an error on my end or the plug-ins?
     
  10. Offline

    Jeronimo654

    Press Shift while clicking on a sign to buy from it.
     
  11. Offline

    Kurai Ookami

    yes I am already aware of that, I wanted to remove the ability for me to alter other players signs in-game while still being able to use them. AKA set myself to a standard user's permissions for this particular plug-in. But it seems that in setting the admin permissions to false it also somehow forces all other permissions to false as well, even when I again set them to true within the admin user group of my permissions file.
     
  12. Offline

    theguynextdoor

    Version: Latest (1.2.5-fix)
    Making the signs does work, but these spam the logs
    Stack-Trace:
    On start up:
    Code:
    2012-08-13 15:34:01 [INFO] [BarterSigns] Enabling BarterSigns v1.2.5-fix
    2012-08-13 15:34:01 [SEVERE] Error occurred while enabling BarterSigns v1.2.5-fix (Is it up to date?)
    java.lang.ArrayIndexOutOfBoundsException: 1
        at com.dumptruckman.bartersigns.sign.BarterSignManager.updateSigns(BarterSignManager.java:46)
        at com.dumptruckman.bartersigns.sign.BarterSignManager.<init>(BarterSignManager.java:32)
        at com.dumptruckman.bartersigns.BarterSignsPlugin.onEnable(BarterSignsPlugin.java:106)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:365)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:265)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:247)
        at net.minecraft.server.MinecraftServer.i(MinecraftServer.java:296)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:275)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:225)
        at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:140)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    punching signs:
    Code:
    2012-08-13 15:42:47 [SEVERE] Could not pass event BlockDamageEvent to BarterSigns
    org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:332)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDamageEvent(CraftEventFactory.java:213)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:163)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:546)
        at net.minecraft.server.Packet14BlockDig.handle(SourceFile:46)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:281)
        at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109)
        at net.minecraft.server.ServerConnection.b(SourceFile:35)
        at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30)
        at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:583)
        at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212)
        at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:476)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    Caused by: java.lang.NullPointerException
        at com.dumptruckman.bartersigns.sign.BarterSign.getMenuIndex(BarterSign.java:86)
        at com.dumptruckman.bartersigns.listener.BarterSignsBlockListener.onBlockDamage(BarterSignsBlockListener.java:138)
        at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:330)
        ... 16 more
     
  13. Offline

    Jeronimo654

    Code:
    2012-08-18 02:06:13 [SEVERE] Could not pass event BlockDamageEvent to BarterSigns
    org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:332)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDamageEvent(CraftEventFactory.java:213)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:163)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:546)
        at net.minecraft.server.Packet14BlockDig.handle(SourceFile:46)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:281)
        at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109)
        at net.minecraft.server.ServerConnection.b(SourceFile:35)
        at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30)
        at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:583)
        at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212)
        at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:476)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    Caused by: java.lang.NullPointerException
        at com.dumptruckman.bartersigns.sign.BarterSign.getMenuIndex(BarterSign.java:86)
        at com.dumptruckman.bartersigns.listener.BarterSignsBlockListener.onBlockDamage(BarterSignsBlockListener.java:138)
        at sun.reflect.GeneratedMethodAccessor145.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:330)
        ... 16 more
    got this error and my server crashed
     
  14. Offline

    Kurai Ookami

    so to answer my own question, I had to de-op myself because the defaults overrode any permissions I gave myself and just created an admin group with all the other capabilities of someone who is OP
     
  15. Offline

    samuelvisser

    This is the ONLY shop plugin I can find without ecconomy! great!
    I want this, just with items.
    But can you please update the plugin?
     
  16. Offline

    F1NCH3R

    Hi dumptruckman!

    There is a problem with this plugin, the signs we places 2 day ago aren't working anymore, but you can tell that the plugin didn't crush because when you try to place a block in front of it, you can't do this, just like it was when the sign worked. PLUS the new ones (placed 1 day ago) work just fine! can you help us, please?

    cheers, Fincher.
    (sorry for my english)


    server: minecraft.giga.de (german)
     
  17. Offline

    Jeronimo654

    I have to reload the server once after a fresh server start to get this Plugin properly working. May you fix this please :)
     
  18. Offline

    Kurai Ookami

    everything is still working fine for me as far as this plugin goes just a random way it functions that has caused some irritation on my server. when selling things that don't stack in inventory like Potions doors things of the like, the plugin doesn't check to see if a players inventory has enough room for the items. so for example a player has 6 empty slots in their inventory and want to buy 15 potions from a sign shop, instead of being denied because of lack of room. the full 15 is pulled from the sign and the buyer only gets 6. Leaving 9 to simply vanish from the world. Is this something that might be fixable?
     
  19. Offline

    Derek S

    I'd just like to reiterate what some of the others have said. This is the only plugin I can find that keeps economies simple and without established, mandatory forms of currency. It would be great if the bug involving destroyed inventory were to be fixed and if the data format were less volatile (doesn't backup properly without server shutdown and is atm, a rather large flat-file).

    That being said, this is a great plugin and my players really like it. We'd love to see it updated. Thanks for this, dumptruckman.

    Regards,

    wizardofire ~ admin of Ravenkraft ~ ravenkraft.fourz.org
     
  20. Offline

    My_Krågespisar

    Requesting an update to this amazing plugin!
     
  21. Offline

    mattyluggs

    This plugin needs updating the new items such as enchanted books, enchanted items & fireworks do not work!!
     

Share This Page