Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to Restore a world

Comments in 'Plugin Development' started by Jon, Sep 1, 2014.

  1. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    How can i restore a world in the new API?

    In the old api if i remember was,
    PHP:
      $this->restoreWorld();
    What for the new API?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    In old API, $this->blah() only exists when you declare
    PHP:
    public function blah(){
    }
    in your script.
  3. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    In the new?
    How to restore?
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Where did you find that restore world function?
  5. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Maybe its a bit old
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    No. You have to write the restore world function yourself, in old API or new API. In whatever plugin you found that function, you should look at the function restoreWorld() in that plugin instead (search "function restoreWorld(").
  7. Wantedkillerss
    Offline

    Wantedkillerss Active Member Plugin Developer

    Joined:
    May 9, 2014
    Posts:
    142
    Plugins:
    1
    Minecraft User:
    Wantedkillers
    Yes but u can save the world in a config
    And then delete it and use the saved one
    (How do u delete it?)
    $this->saveWorld();?
    $this->delete world();?
  8. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    you're not really helping, he want to RESTORE it, not load it and delete and reload .-.
    PEMapModder likes this.
  9. Wantedkillerss
    Offline

    Wantedkillerss Active Member Plugin Developer

    Joined:
    May 9, 2014
    Posts:
    142
    Plugins:
    1
    Minecraft User:
    Wantedkillers
    Oh restore meaning delete or like that backup plugin
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes, restore or rollback, not reload.

    And saving in a config is terrible. It will spend ages.

    P.S. Off-topic: talking of spending ages, today at school I wrote a calculator program that calculates 1 / i + 2 / i^2 + ... + 1000 / i^1000, but since Casio calculators don't support i^1000 and they don't have the modular arithmetic operator, I had to do a loop to Lbl1:B×i→B:1M+:M≤1000=>Goto 1: to calculate i^199 nd it still hasn't finished calculating after I got back from lunch -_- xD (the bad ending of cheaters :p)
    iJoshuaHD likes this.

Share This Page

Advertisement