1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Problem with SimpleWarpAPI

Discussion in 'Development' started by Minto, Jun 4, 2021.

  1. Minto

    Minto Spider

    Messages:
    6
    GitHub:
    MintoD
    How to add, delete, list warps?
     
  2. Axon

    Axon Zombie

    Messages:
    276
    The SimpleAPI file is pretty helpful on figuring it out, you can also look at command files and see how it does it.
    Here's the api's.
    PHP:
    use falkirks\simplewarp\Destination;
    use 
    falkirks\simplewarp\utils\WeakPosition;

    $this->api $this->getServer()->getPluginManager()->getPlugin("SimpleWarp")->getApi(); // Get's the api
    unset($this->api->getWarpManager()["Warp"]); // Deletes a wrap

    $dest = new Destination(new WeakPosition(0,0,0"WorldName")); // Creates a Destination
    $this->api->makeWarp("WarpName"$dest); // Creates wrap


    $this->getServer()->getPluginManager()->getPlugin("SimpleWarp")->getWarpManager()->loadWarps() // Loads wraps
     
    Agent and Primus like this.
  3. Minto

    Minto Spider

    Messages:
    6
    GitHub:
    MintoD
    Thanks you so much
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.