[ECON] TradeCraft-AE v1.1b - Chest/Gold Based Economy [Permissions] [1337] [BukkitDev]

Discussion in 'Inactive/Unsupported Plugins' started by ArmEagle, Apr 21, 2011.

  1. Offline

    ArmEagle

    Jdwede, Montag, Tonysp and 2 others like this.
  2. Offline

    ArmEagle

    The server tells me I'm not whitelisted. Any chance you forgot to write a large 'E' in my name?
     
  3. Offline

    Haduke

    Let me check

    I just double checked and restarted the server. Try again and hopefully it will work this time.

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

    ArmEagle

    Updated to 1.0.1 with some small changes.
    Changelog:
    version 1.0.1
    • Fixed: No message is shown when a customer places too few currency/items in the chest and right-clicks. Had wrong parameter order and it threw an exception.
    • Allow setting of currency by name (case sensitive), as defined in TradeCraft.txt.
     
  5. Getting this errors with #733, and also with #740 when clicked a sign
    Code:
    15:21:02 [SCHWERWIEGEND] Could not pass event PLAYER_INTERACT to TradeCraft
    java.lang.NullPointerException
            at nl.armeagle.TradeCraft.TradeCraftPermissions.canBuy(TradeCraftPermissions.java:32)
            at nl.armeagle.TradeCraft.TradeCraftItemShop.handlePatronClick(TradeCraftItemShop.java:93)
            at nl.armeagle.TradeCraft.TradeCraftItemShop.handleRightClick(TradeCraftItemShop.java:17)
            at nl.armeagle.TradeCraft.TradeCraftPlayerListener.onPlayerInteract(TradeCraftPlayerListener.java:32)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:254)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:207)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:521)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
    Then i tryed to enable the debug thing,
    reloaded the plugins,
    suddenly its saying me thats a infine shop after i clicked on the sign but gives theses errors here:
    Code:
    15:25:58 [SCHWERWIEGEND] Could not pass event PLAYER_INTERACT to TradeCraft
    java.lang.NullPointerException
            at nl.armeagle.TradeCraft.TradeCraftPermissions.canBuy(TradeCraftPermissions.java:32)
            at nl.armeagle.TradeCraft.TradeCraftItemShop.handlePatronClick(TradeCraftItemShop.java:93)
            at nl.armeagle.TradeCraft.TradeCraftItemShop.handleRightClick(TradeCraftItemShop.java:17)
            at nl.armeagle.TradeCraft.TradeCraftPlayerListener.onPlayerInteract(TradeCraftPlayerListener.java:32)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:254)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:207)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:521)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Edit: solved! turned out to be a GroupManager problem. Works fine with Permissions.
     
  6. Offline

    proJohnRH

    Any chance you would add support for choosing the currency at the point of sale as well? I have one guy on my server that wants to work in cobblestone, but maybe someone else doesn't. It'd be cool to be able to specifically define both items that will be traded.
     
  7. Offline

    ArmEagle

    That would technically be possible. But I think it is too much effort for something that can already be kind of achieved as is.

    He could setup a shop buying/selling cobblestone for the generic currency at a steady rate and then setup a shop of the normal item. Of course there's the possibility people will rather just use the actual currency, than sell cobblestone for currency and then buy the item.
     
  8. Offline

    LSky

    While this is a solution, I'd also think it would be a big improvement if one could decide both sides of the trade. Having just gold as a currency is very restricting.
     
  9. Offline

    michael05242002

    I think the current method is quite good because it is simple. i would say your method make will become a different plugin..
     
  10. Offline

    LSky

    So, make it optional then?
     
  11. Offline

    kahlilnc

    Can you make penny currency or something like that. That works for coins basically. Such as Iron as 1 currency and 10 coal as .10 currency.
     
  12. Offline

    ArmEagle

    Just like the other suggestion, I think that would deviate from the simplicity of the plugin.

    In your case specifically nothing is stopping you from setting iron ingot as the main currency, then valuate gold at 10 iron ingots and put a trade chest up for gold at your trade hub. Though on our server we kept using gold ingot as currency and I just used diamond as currency storage. We were using quite some infinite shops, because the server was so small / people didn't like the full economy ideas.
     
  13. Offline

    jonathanyc

    Hi!
    I'm running Bukkit 740, with the latest TradeCraft downloaded from the link at the OP, but neither I nor any of my members are able to set up a shop that buys any non-currency item for a currency item. We can set up shops that do the reverse, selling the non-currency item for the currency item, with:
    Code:
    [IronBlock]
    Sell 5 for 1
    -jonathanyc-
    
    ... but trying the same sign with Sell replaced with Buy yields the exact same result.
    Thanks,
    Jonathan
     
  14. Offline

    LSky

    I just introduced this system to my server, with redstone as currency. I'll report on issues that I come across. I've experimented with this on my server on a small scale with using gold as currency, and it worked fine!
     
  15. Offline

    ArmEagle

    That's because the word 'Sell' doesn't mean anything to the plugin. All that matters are:
    - two separated numbers on a line
    - second line for '[you can] buy X for Y'
    - third line for '[you can] sell X for Y'
    (-item name within brackets on the first line - and shop owner name is automatically placed on the last line)

    The words 'sell' and 'buy' as shown in examples are from the point of view of the customer, not the shop.
     
  16. Offline

    michael05242002

    Try
    Code:
    [ironblock]
    
    sell 5 for 1
    name
    
    Note that the format is:
    line1: item name
    line2:buy by player(not owner)
    line3:sell by player
    line4:name
     
  17. Offline

    ArmEagle

    Note that as of version 1, or so, the plugin fills in the name automatically, so there's no use in writing it yourself anymore.
     
  18. Offline

    robbert777

    could you please try to make this work on 740? i'd love to use this plugin
     
  19. Offline

    ArmEagle

    I haven't gotten around to testing it on 740 myself yet. But at least one person wrote that it works just fine. The thread title not listing the latest RB does not mean it doesn't work. So, perhaps you should just try it out yourself first, before asking to make something work that might already do so.
     
  20. Offline

    LSky

    Any idea where this comes from?

    17:46:20 [SEVERE] Could not pass event PLAYER_INTERACT to TradeCraft
    java.util.MissingFormatArgumentException: Format specifier '2$s'

    I think it crashed my server but I couldn't figure out why.
     
  21. Offline

    ArmEagle

    I did find a stupid formatting error in the TradeCraft.en.lang file before and I'm pretty sure that is fixed in the latest version (of a few days ago). Try and remove the TradeCraft.en.lang file (and make sure you have the latest version of the plugin).

    I don't have time right now, but I'll go and test the plugin with CB740 tomorrow, starting from scratch I should find any issue if there is still one.
     
  22. Offline

    LSky

    Alright, thanks for letting me know. It was the latest version by the way.
     
  23. Offline

    ArmEagle

    Ok, I lied, I was just lazy. But did go and give it a spin anyway. :)

    Did you try removing that TradeCraft.en.lang file? I just downloaded the TradeCraft.jar from the OP - version AE-1.0.1 (just to make sure my local build doesn't have any changes). I downloaded the CraftBukkit #740 recommended build. And I don't seem to have any issues interacting with signs or chests in any way.

    If after that mentioned step (of course you need to reload the plugin (/tc reload) or restart the server) the error still shows up. Could you give me the complete stack trace? It should tell me where the error is occuring - use the |code| (use [] instead of ||) tag. And let me know how you are interacting with the world when that error occurs.

    I guess I should do more/better exception handling :p
     
  24. Offline

    LSky

    The problem is, I only saw it happen on one occasion so far. When I notice it next, I'll let you know. Last time I could not trace what happened when the error occured, I'll try to figure that out next time. Also, what happens if you price something for more than 64, will it work?
     
  25. Offline

    ArmEagle

    Ok, of course I hope that error won't show again (though on the other hand, finding and solving a bug gives more clarity).

    Yes, you should be able to sell a good for quite a lot. It's only limited by the amount of items a single chest can hold.
     
  26. Offline

    LSky

    This also goes for the amount of items one ought to be able to withdraw. Withdrawing more than 27 non-stackable items results in items being deleted. Any chance that could be fixed?
     
  27. Offline

    ArmEagle

    Hmm, I thought I had actually added a check for that with the last version. But I guess I forgot the stacking differences. I'll look at that .. well, soon. Tomorrow is liberation day in the Netherlands. :)
     
  28. Offline

    LSky

    I know :)
     
  29. Offline

    ArmEagle

    Well, there we go, I did find time after all! :)

    I used a wrong check for item type when the shop owner tried to get his items out of the chest.

    version 1.0.2
    • Fixed: Issue with shop withdrawing too much items into the chest when owner interacted with the shop through the sign.
     
  30. Offline

    LSky

    Thank you! I'll just not mention the issue about currency being gained from sales automatically going into the currency pool for buying items at the same shop, so that you can have some more fun on liberation day!
     
  31. Offline

    ArmEagle

    You mean that if you accidentally right-click twice on a sign and you started with goods in the chest (planning to sell them), you end up with goods again (sold them first, ending up with currency in the chest, then on the second click bought the goods again, possibly at a less favorable rate)?

    I could perhaps add a timeout for shops. That, or look into the virtual inventory trick some other plugin(s) use. But I'd like to refrain from that, since that requires the use of the CraftBukkit API (instead of just Bukkit, which is intended for plugins).
     

Share This Page