Adding an API/Documentation #4


  • Enhancment
  • Accepted
Open
Assigned to _ForgeUser7785194
  • croxis created this issue Feb 10, 2012

    I would like to integrate my lift plugin to recognize stacked worlds. An API (or some documentation of an existing one) would be fantastic.

  • croxis added the tags New Enhancment Feb 10, 2012
  • _ForgeUser7785194 posted a comment Feb 10, 2012

    Unlike it's inception counterpart, WorldWrap does not keep an active database of which worlds are "stacked". Although it does allow you to be sent to a new world when a player reaches a defined boundary, this is just a simple check to the config to see what should happen, and then executes that action.

    While I can give you access to methods that would allow you to get the action that will happen whenever a player reaches a certain boundary in their world, in addition to what world they will be sent to, but after looking at your plugin a bit I can't really decide if that would be helpful or not.

    For example, it could be something like:

    WorldWrap ww = new WorldWrap();
    
    //Get the action that will happen when a player reaches the top of his/her world
    
    String action = ww.getActionTop(player);
    
    if (action.equals("world"))
    
    {
    
        //Now that you know that the player will be sent to a new world when they reach the top of their world, get the world they will be sent to
    
        World world = ww.getWorldTop(player);
    
        //Now that you have that world, you can execute whatever code you like here
    
    }
    

    And of course the bottom and edge methods or worlds can be checked as well. If that would be helpful, feel free to let me know and I'll definitly make an API. If you don't think it would be helpful, you can also let me know because I have thought about making something more closely resembling inception that allows you to structure your server from top to bottom with worlds.


    Edited Feb 10, 2012
  • _ForgeUser7785194 removed a tag New Feb 10, 2012
  • _ForgeUser7785194 added a tag Waiting Feb 10, 2012
  • croxis posted a comment Feb 20, 2012

    Gotcha, my plugin is similar in that the elevator is generated when it is used. For my needs I need to be able to continue scanning up/down to see if there is a valid elevator shaft and valid floors. So I need to know if there is a stacked world up/down, what the x, z offset is, and where the transition overlap is.

  • croxis removed a tag Waiting Feb 20, 2012
  • croxis added a tag Replied Feb 20, 2012
  • _ForgeUser7785194 posted a comment Feb 20, 2012

    @croxis: Go

    Alright. Marked this ticket for future inclusion.

  • _ForgeUser7785194 removed a tag Replied Feb 20, 2012
  • _ForgeUser7785194 added a tag Accepted Feb 20, 2012

To post a comment, please login or register a new account.