Beispiel #1
0
 public function addPortal(MapPortal $p)
 {
     $this->plugin->portals[$p->name] = $p;
     $p->save($this->plugin->getDataFolder() . MapPortal::DIR_PORTAL_DATA);
     $this->plugin->log("save portal " . $p->name . " | " . $p->destination);
 }
Beispiel #2
0
 public static function createSamplePortal(HungerGamesPlugIn $plugin)
 {
     $portal = new MapPortal($plugin, "sample_portal");
     $portal->levelName = "portal";
     $portal->displayName = "map portal";
     $portal->type = self::TYPE_MAP_PORTAL;
     $portal->portalEnterPos1 = new Position("128", "12", "123");
     $portal->portalEnterPos2 = new Position("128", "12", "123");
     $portal->enterpos = new Position("128", "12", "123");
     $portal->enterLevelName = "HG_Island";
     $portal->portalExitPos1 = new Position("128", "12", "123");
     $portal->portalExitPos2 = new Position("128", "12", "123");
     $portal->exitpos = new Position("128", "12", "123");
     $portal->exitLevelName = "MinigamesHub";
     $portal->location = new Position("128", "12", "123");
     $portal->maps = array("catching_fire", "hg_tornament");
     $portal->save($plugin->getDataFolder());
 }