Solved World Edit API Help

Discussion in 'Plugin Development' started by xtechgamer735, Jul 20, 2014.

Thread Status:
Not open for further replies.
  1. Hello,

    I am new to the WorldEdit API. What I am trying to do is select a pre defined WorldGuard region and set it to a certain percentage of blocks (Basically a simple mine reset plugin).

    Thanks in advance.
     
  2. Offline

    mythbusterma

    You know, at a certain point it's probably easier just to write the logic to reset the mine yourself.
     
  3. Offline

    mythbusterma

    xtechgamer735

    Just iterate over every block in the area changing it to whatever ores you like.
     
  4. mythbusterma Ok thanks, how would I do that with the API?
     
  5. Offline

    mythbusterma

    xtechgamer735

    You don't need WorldEdit is my point, World#getBlock(....) and Block#setMaterial(Material) are all you need.
     
  6. mythbusterma But it would need the region selected. Would I get that from world guard?
     
  7. Offline

    mythbusterma

    You could ask WorldEdit for a selection, ask WorldGaurd for a region, but most practically you could store a region in the config.yml and store it yourself.
     
    Traks likes this.
  8. Offline

    mythbusterma

    xtechgamer735

    Depends exactly what you're trying to do. You can store xyz coords in config and iterate over every block between two points.
     
  9. mythbusterma It doesn't matter, Im gonna use another plugin. Thanks for your help though!
     
  10. Offline

    Traks

    Using WorldEdit and WorldGuard in this situation is highly unnecessary and they contain so many features it would be a waste to use them only for what you require. Anyhow, there's a wiki for these plugins... link
     
    mythbusterma likes this.
  11. Offline

    Dragonphase

    Or you could go to the WorldEdit and WorldGuard forums for more help regarding their respective APIs.
     
Thread Status:
Not open for further replies.

Share This Page