[ECON] DMWrapper V1.1 - DynamicMarket wrapper to restrict shop locations [953]

Discussion in 'Inactive/Unsupported Plugins' started by GoalieGuy6, Jul 5, 2011.

  1. Offline

    GoalieGuy6

    DMWrapper - DynamicShop Wrapper Plugin
    Download V1.1 (JAR | Source on GitHub)

    Current version: 1.1
    Tested against: CraftBukkit build #953 and DynamicMarket version 0.6.0

    JAR Mirror (Version 1.1)
    Older Versions

    The original thread can be found here.

    Requirements:
    Note: This has been tested but not too extensively, please report any and all errors you receive!

    DMWrapper is a wrapper plugin for DynamicMarket that adds location-based shops. It will let you specify shop areas that your users must be in to use the /shop commands. If you have WorldGuard installed, you can simply setup a WorldGuard region as a shop area. If not, DMWrapper has it's own area selection tools.

    Usage (open)
    Setting up a Shop
    If you are using WorldGuard, setting up a shop is simple. All you need to do is create region(s) for each shop, and use the command "/shop location create [region]" for each one. You may define an unlimited number of shop regions.

    If you do not use WorldGuard, you must first define an area to create a shop. To do this, point at one corner and type "/shop location set". This will set the first corner to the block you are looking at. Now find the opposite corner, point at it, and type "/shop location set" again. This will define your second point. If you mess up, you can use "/shop location set" to start over or "/shop location cancel" to cancel your selection. Once your selection is made you can create a shop area with "/shop location create". To get this shop area's ID, stand in it and type "/shop check".
    Commands & Permissions (open)
    Commands
    /shop location - Displays in-game help
    /shop location enable - Enable location-restricted /shop command
    /shop location disable - Disable location-restricted /shop command
    /shop location set - Sets a corner at the block you are looking at.
    /shop location cancel - Cancels shop creation
    /shop location create - Creates a shop area from your 2 selected points.
    /shop location delete [id] - Removes shop area with specified id. Removes shop you are standing in if no id is specified.
    /shop location check - Checks if you are in a shop area, displays area ID/name if you are in one.
    /shop location list - Lists all shop ids/regions.
    /shop location tp <id> - Teleports you to the specified shop id/region.

    WorldGuard Commands
    /shop location create <region> - Sets up a shop area at the specified region
    /shop location delete <region> - Deletes shop area at the specified region
    Permission Nodes (open)
    Permission Nodes
    'dynamicmarket.location.check' - Allows use of /shop location check to check if you are in a shop.
    'dynamicmarket.location.list' - Allows use of /shop location list to list all shop areas.
    'dynamicmarket.admin.location.bypass' - Allows you to use /shop commands outside of a shop area
    'dynamicmarket.admin.location.create' - Allows you to create shop areas.
    'dynamicmarket.admin.location.delete' - Allows you to delete shop areas.
    'dynamicmarket.admin.location.toggle' - Allows you to enable and disable location restriction on /shop.
    'dynamicmarket.admin.location.tp' - Allows you to teleport to a shop area.
    Installation/Setup (open)
    Installation/Setup:
    Step 1) Make sure DynamicMarket is installed (Version 0.5.2 or later)
    Step 2) Copy DMWrapper.jar into your Plugins/ folder.
    Step 3) Start up your server. A couple files will be generated in plugins/DMWrapper.
    Step 4) Edit config.yml if you plan on using WorldGuard to define shop areas.
    Step 5) Define shop areas in-game.


    Changelog
    1.1
    • Fixed a bunch of messages
    • Added a restricted commands option to config.yml
      • This option will be created automatically
      • Add any /shop sub-commands that should only be allowed to be used in shop areas
    1.0
    • Official release
    • Added WorldGuard support
    0.15
    • Updated for CB #953 and DynamicMarket 0.5.3
    Older Versions (open)
    0.13
    • recompiled against CB#617 for Minecraft 1.4
    0.12
    • CB #602 update, as well as permissions/iConomy for that RB
    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
     
  2. Thanks, and even WG support \o/

    Having one issue so far:

    /shop location create Region - Worked, region created, and shop works.
    /shop location delete Region - "Error removing shop: Region"
     
  3. Offline

    GoalieGuy6

    Ah that one was a stupid mistake on my part, download has been fixed. On another note, thank you for finding all these bugs for me, you have been really helpful :)
     
  4. Our entire economy revolves around DM, I want it to work ;)

    Works now thanks!

    Requests:
    - Please split price info checks from buy/sell. I would like to restrict sell/buy to Shop areas, but restricting price checks as well has proven to be very annoying in the past, for us at least. I hope this is possible with how a wrapper works...

    - Very tiny bug, in most wrapper output, you have 1 space too many: "[Shop] Shop locations disabled." There's 2 spaces after [Shop] instead of one.

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

    GoalieGuy6

    1) I am working on this one, the way I plan on doing it is creating an option in the config file with a list of commands that are restricted to the shop areas.

    2) I will go through and fix all the messages when I make the next update. I may create a config file to customize the messages easily if anyone would like this option.
     
  6. Offline

    GoalieGuy6

    Version 1.1 is released with the fixes described in my post above.
     
  7. Offline

    GoSox2525

    i got a shop area set up /shop location check works in it, but i can still access /shop commands from outside it. is it because i have all permissions?
     
  8. Small request, not too important, but, could you make:

    /shop location tp <id>

    Port to the center of the WG region, it uses a corner now, which is kinda messy in a defined room, inside the wall.
    Really, only if you got time spare, I can work around it :D

    New bug:

    I tried add a WG region:
    /shop location create GreenFerme_Market

    That errored, too long or the underscore?

    After that, the entire shop location feature died, the list of shops was suddenly empty, none listed in shops-worldguard.yml, so it proper broke...

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

    GoalieGuy6

    Yes, anyone with the permission 'dynamicmarket.admin.location.bypass' node can access /shop commands anywhere.

    I was unable to recreate this using that exact region name, could you post the error log?
     
  10. Meh there was no error trace at all :S

    Will test more tomorrow...
     
  11. Offline

    GoSox2525

    oh okay thanks
     
  12. Offline

    GoalieGuy6

    What exactly went wrong... did it display any type of error to you ingame or just not add the region to the shop list?
     
  13. It is now working, was rezoned and underscore removed...so dunno.

    However, price info is being restricted to shop areas. This is our config:

    restricted-commands:
    - buy
    - sell

    Yet "/shop Item" is telling people they need a shop location.
     
  14. Any chance for a fix? This must be a relatively small issue :eek: Feels like a typo...
     
  15. Offline

    mart1nzuchy

    Hey i have a problem, for example, i created a region called shopitems with worldguard.

    Then i put /shop location create shopitems

    And nothing happens, i can use it in the whole world, can u help me please ?
     
  16. Offline

    WhiteDragon

    Could someone pick this plugin up?
     

Share This Page