[INACTIVE][ECON] DMWrapper v0.14 - a DynamicMarket wrapper adding locations [617]

Discussion in 'Inactive/Unsupported Plugins' started by Magik, Feb 18, 2011.

  1. Offline

    Magik

    DMWrapper v0.14

    Links
    DMWrapper.jar (GitHub Source)
    DynamicMarket.jar ( 0.4.8.magik.28 ) (GitHub Source)
    DynamicMarket Thread ( slightly outdated, I forked it and have been maintaining my own version )

    Plugin Requirements
    • DMWrapper 0.14 was tested against Craftbukkit build #677
    • DynamicMarket ( 0.4.8.magik.28 - Shaniqua )
    • Permissions 2.7
    • iConomy 4.6.3 ( this is what DynamicMarket was compiled against )
    Intro
    I wanted DynamicMarket to be able to be locked down so that it wasn't a "global" shop command. This plugin enables that functionality by adding some /shop location commands. Basically you get to set up some locations in the world as shops, and you can restrict usage of the /shop to only those places. The plugin utilizes DynamicMarket's wrapper mode allowing me to pass commands as necessary to DynamicMarket. This plugin is just restricting location manager addon for DynamicMarket.

    HaloInverse's plugin thread can be found here: http://forums.bukkit.org/threads/econ-dynamicmarket-v-0-4-3-dynamic-price-shop-plugin-343.3266/


    Note: this has been barely tested, use at your own risk. And please for god's sake back things up before you try this! Any suggestions/comments are welcome, please post in this thread ( or an issue on github's issue tracker ).

    And thanks a ton HaloInverse for the great plugin that is DynamicMarket!

    Commands and Usage (open)
    Commands and Usage
    • /shop location - prints out the Usage for the location commands
    • /shop location enable - enables location-restricted shops
    • /shop location disable - disables location-restricted shops - DynamicMarket will work like normal here with a global /shop command
    • /shop location set - begins the shop location selection process - this will ask you to right click 2 corners to set the boundary box
    • /shop location cancel - cancels the shop setting process
    • /shop location remove <ID> - removes the shop location with id ID
    • /shop location check - tells you the shop location ID that you are currently in ( for deleting )
    • /shop location list - lists all the IDs of the shop locations
    • /shop location tp <ID> - teleports to the shop ID location
    Permissions (open)
    Permission Nodes:


    dmwrapper.location - allows usage of the /shop location command
    dmwrapper.admin - locations will not apply to a group with this node
    Installation Instructions (open)
    Installation Instructions:
    • Ensure you have DynamicMarket already installed and working ( with my latest compiled version here )
    • Add the permissions node to whomever you would like to be able to access the "/shop location" commands
    • Download the .jar - put it in the plugins directory
    • Once in-game ( with the location permission node ):
      • /shop location enable
      • /shop location set
    Changelog (open)
    Changelog:
    • 0.13
      • recompiled against CB#617 for Minecraft 1.4
    • 0.12
      • CB #602 update, as well as permissions/iConomy for that RB
    • 0.10
    • 0.09
      • added better integration into /shop help
    • 0.08
      • fixed command collisions with DynamicMarket ( also fixed in DynamicMarket 0.4.8.magik.18 )
    • 0.07
      • added debug-mode to config
    • 0.06
      • better player tracking for entering/leaving messages
    • 0.05
      • better world tracking
    • 0.04
      • fixed embarrassing stupid command error
      • fixed /shop location being ignored when locations disabled in shop.yml
    • 0.03
      • Updated to support newer DynamicMarket ( 0.4.8.magik.15 )
      • Craftbukkit Build #522
    • 0.02
      • minor command related bug fixes
      • tweaked intercept command code
    • 0.01
      • Initial Release
      • Added basic location based functionality to DynamicMarket
    To-do (open)
    To-do
    • Add custom/configurable messages for everything
    • Color up the current messages
    • Find a way to show the location command when passing /shop help to DynamicMarket
    • Add ability to pass administrative commands ( list/add/remove/etc... ) and ignore locations for those
    • Add ability to pass all commands if admin permissions?
    • Better handling of worlds ( currently I am assuming one world, and thus, this will probably break if you someone tries some sneaky things like setting one corner of a shop in one world, and another corner in another world ).
    • Fix getCenterOfShop() function to return calculated center instead of returning one of the set corners
    • Remove hard-coded plugin name/version/paths
     
  2. Offline

    Magik

    wow.... that's very interesting... both of those logs seem fine too...

    I have a hunch... could you try it and disable essentials? ( as in rename it to like essentials.jar.bak )

    I wonder if it's somehow OS/architecture related?

    I have it running on two test machines, but they are both windows 7 machines, and both 64-bit
    I also have it running on my server, which is also 64-bit, but centOS

    are your computers running 32-bit or 64-bit? and what OS?

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

    Tenebrion

    Nope /dshop doesn't work either it just give me an explanation of who to do what I just did. Also I tried to install DMWrapper but all Igot was:

    Code:
    11:08:25 [INFO] [Permissions] version [2.5.4] (Phoenix) was Initialized.
    11:08:25 [ALLVARLIG] null loading DMWrapper v0.04 (Is it up to date?)
    java.lang.NullPointerException
            at me.slaps.DMWrapper.DMWrapperPluginListener.tryEnablePlugins(DMWrapperPluginListener.java:
            at me.slaps.DMWrapper.DMWrapper.onEnable(DMWrapper.java:74)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    11:08:25 [INFO] [General] version [2.2.1] (Chernobyl) loaded
    11:08:25 [INFO] [Permissions] version [2.5.4] (Phoenix)  loaded
    11:08:25 [ALLVARLIG] Could not pass event PLUGIN_ENABLE to DMWrapper
    java.lang.NullPointerException
            at me.slaps.DMWrapper.DMWrapperPluginListener.onPluginEnabled(DMWrapperPluginListener.java:3
            at org.bukkit.plugin.java.JavaPluginLoader$31.execute(JavaPluginLoader.java:316)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:452)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
            at com.nijikokun.cjcfork.bukkit.General.General.setupPermissions(General.java:173)
            at com.nijikokun.cjcfork.bukkit.General.General.onEnable(General.java:122)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    And my permissions:

    Code:
    groups:
        Default:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '/afk'
                - '/help'
                - '/list'
                - '/motd'
                - '/msg'
                - '/rules'
                - 'mcdocs.*'
                - 'general.player-info'
                - 'general.spawn'
        Citizen:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '/ach'
                - '/afk'
                - '/help'
                - '/list'
                - '/listach'
                - '/motd'
                - '/msg'
                - '/rules'
                - '/stats'
                - 'dynamicmarket.access'
                - 'dynamicmarket.buy'
                - 'dynamicmarket.sell'
                - 'general.player-info'
                - 'general.spawn'
                - 'iConomy.list'
                - 'iConomy.payment'
                - 'iConomy.rank'
                - 'mcdocs.*'
                - 'myhome.home.basic.*'
                - 'towny.town.claim'
                - 'towny.wild.item_use'
        Moderator:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
                - Default
            permissions:
                - '/ach'
                - '/afk'
                - '/help'
                - '/list'
                - '/listach'
                - '/motd'
                - '/msg'
                - '/rules'
                - '/stats'
                - 'dynamicmarket.access'
                - 'dynamicmarket.buy'
                - 'dynamicmarket.sell'
                - 'general.player-info'
                - 'general.spawn'
                - 'iConomy.list'
                - 'iConomy.payment'
                - 'iConomy.rank'
                - 'mcdocs.*'
                - 'myhome.home.basic.*'
                - 'towny.town.claim'
                - 'towny.wild.item_use'
                - 'myhome.home.basic.*'
                - 'tplus.tp.*'
                - 'plus.history'
        Admin:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '*'
                - 'tplus.tp.*'
                - 'plus.history'
                - '/statsadmin'
                - 'dynamicmarket.admin'
                - 'general.*'
                - 'iConomy.*'
                - 'towny.admin'
                - 'WorldEdit.*'
                - 'WorldGuard.*'
                - '/ach'
                - '/afk'
                - '/help'
                - '/list'
                - '/listach'
                - '/motd'
                - '/msg'
                - '/rules'
                - '/stats'
                - 'general.spawn'
                - 'dynamicmarket.access'
                - 'dynamicmarket.buy'
                - 'dynamicmarket.sell'
                - 'general.player-info'
                - 'general.spawn'
                - 'iConomy.list'
                - 'iConomy.payment'
                - 'iConomy.rank'
                - 'mcdocs.*'
                - 'myhome.home.basic.*'
                - 'towny.town.claim'
                - 'towny.wild.item_use'
                - 'dmwrapper.location'
     
  4. Offline

    imaxorz

    I was thinking that it could be OS related too, but I don't know much about this stuff, or how it could work on one OS and not the other.

    My computer is 64-bit Windows 7, the server is CentOS, but I don't know if its 32 or 64-bit.

    I believe CentOs is only 64-bit though, right? I only have access to the server with SSH, so if you can tell me how I can check.

    I'm just stumped and don't know what else to do.
     
  5. Offline

    Magik

    I don't see DynamicMarket being loaded? did you also download and put that in the plugins directory?

    also, what craftbukkit version are you using?

    and also, it looks like this line is cut off - i want the line # at the very end of the first error in that stacktrace... this line:
    at me.slaps.DMWrapper.DMWrapperPluginListener.tryEnablePlugins(DMWrapperPluginListener.java:

    type: getconf LONG_BIT

    that should output either 32 or 64

    or you could type: uname -m

    if it says x86_64 or ppc64 it's 64-bit
     
  6. Offline

    imaxorz

    uname -m worked, I got "x86_64" as output.
     
  7. Offline

    Magik

    meh.... that's the same as my centOS box.... what could possibly be different between those two....

    did you try disabling essentials like I asked?

    I have a hunch that essentials may be doing some wacky stuff - possibly with the PLAYER_COMMAND_PREPROCESS event hook...

    and I also notice that in my centOS server logs, essentials loads AFTER DMWrapper, yet yours it loads before.... on all my machines where it works essentials loads after....

    it's just a hunch... but let me know if that works?
     
  8. Offline

    imaxorz

    Nothing with all essential plugins disabled :(

    http://pastebin.com/JwXDAekB
     
  9. Offline

    Magik

    this is really odd... I have no idea what's different other than all of the plugins you are running....

    but you said you tested all of the same plugins on your test server and they seem fine?

    if I could replicate this issue myself I would be able to track something down.... but without seeing a problem on my end it's really hard for me to debug it....
     
  10. Offline

    imaxorz

    Yeah, same exact files and all.

    If you are willing I can zip my whole plug ins folder and send it your way.
     
  11. Offline

    Magik

    yeah, sure i'll give it a try
     
  12. Offline

    imaxorz

    Ok, give a few minutes, my upload speed is terrible.

    Ok, I sent you a PM, or started a conversation as this site calls it.

    Did more experimenting.

    If disable the wrapper this is what I get as a readout when I try to use any of the /shop commands.
    /shop
    /shop help <topic/command>
    /shop <itemid>
    /shop <s
    ubcommand><args>

    If I use this version http://www.brisner.no/DynamicMarket/0.5.beta2/DynamicMarket.jar compiled by Andreas the shop work, but only when the wrapper is disabled. If I enable the wrapper, DM doesn't load. Which I assume is ok since its not your build.

    Hope this helps.

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

    Bombg

    I'm getting the exact same symptoms.
     
  14. Offline

    Magik

    did you guys try using /dshop?

    and @imaxorz you get that same message on all of your test computers as well?
     
  15. Offline

    imaxorz

    I get that message when using /shop or /dshop

    I've tried it on my computer too and its same thing.

    What seems to be the problem to be is the wrapper, since when its disabled at least I get some response from the DM.
     
  16. Offline

    Magik

  17. Offline

    imaxorz

    Before I try these will there be a problem after using Andreas' version that uses decimals? Some items in the shop have decimals now.

    Do I need to replace the DynamicMarket.jar inside the DMWrapper folder?


    Also, was that the problem? I had it set to false on my computer too.
     
  18. Offline

    Magik

    there may be a problem trying my version of DynamicMarket after using andreas'. I'm not sure what he has done to his table structure to get the decimals, as DM's table structure was using integers before, and now he must be using some sort of decimal/float column now.

    I would just back up your DynamicMarket directory the way it is now, and try it - you can always go back to the backup?
     
  19. Offline

    imaxorz

    Same results as before.

    With wrapper on I get no response from the shop at all.

    With wrapper off I get
    /shop
    /shop help <topic/command>
    /shop <itemid>
    /shop <s
    ubcommand><args>


    wrapper-permissions=false <- I don't have to worry about that right?
     
  20. Offline

    Magik

    you shouldn't have to worry about wrapper-permissions... and you are using both of my versions? not andreas' ?
     
  21. Offline

    imaxorz

    Yes I used both the files you posted. I double checked twice.

    Tried them on my computer just now, they work. :-/ but again not on the server.
     
  22. Offline

    Magik

    meh.... wtf... just tried your server's files, and it works fine for me on my computer as well =(
     
  23. Offline

    imaxorz

    Yeah I have no idea, it's really weird. I know 0 about programming, so I'm clueless.

    Is there any way to compare the code with Andreas' to see why his works and yours doesn't?

    It's just so weird that your server run's centOS too and it works perfectly.
     
  24. Offline

    Magik

    I've looked at andreas' before... I've actually taken some of his code and merged into my fork as well... but that was before his beta 2.0 release, and before a couple of the last updates...

    the real problem is the spacing/indentation is so different in our code now, that it's really horrible to do a diff - nearly every line has "changed" so it highlights it ( even when it's just tabs/space changes )

    Can you try this version and pastebin the console logs after trying various /shop commands?

    https://github.com/downloads/magik/DMWrapper/DMWrapperDebug.jar

    please don't forget to re-name it to DMWrapper.jar

    I've added some debuging output to see if my plugin is even seeing your commands...

    Can you specifically try these:
    /shop
    /shop help
    /shop list
    /shop location
    /shop location enable
    /shop location set

    And also can you try the above commands in your "guest' permission group, and then try it out again as the "Admin" group ?

    also, what version of java are you using on all of your systems? java -version

    my centOS box has got IcedTea openJDK:
    Code:
    java -version
    java version "1.6.0_17"
    OpenJDK Runtime Environment (IcedTea6 1.7.5) (rhel-1.16.b17.el5-x86_64)
    OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
    
    my work computer ( the win7 64-bit) has:
    Code:
    java -version
    java version "1.6.0_23"
    Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
    

    both are 1.6.... maybe I should be compiling for 1.5....

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

    imaxorz

    Same results as before.
    http://pastebin.com/YqxeZ7S9
    Sorry for all the chatter.

    At home I have

    java version "1.6.0_23"
    Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)

    On my server
    [maxim5947@123mp ~]$ java -version
    java version "1.6.0_17"
    OpenJDK Runtime Environment (IcedTea6 1.7.5) (rhel-1.16.b17.el5-x86_64)
    OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)



    Wanted to add that I really appreciate for you sticking with me and helping out.
     
  26. Offline

    Magik

    so I don't see any of my debug messages.... which means my plugins onCommand isn't being called....

    wtf plugin is echoing out the commands? i'm guessing it's intercepting the command some how!?

    also, you get the heap space issue most likely because you are using up all your ram ( probably running minecraft when you type that I'm guessing ) Java needs a fair bit of ram even to tell you it's version lol

    and i'm glad that you are here trying to let me help you ;) I've had reports of similar issues to this from other people, but I can't ever get anyone on to try it for me... And since I can't replicate the issue on my end, it's nearly impossible for me to get any debugging done. I'm literally flying blind here... so yeah, thank YOU! ;)
     
  27. Offline

    imaxorz

    ^ I got the server's java version. Could that be it? (Eh, nvm, I just noticed you posted your versions and they are exactly the same)

    I had to stop the server for the command to work.

    Well how could I not, these are my favorite two plug ins lol

    If it makes it any easier, you can reach me on skype with imaxorz
     
  28. Offline

    Magik

    what I would really love - is to be able to get the bare minimum running on your server ( regarding DM and DMWrapper ).... and then just start adding plugins till it breaks DMWrapper.... that's all I can think of right now...

    but it's kinda shitty cuz it seems like you got a lot of ppl on there, and personally I hate restarting the server so often when your players are on....

    I'm gonna download your .zip and put it on my centOS box, and see if it works there with all of ur plugins
     
  29. Offline

    imaxorz

    Yeah they get really upset with too may restarts.

    Let me know how it goes when you try it.

    I can stay up at night tonight and try to remove/add plug ins one by one.

    I just wish it wouldn't work on my pc either lol, that way I can test all I want.

    But they love the shop and everyone is asking when it will be fixed. I'm leaving it broken for now instead of just using Andreas' version, so they can miss it more.

    I'm pretty beat after a long day of server stuff so I'm not going to stay up late to test different plug in combinations.

    As, soon as I do I will let you know the results.

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

    kingmob

    Hi Magik,

    same error as imaxorz, plugin works in local test machine running Windows7 (java SE 6 update 24), but not in the linux server:
    java version "1.7.0"
    IcedTea Runtime Environment (build 1.7.0-b21)
    IcedTea Server VM (build 1.7.0-b21, mixed mode)

    Bukkit 531 here and a lot of plugins =)
     
  31. Offline

    imaxorz

    Good, I know I'm not crazy now.

    Want to compare our plug ins?

    Do you use Hero Chat or Essentials chat? Since the shop not hearing commands, I thought it might be chat related?
     

Share This Page